MEV 回调函数漏洞分析
Another interesting attack for @AnnexFinance. 5 of their liquidator contracts have been attacked. The lost is a small amount($3000) but the vulnerability is interesting.
There are total 5 attack TX related to these on BSC. One example is https://bscscan.com/tx/0x3757d177482171dcfad7066c5e88d6f0f0fe74b28f32e41dd77137cad859c777, attacker 0x40fB8d322cC4887D6c2Bf886755300EA79f6A874 gained around 0.2 ETH which is about $2,000.
The root cause is that the contract does not verify caller and pass in parameters in pancakeCall() functions. It could let attacker transfer the estuary tokens to attacker controlled panswap contract.
https://bscscan.com/address/0xe65e970f065643ba80e5822edff483a1d75263e3#code Liquidator 合约 https://bscscan.com/tx/0x3757d177482171dcfad7066c5e88d6f0f0fe74b28f32e41dd77137cad859c777 攻击交易
在Liquidator合约中存在回调函数pancakeCall,其中存在判断条件require(msg.sender == IPancakeFactory(FACTORY).getPair(token0, token1)); 即调用方必须为工厂合约IPancakeFactory(FACTORY)返回的交易对的池子地址。 利用步骤
在其它的MEV合约的回调函数也存在同样的问题,具体细节可访问链接: https://twitter.com/AnciliaInc/status/1601778601702981633
如果觉得我的文章对您有用,请随意打赏。你的支持将鼓励我继续创作!