草庐IT

Ethernaut

全部标签

[区块链安全-Ethernaut]附加GoodSamaritan解题思路

[区块链安全-Ethernaut]新题目GoodSamaritan解题思路背景目标合约分析尝试一:失败的攻击尝试二总结背景说来也巧,Ethernaut上一篇刚完结,突然点开看到又更新了GoodSamaritan,我干脆单独列出来把。目标合约分析总共有三个合约互相作用,分别为GoodSamaritan(慈善家,对外暴露捐款接口)、Coin(慈善家通过钱包创建的代币合约)以及Wallet(由慈善家所有)。本关卡的目的是获取到钱包里所有的余额。核心代码如下:contractGoodSamaritan{Walletpublicwallet;Coinpubliccoin;constructor(){wa

Ethernaut靶场学习实践(二)

题目预览7.Delegation分析攻击8.Force分析攻击9.Vault分析攻击10.King分析攻击11.Re-entrancy分析攻击12.Elevator分析攻击7.Delegation分析源码://SPDX-License-Identifier:MITpragmasolidity^0.6.0;contractDelegate{addresspublicowner;constructor(address_owner)public{owner=_owner;}functionpwn()public{owner=msg.sender;}}contractDelegation{addres