Mythril은 EVM 바이트 코드의 보안 분석 도구입니다. Ethereum, Hedera, Quorum, Vechain, Rootstock, Tron 및 기타 EVM 호환 블록 체인을 위해 구축 된 스마트 계약의 보안 취약점을 감지합니다. 그것은 다양한 보안 취약점을 감지하기 위해 상징적 실행, SMT 해결 및 오염 분석을 사용합니다.
기여하고 싶거나 지원이 필요하거나 미래를 위해 요리를하는 것을 배우고 싶든 Consensys Discord 서버에서 부지런한 Mythx 채널을 체크 아웃 할 수 있습니다.
Docker와 함께 가져 오십시오.
$ docker pull mythril/myth
PYPI (Python 3.7-3.10)에서 설치 : :
$ pip3 install mythril
사전 커밋 후크를 통해 사용하십시오 (실제 태그로 $GIT_TAG
교체) :
- repo : https://github.com/Consensys/mythril
rev : $GIT_TAG
hooks :
- id : mythril
또한 args: [disassemble]
또는 args: [read-storage]
analyze
과 다른 명령을 사용합니다.
자세한 지침은 문서를 참조하십시오.
달리다:
$ myth analyze <solidity-file>
또는:
$ myth analyze -a <contract-address>
-t <number>
로 탐색 할 최대 트랜잭션 수를 지정하십시오. --execution-timeout <seconds>
로 타임 아웃을 설정할 수도 있습니다.
다음은 3
트랜잭션의 solidity_examples
디렉토리에있는 killbilly.sol
파일에서 mythril을 실행하는 예입니다.
> myth a killbilly.sol -t 3
==== Unprotected Selfdestruct ====
SWC ID: 106
Severity: High
Contract: KillBilly
Function name: commencekilling()
PC address: 354
Estimated Gas Usage: 974 - 1399
Any sender can cause the contract to self-destruct.
Any sender can trigger execution of the SELFDESTRUCT instruction to destroy this contract account and withdraw its balance to an arbitrary address. Review the transaction trace generated for this issue and make sure that appropriate security controls are in place to prevent unrestricted access.
--------------------
In file: killbilly.sol:22
selfdestruct(msg.sender)
--------------------
Initial State:
Account: [CREATOR], balance: 0x2, nonce:0, storage:{}
Account: [ATTACKER], balance: 0x1001, nonce:0, storage:{}
Transaction Sequence:
Caller: [CREATOR], calldata: , decoded_data: , value: 0x0
Caller: [ATTACKER], function: killerize(address), txdata: 0x9fa299cc000000000000000000000000deadbeefdeadbeefdeadbeefdeadbeefdeadbeef, decoded_data: ('0xdeadbeefdeadbeefdeadbeefdeadbeefdeadbeef',), value: 0x0
Caller: [ATTACKER], function: activatekillability(), txdata: 0x84057065, value: 0x0
Caller: [ATTACKER], function: commencekilling(), txdata: 0x7c11da20, value: 0x0
Mythril 사용에 대한 지침은 문서에서 찾을 수 있습니다.
지원 또는 일반적인 토론은 Consensys Discord 서버에서 부지런한 Mythx 채널을 확인하십시오 ..
Mythril의 문서는 docs
폴더에 포함되어 있으며 문서를 읽기 위해 게시됩니다. 스핑크스를 기반으로하며 하위 디렉토리에 포함 된 MakeFile을 사용하여 구축 할 수 있습니다.
cd docs
make html
이렇게하면 HTML 출력이 포함 된 build
출력 디렉토리가 생성됩니다. 또는 PDF 문서는 make latexpdf
와 함께 구축 될 수 있습니다. 사용 가능한 출력 형식 옵션은 make help
볼 수 있습니다.
보고 된 취약점에 대한 자세한 정보 및 개선 지침을 찾으려면 Smart Contract Bovnerability Classification Registry를 방문하십시오.