BNBX Hack
What happened
On April 27, 2024, an attacker drained BNBX tokens on BNB Chain from wallets that had granted token approvals to the contract 0x389a9ae29fbe53cca7bc8b7a4d9d0a04078e1c24, then sold the tokens into the WBNB-BNBX PancakeSwap pool. Security monitor ChainAegis reported a loss of 75.47 WBNB (about $45,000) and told holders to revoke any approvals to that contract.
Attacker: 0x123fa25c574bb3158ecf6515595932a92a1da510. Attack contract: 0xe6e06030b33593d140f224fc1cdd1b8ffe99e50a. Attack transaction: 0xea88dc6dbd81d09c572b5849e0d4508598edcf8f11c9a995cd8fe7e6c194f39e.
How it happened
- Many BNBX holders had approved the contract
0x389a...1c24to spend their BNBX. - The attacker's contract looped over those holders, checking each one's BNBX balance and remaining allowance to that contract.
- For each holder with tokens available, it called the function with selector
0x11834d4con0x389a...1c24, passing the holder's address. The call pulled the holder's BNBX, and the tokens ended up with the attacker. - The attacker sent the collected BNBX to the WBNB-BNBX PancakeSwap pair and swapped it for about 75.47 WBNB.
Protocol details
Build your security review skills
Work through hands-on labs covering real exploit mechanics, review techniques, and defensive patterns.