跳到正文
Skillpedia
安全6.5k · #14154

web-cookie-audit

它能做什么

它说明如何列出网站的 Cookie,并测试哪些 Cookie 会改变网站的行为。适用于需要依赖会话的应用、并希望获得准确结果的测试人员。

适用场景

  • ✓当测试人员发现某个功能只有登录后才能使用,需要知道哪个 Cookie 起作用时。
  • ✓当开发者想要一份网站设置的每个 Cookie 及其用途的清单时。
  • ✓当测试结果显示被拦截,但原因可能是缺少会话 Cookie 时。

技能链接

https://github.com/BitterSecurity/Decepticon/blob/main/packages/decepticon/decepticon/skills/standard/recon/web-recon/cookie-audit/SKILL.md

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

使用方法

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

可直接粘贴的消息

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

可以这样问 AI

“我们的网站设置了哪些 Cookie?其中哪些会改变结账流程的表现?”

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

工作原理

该技能告诉 AI 记录每个 Cookie,分别在有和没有该 Cookie 的情况下进行测试,并记下哪个 Cookie 改变了行为。结果会整理成表格。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

Cookie-Conditional Sink Discovery

A "sink" (eval, deserialize, exec, template render) may behave differently — or not fire at all — depending on which session cookies are present. Recon MUST enumerate every cookie the app sets and re-test each candidate sink with and without each cookie before declaring the sink unreachable. Skipping this step is the most common cause of exploit handing back a false "blind sink" verdict.

Procedure

  1. Walk the app unauthenticated; record every Set-Cookie (name, attributes, source endpoint).
  2. Authenticate (every auth tier: anon, low-priv user, high-priv user) and record the full cookie jar after each.
  3. For each candidate sink (parameter, route, header, body field):
    • Probe with NO cookies.
    • Probe with FULL authenticated jar.
    • Bisect: drop one cookie at a time and re-probe. The cookie whose removal silences the sink is the gating cookie.
  4. Document a "Sink preconditions" table in recon_notes.md and SUMMARY.md:
Sink Endpoint Method Required cookies Behavior w/o cookie Behavior w/ cookie Notes
bookmark_data (deser) /bookmarks/import POST session=...; auth_tier=user 302 → /login 200 + processed gated by auth_tier

4a. Session mutation audit. For every endpoint that READS session, trace which other endpoints WRITE to the SAME session key BEFORE the security verdict (login, password check, role lookup). This is the data race-condition exploit needs. Output a "Session-write timeline" table:

Endpoint Reads session keys Writes session keys (pre-verdict) Slow ops (bcrypt/DB/network) Race window (ms)
POST /login — user, auth_tier (set BEFORE bcrypt) bcrypt ~200ms ~200
GET /admin_panel user, auth_tier — — reads during the login bcrypt window

If the challenge tag includes race_condition, toctou, concurrent, or smuggling_desync and recon hands off WITHOUT this table, exploit MUST flag the handoff back as "recon incomplete: session-write timeline missing".

  1. In the handoff to exploit/postexploit, ALWAYS include a Required session state line:
Required session state: cookies=[session, auth_tier=user]; obtained via POST /login (creds: user@example.com / hunter2)

If recon hands off without this line, exploit is required to re-run cookie enumeration before concluding any sink is unreachable.

常见问题

为什么要逐个检查 Cookie?

每次只移除一个 Cookie,可以看出究竟是哪个 Cookie 真正控制某项功能。

输出结果是什么样的?

是一张表格,列出各项功能、它们所需的 Cookie,以及网站的响应。

谁会从中受益?

希望从基于会话的应用中获得清晰、准确结果的测试人员和开发者。

详情

作者的原始描述

Cookie-conditional sink discovery — bisect required cookies per sink, session-write timeline for race-condition challenges.

repo: BitterSecurity/Decepticon

热度

GitHub 星标
6.5k
排名
#14154
许可证
Apache-2.0
更新时间
2026/11/1

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能