/security-agent-skills:hunting-wallet-drainer-and-dapp-approval-abusefrom security-agent-skills
Hunts dApp flows that trick users into signing away wallet assets via overbroad approvals, blind-signing prompts, spoofed addresses, or hidden intent. Useful when reviewing token-approval and wallet-connection interactions.
Ships in security-agent-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
A wallet drainer does not break cryptography; it gets the user to authorize the theft themselves. Every token a dApp moves on a user's behalf requires an approval or a signed permit, and the danger is the gap between what the user believes they are authorizing and what the approval actually grants. A user who wants to swap one token often gets asked for an unlimited approval, granting the contract the right to move all of that token, forever, not just the amount for this trade. A signed permit or an approve-for-all can authorize spending far beyond the intended action. A blind-signing prompt shows an opaque blob instead of a human-readable action, so the user cannot see what they are agreeing to. And a spoofed spender address, a malicious contract, or a transaction whose displayed intent differs from its real effect turns a routine-looking click into a drain. The hunt is to look at every approval and signature a dApp asks for and compare the scope and the real effect against what the user is shown and actually needs. You hunt this by walking the approval flow as a user and checking what each prompt truly authorizes.
Test approval flows only against dApps and contracts you own or are authorized to assess, on testnets or a local fork with test wallets. Granting and exercising approvals moves real assets, so use test funds and never approve, drain, or move assets from a wallet or contract that is not yours. If you can't name the authorization, stop.
Establish what the action actually needs first. Name the minimal authorization the intended interaction requires: which token, which spender, what amount, for how long. This is the false-positive killer: a flow that requests an exact-amount approval for the specific action, to a verified spender, with a human-readable prompt and a bounded lifetime, is asking for only what it needs. Name the minimal grant, then compare each prompt against it.
Check approval scope against need. For each approval, compare the amount and duration granted against what the action requires. An unlimited approval, or one far larger or longer-lived than the trade, hands the contract standing authority to move all of that token later. Confirm the flow requests exact-amount, short-lived approvals and offers revocation.
Inspect permits and approve-for-all. Examine any signed permit or approve-for-all: what it authorizes, to whom, and for how much. A permit signed for an unlimited amount, or an approve-for-all over an entire NFT collection, authorizes far beyond a single action and is a favorite drainer primitive. Confirm the signed scope matches the intended interaction.
Test for blind signing and intent mismatch. Look at what the signing prompt shows the user versus what the transaction or signature actually does. A prompt that shows an opaque blob (blind signing) or a displayed intent that differs from the real effect (a swap that is actually an approval, a mint that is actually a transfer) is deception. Confirm prompts are human-readable and match the real effect.
Verify spender and contract identity. Check the spender and contract addresses the user is asked to approve against the legitimate, verified addresses. A spoofed spender, a look-alike contract, or an address swapped in by a compromised front end routes the approval to an attacker. Confirm addresses are verified and displayed, not hidden or trusted blindly.
Confirm and record. Confirm on a test wallet by showing that an approval or permit grants more than the action needs and that the granted scope lets a contract move assets the user did not intend, on a fork with test funds and without draining a real wallet. Kill the lead if approvals are exact-amount and short-lived to verified spenders, permits match the intended action, prompts are human-readable and match the real effect, and revocation is offered. Record the deceptive or overbroad approval request, the drained or movable assets, and the unlimited scope or hidden intent.
Confirm. A dApp swap flow requests an unlimited (max-uint) approval for the input token before the trade, and the swap contract is upgradeable by an admin. On a fork, after the user grants the unlimited approval, the contract (or a later upgrade) transfers the user's entire balance of that token, not just the swapped amount, because the standing unlimited allowance authorizes it. Confirmed drain via unlimited approval,
high, remediation = request an exact-amount approval scoped to the trade, prompt the user with the real amount and spender, and surface and encourage revocation of standing allowances.Kill. The flow requests an exact-amount approval for the specific trade to the verified swap contract, any permit it asks the user to sign matches that amount and spender, the signing prompt is human-readable and its displayed intent equals the real effect, and the UI shows current allowances with a one-click revoke. There is no standing authority for the contract to move more than the trade. Killed,
kill_reason= "approvals are exact-amount and short-lived to verified spenders, permits match the action, prompts are readable and match the real effect, and revocation is offered; no signature authorizes more than the user intended."
You need every approval, permit, and signature the flow requests, the amount and duration each grants, what the signing prompt shows versus the real effect, and the spender and contract addresses involved. On a fork with test wallets, walk the flow, inspect each prompt's real scope, and show whether the granted authority exceeds the action. Reading the front-end and contract interaction shows the intended grant; a standing allowance that lets the contract move assets the user did not mean to authorize shows the abuse.
hunting-signature-replay-and-eip712-domain-trust - a permit is a signed message; its scope and binding are
that skill's subject, and an overbroad permit is often also replayable.hunting-mev-and-transaction-ordering-exposure - what a user signs and submits is also exposed to ordering;
approval abuse and front-running both exploit the signing-and-submission surface.auditing-cross-chain-bridge-and-message-trust - bridges and drainers are two ways value leaves a wallet;
both hinge on what an action is really authorized to do.auditing-clickjacking-and-ui-redressing - a redressed dApp UI can trick a user into clicking a signing
prompt they cannot see; UI deception and approval deception combine.What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub unboundcompute/security-agent-skills --plugin security-agent-skills194 skills in this plugin
/adjudicating-dependency-cve-reachabilityDecide whether a CVE in a dependency actually exposes your application before you scramble to patch: is the vulnerable function on a real call path from your code, do the trigger preconditions hold, and can an attacker control the input that reaches it. Use when an advisory, SCA scan, or dependency bot flags a CVE and you must separate a genuine exposure from unreachable noise, or justify why you are or are not affected. Covers pinning the vulnerable symbol, call-path reachability, precondition checks, and taint from your entry points./adjudicating-taint-pathsDecide whether a whitebox lead is a real bug by tracing taint from an untrusted source to a dangerous sink and confirming every hop against live source. Use after a scanner, a candidate list, or your own reading surfaces a "this looks dangerous" sink (SQL exec, system/exec, file open, deserialize, template render, redirect target, memcpy) and you must decide whether attacker- controlled input actually reaches it - or kill the lead with evidence. Covers forward and reverse taint, witness paths, sanitizer analysis, and the evidence rules that separate a finding from a false positive.Other plugins' skills for the same job