Client Reverse 标志

Client Reverse

组织热门
awarexone
client-reverse

Client-side request-signing and anti-bot token reversal for bug bounty — when a request carries a sign/sig/hmac/token/nonce/timestamp/X-Sensor header that Burp Repeater cannot replay, recover the signer just enough to reproduce the request outside the client. Packet-first staging (capture real request → prove replay works → only reverse if replay fails) across the locate→recover→runtime→validation→replay spine. Covers tracing backward from the signature field (writer→builder→entry→source), isolating user-mutable sign inputs (timestamp/nonce/deviceId/body) vs constants (secret key), hooking fetch/XHR in DevTools, JS deobfuscation basics (webpack/wasm/JSVMP), and the bounty payoff: reach the protected API to then hunt IDOR/auth/business-logic. Use when Burp/mitmproxy replay of a signed or anti-bot-gated request fails and you suspect a client-computed field is blocking you.

概览

发布者awarexone
代码仓库Agentic-Bug-Hunter
技能名称client-reverse
星标数
4.9K
复刻数
868
附带文件
1
许可协议MIT
链接
  • Markdown 格式的指令

    模型按需加载的 SKILL.md 文件,因此只有在请求确实匹配时才会消耗 Token。

  • 兼容任何大语言模型

    AI 技能采用纯 Markdown,而非特定提供商的代码,因此可搭配 GPT、Claude、Gemini、Grok 或本地模型使用。

  • 1 个随附文件

    模型执行任务时可读取的脚本、模板和参考资料。这些文件为只读文件,绝不会被执行。

  • 开源

    由 awarexone 发布于 GitHub。请在安装前查看源内容。

安装

在 TypingMind 中安装 Client Reverse AI 技能,即可搭配任意大语言模型使用;也可以将其放入其他支持读取 SKILL.md 的智能体中。

1

安装到 TypingMind

TypingMind 可直接从 GitHub 文件夹安装技能:读取 SKILL.md,打包资源文件,并将结果保存在本地。

  1. 打开应用,前往“插件 → 技能”。
  2. 选择“从 GitHub 安装”。
  3. 粘贴下方的技能文件夹 URL 并确认。
    https://github.com/awarexone/Agentic-Bug-Hunter/tree/main/skills/client-reverse
  4. 请在每个需要使用该技能的聊天中启用它。
依次选择“插件 → 技能 → 添加技能 → 从 GitHub URL 导入”,然后粘贴文件夹 URL 并点击“继续”。
2

安装到其他智能体

任何支持 Agent Skills 格式的智能体都可以使用此技能,只需将文件夹复制到该智能体的技能目录中。

Claude Code — .claude/skills
git clone --depth 1 https://github.com/awarexone/Agentic-Bug-Hunter.git /tmp/Agentic-Bug-Hunter
mkdir -p .claude/skills
cp -r /tmp/Agentic-Bug-Hunter/skills/client-reverse .claude/skills/client-reverse
复制后,请重启 Claude Code,以加载新技能。

在 TypingMind 中使用此技能

在任意 TypingMind 聊天中启用 Client Reverse,后续即可交由模型处理。技能的名称和描述会放在系统提示词中,一旦请求匹配,模型就会自动加载完整指令,无需您手动调用,且在实际使用前不会消耗 Token。

一旦请求与技能匹配,模型就会自动加载 Client Reverse。

兼容任何 AI 模型

AI 技能是纯 Markdown 指令,而非特定提供商的代码,因此 Client Reverse 不局限于最初适配的模型。只需在 TypingMind 中安装一次,即可搭配 GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama 或您自行运行的本地模型使用,全程使用您自己的 API 密钥。

  • 仅在需要时加载

    系统提示词中仅包含技能名称和描述。首次遇到匹配的请求时才会获取指令,因此未使用的技能不会产生额外费用。

  • 在聊天中切换模型

    技能是指令而非代码,因此切换模型不会导致技能失效,新模型会读取同一个 SKILL.md。

技能指令

这是模型会加载的 SKILL.md 内容。请在安装前阅读,因为技能就是模型将遵循的指令。

CLIENT-SIDE REQUEST-SIGNING / ANTI-BOT TOKEN REVERSAL

You hit a request you cannot replay. Burp Repeater returns 401 invalid signature or 403 bot detected even though the browser/app does it fine. There is a sign, sig, X-Signature, _token, nonce, X-Acf-Sensor-Data, or encrypted body the client computes. This skill recovers just enough of that signer to reproduce the request outside the client.

Why a bug bounty hunter cares: the signature is not the bug. The signature is the lock on the door. Behind it is an API the program assumed only their own client would ever reach — so that API is often under-tested for IDOR, BOLA, mass assignment, and business logic. Reversing the signer is the cost of admission; the payout comes from what you fuzz once you're inside. Never report "I reversed your sign algorithm" as a finding on its own — that is N/A. Report the IDOR/auth bug you reached through it.


THE CORE PRINCIPLE: PACKET-FIRST

Reverse engineering is a blocker-resolution step, not the default entrypoint. Capture the real request first. Prove whether it already replays. Only reverse the signer if replay actually fails.

Most hunters waste hours decompiling JS for a "signature" that turns out to be replayable as-is, or gated by a timestamp that's valid for 5 minutes. Run this gate before opening DevTools Sources:

1. Capture the real request    (Burp/mitmproxy proxy, or DevTools → Network → Copy as cURL)
2. Replay it UNCHANGED          (paste cURL into terminal, or Burp Repeater)
   → 200 / works?  → IT'S NOT SIGNED. Skip all reversing. Go fuzz it.
3. Replay it again 5 min later  → still 200?  → no freshness check (replay window is wide/infinite)
4. Mutate ONE non-signed field  (e.g. change an `id` in the body, keep sign as-is)
   → 200?  → the sign does NOT cover that field → tamper freely, no reversing needed
   → 401?  → the sign covers it → NOW you reverse (continue to STAGES below)

Steps 2–4 alone kill ~half of "I need to reverse this" assumptions. A signature that omits the payload or endpoint, or never expires, is itself the bug — see the CoinMate pattern in Real Paid Examples.


STAGE SPINE: locate → recover → runtime → validation → replay

Pick the stage from engineering state, not from clue words. "I see the word sign" does not mean you're in recover. You are in locate until you can point at the exact line that writes the signature.

intake → evidence → locate → recover → runtime → validation → replay
StageEnter when...GoalExit when...
locatethe signing function / write boundary is unprovenfind where the sign field is written and what feeds ityou can point at writer ← builder ← entry ← source
recoverboundary is real but the code is obfuscated/opaquede-shell only the layer blocking you (webpack/wasm/JSVMP)you have a readable or callable signer contract
runtimecode is clear but browser-exec ≠ your-exec divergefind the first divergence (missing object/state/anti-debug)local run reproduces browser sign output
validationremaining work is equivalence proofmatch checkpoints, not just final outputsign(input) == observed for fresh inputs
replaysign reproduces outside the clientBurp/Python baseline request you can fuzza stable request you can mutate for IDOR/auth

Carry a one-line handoff between stages. Do not promote a guess to a fact:

text
--- Stage Handoff ---
From: locate  To: recover
Proven: sign written at app.min.js:1, line ~4021; inputs = ts, nonce, JSON body, deviceId
Open:   builder is inside webpack module 5f3 behind a string-table — need to de-shell that one module
Invalid: assumption that deviceId was constant (it rotates per session)

STAGE 1 — LOCATE: trace backward from the signature field

You know the output (the sign value on the wire). Walk backward to the source. Keep each layer distinct:

text
writer  <-  builder  <-  entry  <-  source
  • writer — the line that finally puts sign into the body/header/query/cookie/WS frame
  • builder — the transform: HMAC, MD5, AES, sort-then-concat, JSON.stringify ordering
  • entry — the UI action / callback / response that kicks off the chain
  • source — what feeds the inputs: upstream response, localStorage, cookie, Date.now(), crypto.getRandomValues, user input

Browser: find the writer in Chrome DevTools

text
# 1. XHR/fetch breakpoint — break the moment the signed request fires
DevTools → Sources → XHR/fetch Breakpoints → + → paste the endpoint path (e.g. /api/order)
   trigger the action → execution pauses inside the request stack
   → walk UP the Call Stack panel: the frame that mutates headers/body is your writer

# 2. Search the bundle for the field name (catches the writer fast)
DevTools → Sources → Ctrl+Shift+F (search all loaded scripts)
   search: "sign"  "X-Signature"  ".sign ="  "headers["  "signature"
   click {} (pretty-print) on the minified file so line numbers are stable

# 3. DOM/event breakpoint when a click triggers it
DevTools → Elements → right-click the button → Break on → subtree/attribute modifications

Strong first observation points (where to put the breakpoint)

Sink (where sign lands)First place to prove
request body fieldfinal JSON.stringify / submit / fetch(body=...)
request headerthe headers[...] = or setRequestHeader call
JS-set cookiethe document.cookie = setter
WebSocket framethe final envelope object right before ws.send(...)
anti-bot blob (X-Sensor-Data, _px)the SDK init() and the getter that returns the blob

Do NOT broad-deobfuscate before the boundary is real. Keyword hits are not proof — many bundles ship sign strings that never run.


STAGE 2 — RECOVER: de-shell only what blocks you

Enter only after the boundary is proven and the only remaining blocker is that the code is unreadable. Reduce the single layer in your way — never the whole bundle.

Shell you hitWhat it meansMinimal move
webpack bootstrapmodules wrapped in __webpack_require__break inside the target module, read the local closure — don't unpack the whole bundle
string-array obfuscation_0x4a2b[12] lookupsin console, print the decoder array; or set a breakpoint and read decoded values live
worker / postMessage bridgesign runs in a Web Workerbreakpoint the worker script; treat postMessage payload as the contract
wasm loadersign math compiled to wasmhook the JS↔wasm boundary; capture inputs/outputs rather than decompiling wasm
JSVMP (custom bytecode VM)a dispatcher loop interpreting bytesdo not reverse the VM — go runtime: hook inputs+output and treat sign as a black box

The black-box shortcut beats decompilation 90% of the time. You almost never need to understand the HMAC math. You need the input tuple and a way to call the function. Capture sign(input) → output pairs at runtime; if you can call the page's own signer, you never have to reimplement it.

Reimplement vs reuse the page's signer

javascript
// REUSE — if the signer is a reachable function, just call it from the console.
// Works when the page exposes it or you grab a reference at a breakpoint.
window.__sign = signFn;                 // assign at a breakpoint inside the builder
window.__sign({id: 999, ts: Date.now()})// → get a valid sig for ANY payload you want

// HOOK to log every real sign(input)->output the app produces (no reimplementation):
(function(){
  const orig = CryptoSigner.prototype.sign;        // adapt to the real object/method
  CryptoSigner.prototype.sign = function(...a){
    const out = orig.apply(this, a);
    console.log('SIGN', JSON.stringify(a), '=>', out);  // copy pairs for offline replay
    return out;
  };
})();

STAGE 3 — ISOLATE THE INPUTS (the part that decides if replay is even possible)

For every input to the signer, classify it. This is the whole game — it tells you what you can mutate and whether you even need the secret.

InputTypeAttacker-mutable?Implication
timestamp / tsper-requestyes (you set it)fine — regenerate per replay; check the validity window
nonce / requestIdper-request randomyesfine — generate fresh; check if server enforces uniqueness (replay protection)
deviceId / uuidper-sessionyes (one value, reusable)grab once, pin it — usually constant for your session
request body / pathper-requestyesthe prize — if sign covers it, you mutate body + re-sign to fuzz IDOR/mass-assignment
secret key / appSecretconstant, baked inno (you extract it)if it's in the JS bundle / APK, extraction = full forge ability for any request
text
DECISION:
  secret is in the client (hardcoded in JS or APK strings)
      → you can re-sign ANY request offline → full replay, fuzz everything
  secret is server-side only, but you can call the page's signer function
      → you can sign any payload while the page is open → replay via headless browser bridge
  secret is server-side AND signer is uncallable (heavy anti-debug)
      → you may only replay UNCHANGED requests
      → then test: does the sign omit the path/body? (CoinMate pattern) → forge anyway
      → does it never expire? → replay-window bug, report that

Hunt the bundle for a baked secret before doing anything clever:

bash
# Pull the JS and grep for the secret feeding the signer
wget -q -r -l1 -A '*.js' -P /tmp/js/ "https://target.com" 2>/dev/null
grep -rnoE "appSecret|secretKey|signKey|HMAC|hmac|['\"][A-Za-z0-9+/]{24,}={0,2}['\"]" /tmp/js/ | head
# Cross-reference with /secrets-hunt --js-bundle for entropy-scored hits

STAGE 4 — RUNTIME & VALIDATION: prove your sign == the app's sign

If you reimplemented the signer in Python, prove equivalence on a fresh input before trusting it. Compare checkpoints, not just the final byte:

python
import hmac, hashlib, json, time

def sign(body: dict, ts: str, nonce: str, secret: bytes) -> str:
    # Reproduce the EXACT canonicalization the JS does — order, separators, encoding.
    # Get these by reading the builder, NOT by guessing.
    payload = json.dumps(body, separators=(',', ':'), sort_keys=False)  # JS JSON.stringify keeps INSERTION order, not sorted — set sort_keys=True ONLY if the builder explicitly sorts keys
    msg = f"{ts}{nonce}{payload}".encode()                            # match JS concat order!
    return hmac.new(secret, msg, hashlib.sha256).hexdigest()

# VALIDATE: feed an input you captured from the browser, compare to the observed sig.
# checkpoints that must each match: canonical body string → message tuple → final digest
assert sign(captured_body, captured_ts, captured_nonce, SECRET) == observed_sig

The two killers are almost always (a) JSON key ordering / separator whitespace, and (b) concatenation order of the input fields. If your digest is wrong, diff the pre-hash message string against the one the app builds (log it at a breakpoint), not the output hash.


STAGE 5 — REPLAY: build the request you'll actually fuzz

You are ready only when you can answer all five:

[ ] where is the signed field written?
[ ] which inputs are constants (secret, deviceId) vs per-request (ts, nonce, body)?
[ ] which inputs come from upstream responses / cookies / storage / page lifecycle?
[ ] does request ORDER or session STATE matter (does a prior call seed the nonce)?
[ ] which fields can I mutate and still produce a valid sign?

Then drive it from Python so you can fuzz at scale:

python
import requests, time, uuid

SECRET = b"extracted_from_bundle"          # or call the page's signer via a headless bridge
DEVICE = "pinned-session-device-id"

def signed_request(body):
    ts = str(int(time.time()*1000))
    nonce = uuid.uuid4().hex
    sig = sign(body, ts, nonce, SECRET)    # your validated signer from Stage 4
    return requests.post("https://target.com/api/order",
        json=body,
        headers={"X-Timestamp": ts, "X-Nonce": nonce, "X-Signature": sig,
                 "X-Device-Id": DEVICE})

# NOW the bug hunt begins — mutate the body to reach the protected logic:
for victim_id in range(1000, 1100):        # IDOR sweep behind the signature
    r = signed_request({"orderId": victim_id})
    if r.status_code == 200 and "not authorized" not in r.text:
        print(f"IDOR: read order {victim_id}", r.json())

Bridge option when the secret is server-side: keep a headless browser open, expose the page's own sign() via a tiny local HTTP shim, and have your Python fuzzer call out to it per request. You never reimplement crypto — the app signs for you.


ANTI-BOT TOKENS (Akamai / DataDome / PerimeterX / hCaptcha-style)

Same spine, harder shell. These ship an SDK that emits an opaque sensor blob (X-Acf-Sensor-Data, _px, datadome cookie). Two realistic paths for a bounty hunter:

  • Reuse, don't reverse. Grab one fresh valid token from a real browser session and replay it within its (short) validity window. Enough to prove an authenticated/protected endpoint is reachable and then demonstrate IDOR/auth there. You usually do not need to generate tokens at scale to prove one bug.
  • Headless bridge. Drive a real browser (Selenium/Playwright) to mint the token, hand it to your Python fuzzer. Standard tooling, no SDK reversing.

Full reversal of Akamai v3 sensor-data (PRNG-shuffled, file-hash + cookie-hash seeded) or PerimeterX's compiled SDK is a week-long research effort — out of scope for a single bounty. If the anti-bot itself is misconfigured (token never expires, token from accountA validates accountB's requests, the protected endpoint is also reachable on a sibling host with no anti-bot), report that — it's a real finding without reversing anything. See the Stack→sibling-host idea in web2-recon.


WHAT'S SUBMITTABLE vs N/A

FindingVerdict
"I reversed your client signing algorithm"N/A — not a vuln by itself
Signed request replays unchanged forever (no timestamp/nonce freshness)Low/Medium — replay-attack window; report it
Sign omits endpoint/payload → forge requests without the secret (CoinMate pattern)Medium/High — request forgery
Secret key hardcoded in JS bundle / APK → forge any requestMedium alone; High/Critical chained to the API you unlock
Reached a protected API via reversed sign → IDOR / BOLA / mass assignment found thereHigh/Critical — the real prize; report the downstream bug
One user's anti-bot token validates another user's requestMedium — broken token binding

The deliverable is almost never the signing weakness. It is the access-control or business-logic bug on the endpoint the signature was guarding. Reach it, then run the IDOR / Broken Auth / Mass Assignment / Business Logic playbooks from web2-vuln-classes.


TOOL MAP (standard tools — no special MCP needed)

NeedTool
capture the real requestBurp Suite proxy, or mitmproxy, or DevTools Network → Copy as cURL
break on the signed requestChrome DevTools → Sources → XHR/fetch Breakpoints
read minified codeDevTools {} pretty-print + Ctrl+Shift+F global search
hook fetch/XHR / log sign()DevTools console snippet (Object.defineProperty / method override)
grep bundle for the secretwget -r -A '*.js' + grep, or /secrets-hunt --js-bundle
find hidden endpoints in JSLinkFinder / jsluice (see web2-recon)
replay + fuzz at scalePython requests (Stage 5 template)
mint anti-bot tokensSelenium / Playwright headless bridge
mobile app variant (signer in APK)apktool + jadx (static), objection / frida CLI (runtime hook) — same locate→recover→runtime→replay spine, packet-first

Mobile note: for an authorized Android app, the packet-first rule still wins — drive the app, watch Burp/mitmproxy, and only jadx/frida the APK when the packet is encrypted or unreplayable. Decompiling first is the rookie move.


REAL PAID EXAMPLES

  • CoinMate API (HackerOne, disclosed) — HMAC signature verification omitted the endpoint and payload, so requests could be forged that appeared legitimate without the correct secret (request forgery via incomplete signature coverage). This is the canonical "the sign doesn't actually cover what you'd mutate" win — find it with Stage 0 step 4.
  • Replay window on HMAC-SHA256 headers (API pentest pattern, disclosed write-ups) — custom auth headers signed with HMAC but lacking timestamp/nonce freshness; captured valid requests replay hours/days later. Prove it with Stage 0 steps 2–3, no reversing required.
  • PerimeterX iOS SDK reversal (public research) — compiled-to-ARM bot SDK reversed to a working token generator in ~1 week, disproving "compiled = unreverseable." Cited here as the realistic effort ceiling: pattern seen across anti-bot bypass research — for a single bounty, prefer token-reuse or a headless bridge over full SDK reversal.
  • Hardcoded HMAC secret in Android APK (mobile API pattern, disclosed write-ups) — secret extracted from the APK lets an attacker sign arbitrary API requests, fully bypassing request validation. Find it with the Stage 3 bundle/APK secret grep.

Cross-reference: once you're through the signature, run IDOR, Broken Auth / Access Control, Mass Assignment, and Business Logic from web2-vuln-classes; use web2-recon for hidden-endpoint and sibling-host discovery; validate with the 7-Question Gate before reporting.

See references/browser-js-signing.md for the full browser-JS staging detail, the boundary model, and handoff-card discipline.

附带文件

技能加载后,模型会按需读取这些文件。它们仅作为可读文件提供,绝不会被执行。

常见问题

Client Reverse AI 技能有什么作用?

Client-side request-signing and anti-bot token reversal for bug bounty — when a request carries a sign/sig/hmac/token/nonce/timestamp/X-Sensor header that Burp Repeater cannot replay, recover the signer just enough to reproduce the request outside the client. Packet-first staging (capture real request → prove replay works → only reverse if replay fails) across the locate→recover→runtime→validation→replay spine. Covers tracing backward from the signature field (writer→builder→entry→source), isolating user-mutable sign inputs (timestamp/nonce/deviceId/body) vs constants (secret key), hooking...

为什么在 TypingMind 中使用 Client Reverse?

因为您只需安装一次,就能搭配任何模型使用。Client Reverse 采用纯 Markdown 格式,而非特定提供商专用的代码,因此同一技能可用于 GPT-5、Claude、Gemini、Grok 或本地模型,甚至可以在聊天中途切换模型,而不会影响技能正常使用。TypingMind 使用您自己的 API 密钥,因此您直接向提供商付费,而不是按席位订阅;您的技能和聊天记录也都保留在您自己的存储空间中。

如何在 TypingMind 中安装 Client Reverse?

在 TypingMind 中打开“插件 → 技能 → 从 GitHub 安装”,然后粘贴 https://github.com/awarexone/Agentic-Bug-Hunter/tree/main/skills/client-reverse。TypingMind 会读取其中的 SKILL.md,打包相关文件,并将其安装为技能,供您在各个聊天中按需启用。

哪些 AI 模型可以使用 Client Reverse?

您在 TypingMind 中连接的任何模型都可以。AI 技能采用纯 Markdown 指令,而非特定提供商专用的代码,因此 GPT、Claude、Gemini、Grok 和本地模型都能在请求匹配时加载此技能。

Client Reverse 可以搭配多少个 AI 模型使用?

数量不限。只要模型支持技能,您就可以搭配 Client Reverse 使用,包括 GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llama 等,都可在 TypingMind 中使用您自己的 API 密钥接入。

Client Reverse AI 技能免费吗?

是的。该技能源自 awarexone 在 GitHub 上以 MIT 许可证发布的项目。您只需向自己的 AI 提供商支付所用 Token 的费用。

什么是 AI 技能?

AI 技能是一组可复用的指令,用于教会 AI 模型完成某项特定任务。它遵循开放的 Agent Skills 格式:包含名称和描述的 SKILL.md 文件,以及模型可能需要的脚本、模板或参考文件。模型仅在您的请求与技能匹配时才会读取这些指令,因此已安装的技能在使用前不会产生任何费用。

AI 技能与插件或 MCP 服务器有何不同?

插件或 MCP 服务器为模型提供可调用的新工具,也就是在某处运行并返回结果的代码。AI 技能则为模型提供知识和流程:如何处理任务、遵循哪些步骤,以及怎样的输出才算优质。技能采用纯 Markdown 格式,因此不需要服务器、API 密钥或运行时环境,并且适用于任何模型。

查看全部

立即创建您自己的 AI 工作区

订阅我们的电子简报,获取新功能和后续赠奖活动的通知 👇