The Free Tokens That Cost Everything: Inside a Drainer Kit's Settings
The challenge
A fake airdrop page is emptying wallets. Decode the settings hidden in its script. Name the wallet that keeps most of the loot.
What you'll learn
- Explain how a wallet drainer turns a signed approval into stolen tokens
- Recognise decoded text that is written backwards and reverse it
- Read a drainer-as-a-service config: spender, payout split, logging bot
- Convert basis points to percentages to find who profits most
- List what users, projects and investigators do against drainers
Skills tested
Prerequisites
- What base64 is
- What a crypto wallet address looks like
How it works
A wallet drainer is a phishing kit for crypto. A fake page (a free airdrop, a mint, a "wallet check") asks the visitor to connect a wallet and sign something that looks harmless. The signature is really an approval or a permit that lets the attacker's contract move the victim's tokens, and it empties the wallet in one transaction.
Most drainers are rented, not written. Kits such as Inferno, Angel and Pink Drainer were sold as a service: the developers host the contracts and the panel, affiliates bring the traffic, and the spender contract splits every theft on-chain. Group-IB reported Inferno Drainer's operators keeping 20% and the affiliates 80%. ScamSniffer counted about $494 million stolen by drainers in 2024.
The page needs its settings in the browser, so kits hide them from scanners that grep for 0x addresses. This one loads them with:
const cfg = JSON.parse(atob(_c).split("").reverse().join(""));Read from the inside out: base64-decode, then reverse the text, then parse the JSON. Inside: the chains to drain, a minimum wallet value, the order of attack (permit signatures first), the spender contract, the payout split in basis points (bps, 10000 = 100%) and a Telegram bot that pings the affiliate on every connect, signature and drain.
Common mistakes
- Pressing reverse first. Reversing the blob puts the
=padding at the front, and base64 then fails. The code decodes base64 first, then reverses. - Stopping at the backwards text. After base64 the output ends with
{and reads"ot","spb": that is JSON written backwards, and any address read from it is reversed too. - Answering the spender (0x3F0bdDd6...). It is the contract victims approve. It pulls the tokens and pays them out in the same transaction, so it keeps nothing.
- Answering the first payout (0x7a6105D3...). It is listed first, but 2000 bps is 20%: the kit operator's fee (
svc). The affiliate's 8000 bps is 80%. - Answering the Telegram bot or chat ID. That is where the affiliate gets notified, worth reporting, but it is not a wallet.
How to defend against it
- Users: never sign an approval,
permitor "claim" on a page reached from a DM, an ad or a reply. Use a wallet that simulates the transaction and shows what a signature allows, and revoke approvals you no longer need. - Projects: publish the one official claim URL, and say loudly that you never airdrop through DMs or ads. Impersonated brands should file takedowns for lookalike domains fast.
- Investigators: report the affiliate and operator wallets to exchanges and blockchain analytics providers so funds can be flagged when they cash out, report the Telegram bot to Telegram, and report the domain to the registrar and to wallet phishing blocklists.
- Wallet and browser vendors: detect drainer kits by behaviour (approval requests to fresh contracts, kit loaders like this one), not only by known addresses, which affiliates rotate often.