A wallet-draining script is malicious code designed to move cryptocurrency out of a victim-controlled wallet, usually by tricking the user into approving a transfer or by abusing a wallet connection. The script may target browser wallets, dApp interfaces, or compromised websites and package releases, then alter destination addresses, transaction parameters, or signing prompts so funds are sent to the attacker.
This matters because crypto transfers are often irreversible. A successful drain can empty a wallet in seconds and leave little chance for recovery. Defenders look for unusual signing requests, mismatched recipient addresses, unexpected contract calls, and tampering in supply-chain paths such as dependencies, browser extensions, or published packages. Safer wallet permissions, transaction previews, provenance checks, and careful review of code that handles signing can reduce the risk.


