跳到正文
cccskills
免费在 GitHub 公开

auth-bypass

Detect authentication and authorization bypass vulnerabilities including missing auth middleware, JWT algorithm confusion, IDOR, and session fixation.

中文简介正在准备中。当前显示原文说明。

查看安装方法

包含的文件(4)

  • SKILL.md3.3 KB
  • references/false-positive-indicators.md1008 B
  • references/poc-skeleton.md1.4 KB
  • references/sinks.md1.4 KB

SKILL.md(原文)

安装前可以查看交给 AI 代理的指令内容。

Authentication/Authorization Bypass Detection

When to Use

Audit web frameworks, API gateways, admin panels, CMS systems, and any application with role-based access control.

Process

Step 1: Map ALL Routes

# Express.js
grep -rn "app\.get\|app\.post\|app\.put\|app\.delete\|app\.patch\|router\." .

# Django
grep -rn "path(\|url(\|urlpatterns" .

# Flask
grep -rn "@app\.route\|@blueprint\.route" .

# Go
grep -rn "HandleFunc\|Handle\|mux\.\|router\." .

# Rails
grep -rn "get \|post \|put \|delete \|patch " config/routes.rb

Step 2: Map Auth Middleware

# Express
grep -rn "isAuthenticated\|requireAuth\|authMiddleware\|passport\|jwt\.verify" .
grep -rn "app\.use(.*auth\|router\.use(.*auth" .

# Django
grep -rn "login_required\|permission_required\|@permission_classes\|IsAuthenticated" .

# Flask
grep -rn "login_required\|@jwt_required\|current_user" .

# Go
grep -rn "AuthMiddleware\|RequireAuth\|WithAuth" .

# Rails
grep -rn "before_action.*authenticate\|before_action.*authorize" .

Step 3: Cross-Reference Routes vs Auth

For EACH route, verify:

  1. Is auth middleware applied?
  2. Is it the RIGHT auth level? (user vs admin)
  3. Is it applied to ALL HTTP methods? (GET might be protected but PUT is not)
  4. Are there any conditional bypasses?

Step 4: Check for Common Bypass Patterns

# JWT issues
grep -rn "algorithms\|algorithm\|alg\|verify.*false\|verify.*False" .
grep -rn "jwt\.decode\|jwt\.verify\|jose\|jsonwebtoken" .

# Session fixation
grep -rn "session\.regenerate\|session\.destroy" .

# IDOR (missing ownership check)
grep -rn "findById\|findOne\|params\.id\|req\.params" .

Common Vulnerability Patterns

Missing Auth on Specific Routes

// Protected
app.get('/api/users', authMiddleware, getUsers);
// MISSING AUTH
app.get('/api/users/:id/export', exportUser);  // No middleware!

JWT Algorithm Confusion

// VULNERABLE: accepts algorithm from token header
jwt.verify(token, publicKey);  // If alg=HS256, public key used as HMAC secret

// SAFE: specifies allowed algorithms
jwt.verify(token, publicKey, { algorithms: ['RS256'] });

IDOR (Missing Ownership Check)

app.get('/api/documents/:id', auth, (req, res) => {
  // VULNERABLE: finds document by ID without checking owner
  const doc = await Document.findById(req.params.id);
  res.json(doc);
  
  // SAFE: checks ownership
  const doc = await Document.findOne({ _id: req.params.id, owner: req.user.id });
});

CVSS Guidance

  • Complete auth bypass (unauthenticated access to admin): CRITICAL 9.8
  • JWT algorithm confusion to forge tokens: CRITICAL 9.1
  • IDOR to access other users data: HIGH 7.5-8.1
  • Missing auth on non-sensitive endpoint: LOW 3.1
  • Session fixation: MEDIUM 5.4

References

评价

还没有评价。欢迎分享你的使用感受。

评论

无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。

还没有评论。来写第一条吧。

提交后会立即公开。请勿填写邮箱、电话等个人信息。URL 最多 2 个。

0 / 1000 字

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

同一仓库的技能

You are helping a penetration tester exploit misconfigured Active Directory

中文简介正在准备中。当前显示原文说明。

ajtazer/heckit22026年10月7日 更新

You are helping a penetration tester enumerate an Active Directory domain and

中文简介正在准备中。当前显示原文说明。

ajtazer/heckit22026年10月7日 更新

You are helping a penetration tester establish persistent access in Active

中文简介正在准备中。当前显示原文说明。

ajtazer/heckit22026年10月7日 更新

You are helping a penetration tester exploit ADCS through template/CA access

中文简介正在准备中。当前显示原文说明。

ajtazer/heckit22026年10月7日 更新

You are helping a penetration tester establish persistence through AD CS

中文简介正在准备中。当前显示原文说明。

ajtazer/heckit22026年10月7日 更新

You are helping a penetration tester exploit misconfigured AD CS certificate

中文简介正在准备中。当前显示原文说明。

ajtazer/heckit22026年10月7日 更新

查看 ajtazer 的全部技能

报告此技能的问题