Security analysis tool for EVM bytecode. Supports smart contracts built for Ethereum, Hedera, Quorum, Vechain, Roostock, Tron and other EVM-compatible blockchains.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
mythril/README.md

96 lines
4.0 KiB

# Mythril
6 years ago
<p align="center">
<img src="/static/mythril_new.png" height="320px"/>
</p>
6 years ago
[![Discord](https://img.shields.io/discord/481002907366588416.svg)](https://discord.gg/E3YrVtG)
7 years ago
[![PyPI](https://badge.fury.io/py/mythril.svg)](https://pypi.python.org/pypi/mythril)
[![Read the Docs](https://readthedocs.org/projects/mythril-classic/badge/?version=master)](https://mythril-classic.readthedocs.io/en/master/)
![Master Build Status](https://img.shields.io/circleci/build/github/ConsenSys/mythril.svg?token=97124ecfaee54366859cae98b5dafc0714325f8b)
[![Sonarcloud - Maintainability](https://sonarcloud.io/api/project_badges/measure?project=mythril&metric=sqale_rating)](https://sonarcloud.io/dashboard?id=mythril)
6 years ago
[![Pypi Installs](https://pepy.tech/badge/mythril)](https://pepy.tech/project/mythril)
[![DockerHub Pulls](https://img.shields.io/docker/pulls/mythril/myth.svg?label=DockerHub&nbsp;Pulls)](https://cloud.docker.com/u/mythril/repository/docker/mythril/myth)
Mythril is a security analysis tool for EVM bytecode. It detects security vulnerabilities in smart contracts built for Ethereum, Hedera, Quorum, Vechain, Roostock, Tron and other EVM-compatible blockchains. It uses symbolic execution, SMT solving and taint analysis to detect a variety of security vulnerabilities. It's also used (in combination with other tools and techniques) in the [MythX](https://mythx.io) security analysis platform.
6 years ago
If you are a smart contract developer, we recommend using [MythX tools](https://github.com/b-mueller/awesome-mythx-smart-contract-security-tools) which are optimized for usability and cover a wider range of security issues.
6 years ago
6 years ago
Whether you want to contribute, need support, or want to learn what we have cooking for the future, our [Discord server](https://discord.gg/E3YrVtG) will serve your needs.
6 years ago
7 years ago
## Installation and setup
7 years ago
Get it with [Docker](https://www.docker.com):
7 years ago
```bash
$ docker pull mythril/myth
7 years ago
```
Merge to Master (#1680) * Fix error message (#1506) * Fix bug during checking potential issues (#1507) * Fix bug due to list.remove() in a loop * Mythril v0.22.25 * Add BASEFEE opcode (#1513) * Add BASEFEE opcode * Add test * Support Panic(uint256) calls for asserts in v0.8.0+ (#1514) * Support panic() asserts * Use typing extensions * Add typing extensions (#1516) * Mythril v0.22.26 * [WIP] Add safe function support (#1510) * Add safe functions cli * Add a change * Add tests * Change examples * Fix bytecode tests * Use last jump as source for yul mapping (#1518) * Mythril v0.22.27 * Fix issue with source mapping (#1526) * Fix issue with source mapping * Fix issues with deployedBytecode * Add typing * Refactor opcode files and fix issues (#1532) * Use symbol_factory (#1533) * Use symbol_factory * Black * Support native calls for delegatecall and callcode (#1534) * Fix issue with calldatasize (#1537) * Mythril v0.22.28 * Fix issue with integer arthimetic (#1541) * Fix issues with exceptions module (#1542) * Mythril v0.22.29 * Ignore plyvel (#1543) * Remove additional eth transfer (#1544) * Fix issues with out of index code (#1545) * Mythril v0.22.30 * Fixes issues by considering future concrete hashes (#1547) * Fix issues with hashing * Fix offsets and edge cases * Fix onchain storage access (#1548) * Fix issues with onsite storage access * Fix issue with copy * Fix issue with get_constraints (#1549) * Handle an edgecase from local host clients (#1550) * Handle an edgecase from local host clients * Fix eth-typing * Fix pyparsing (#1551) * Mythril v0.22.31 * Removes pyethereum Dependencies and leveldb libraries (#1555) * change versions * Move away from pyethereum dependency * Remove leveldb * Change requirements * Add rzpad() * Fix issues with sha3 * Fix sha3 edge cases * Fix setup.py * Restrict eth-utils * Restrict eth-typing * Fix py-ecc * Remove mythx analysis doc * Remove -l option from docs * Fix typing_extensions (#1556) * change versions * Move away from pyethereum dependency * Remove leveldb * Change requirements * Add rzpad() * Fix issues with sha3 * Fix sha3 edge cases * Fix setup.py * Restrict eth-utils * Restrict eth-typing * Fix py-ecc * Fix typing_extensions * Fix blake2bpy (#1557) * Fix case where loader is not present (#1558) * Use empty code to denote address (#1559) * Mythril v0.22.32 * Use concrete storage (#1562) * Support symbolic bytecode (#1560) * Support symbolic bytecode * Use hex notation * Handle swarm hash * Use requirements in setup (#1564) * Fix myth --version typo in docs (#1563) Co-authored-by: Nikhil Parasaram <nikhilparasaram@gmail.com> * Fixes issues with NoneType and restricts rlp version (#1567) * Fix when args are NoneType * Fix rlp * Fix creation case and use better error message (#1569) * Handle creation code * Fix eth-keys * Mythril v0.22.33 * Fix py-evm version (#1570) * Fix py-evm when it's in alpha * Downgrade py-evm * upgrade py-evm * remove py-evm restriction * Fix trie * Fix versions * Edit versions * Edit versions * Restrict versions * Remove eth-tester * add blake2b * Support multiple function names (#1571) * Fix the leaking file descriptor when returning a z3 smt check result (#1574) * Mythril v0.22.34 * Add more precompile tests (#1576) * Add tests for natives * Black updates * Update black * Refactor code (#1577) * clean up code * Update lolcat * Fixes issues with create with symbolic bytecode (#1578) * Handle cases when create get's symbolic bytecodes * Refactor * fix typing * Mythril v0.22.35 * Handle cases with symbolic bytecode (#1581) * Fix issues with string code * revert solc changes * Allow missing solc (#1582) * allow missing solc * reformatted * dummy commit Co-authored-by: mrx23dot <none> * Handle changes in allow-paths in solc versions 0.8.8+ (#1584) * Handle changes in allow-paths in solc versions 0.8.8+ * Add docker * Remove test * Mythril v0.22.36 * Update LICENSE (#1585) * Restrict eth-rlp, eth-keyfile (#1586) * Restrict eth-rlp * Restrict eth-keyfile * Helper functions for symbolic summaries (#1587) * Restrict eth-rlp * Restrict eth-keyfile * Add functions for summaries * Add some tweaks * Revert a change * Rewrite BaseArray class * Remove unused variable * Support Pragmas (#1591) * Support Pragmas * Fix MarkUpSafe * Stop Edelweiss temporarily (#1593) * Mythril v0.22.37 * Concolic tool (#1445) * Mythril v0.22.14 * Add trace plugin and find trace * Add finding trace * Add some changes * change help text * Add some comments * Add support for concolic strategy * Fix issues * Add concolic exec tool * Add a few fixes * Fix a few errors * Add tests * Fix test interface * Add muti flip test * Add multi contract test * Fix cases with multicontract calls * Add more tests and fixes * Fix tests * Fix mypy * Change tests and other small fixes * Add more documentation * Add some changes * Update mythril/concolic/find_trace.py Co-authored-by: JoranHonig <JoranHonig@users.noreply.github.com> * Remove space Co-authored-by: JoranHonig <JoranHonig@users.noreply.github.com> * Fix typing * Fix Review issues * Change test type * Remove deepcopy * Use 3.8 for typing * Use typing_extensions * Fix prev_state * Add changes to tests and fix some bugs * Fix address assignment * Fix issues and format * Remove set_option * Split plugins * Refactor Co-authored-by: JoranHonig <JoranHonig@users.noreply.github.com> * Mythril v0.22.38 * Fix issues with sqlite3 (#1594) * Mythril v0.22.14 * Add trace plugin and find trace * Add finding trace * Add some changes * change help text * Add some comments * Add support for concolic strategy * Fix issues * Add concolic exec tool * Add a few fixes * Fix a few errors * Add tests * Fix test interface * Add muti flip test * Add multi contract test * Fix cases with multicontract calls * Add more tests and fixes * Fix tests * Fix mypy * Change tests and other small fixes * Add more documentation * Add some changes * Update mythril/concolic/find_trace.py Co-authored-by: JoranHonig <JoranHonig@users.noreply.github.com> * Remove space Co-authored-by: JoranHonig <JoranHonig@users.noreply.github.com> * Fix typing * Fix Review issues * Change test type * Remove deepcopy * Use 3.8 for typing * Use typing_extensions * Fix prev_state * Add changes to tests and fix some bugs * Fix address assignment * Fix issues and format * Remove set_option * Split plugins * Refactor * Handle sqlite3 Co-authored-by: JoranHonig <JoranHonig@users.noreply.github.com> * Mythril v0.22.39 * Init config dir (#1595) * Mythril v0.22.40 * Fixes optimizer issue (#1597) * Init config dir * Fix solc optimizer * Mythril v0.22.41 * Handle constructor edge case (#1600) * Init config dir * Fix solc optimizer * Handle constructor edge case * Fix NPM code block issue (#1602) * Init config dir * Fix solc optimizer * Fix NPM code block issue * Extend tests * Beam search (#1606) * Init config dir * Fix solc optimizer * Add beam search * Use dict over reference * Change default execution time * Support TX constraints and refactor CLI (#1607) * Support TX constraints and refactor CLI * Fix typing * Add additional typing * Use dict over accessor * Fix z3py requirements * Init storage args * Init storage args * Init args in vm tests * Unrestrict z3 to 4.8.15.0 (#1608) * Mythril v0.22.42 * Fix caching of issues across modules (#1610) * Fix caching of issues across modules * Fix caching of issues across modules * Remove logging (#1611) * Fix caching of issues across modules * Fix caching of issues across modules * Use log.info * Merge * remove comment * Check versions before using integer module (#1613) * use more secure approach to call docker (#1614) * Mythril v0.22.43 * Use better issue annotations for search (#1615) * Check versions before using integer module * Use IssueAnnotations * Fix misc issues related to summaries (#1617) * Check versions before using integer module * Use IssueAnnotations * Fix misc issues with summaries * Fix issue with cache during summaries (#1619) * Check versions before using integer module * Use IssueAnnotations * Fix misc issues with summaries * Fix cache issue * Fix safe functions * dead link (#1616) * Fix issue with PluginSkipState (#1620) * Check versions before using integer module * Use IssueAnnotations * Fix misc issues with summaries * Fix cache issue * Fix safe functions * Fix issue with PluginSkipState * Update black * Mythril v0.23.0 * fixed module links in documentation (#1622) * Use int argument (#1625) * remove depth for jump (#1628) * Use a more precise modeling of return data (#1630) * remove depth for jump * Use a more precise modeling of return data * Fix issues with lists * Fix issues * Fix misc issues (#1631) * remove depth for jump * Use a more precise modeling of return data * Fix issues with lists * Fix issues * Fix misc issues * Mythril v0.23.1 * Correct comment (#1632) * Correct comment * Update bitvec_helper.py * Fix caching for exceptions module (#1633) * Fix loop bound and other instruction performance issues (#1635) * Fix caching for exceptions module * Fix loop bound and other instruction performance issues * Remove unused variable * Increase loop bound * Mythril v0.23.2 * Handle CRLF line endings (#1637) * Handle CRLF line endings * Add new line at the end of file * Typo: External Calls now states correctly SWC-107 (#1639) External Calls mentioned *SWC-117* but links (corrrectly) to SWC-107, fixed typo to *SWC-107* * Fix Bitvec issue (#1641) * Fix issues with Bitvec (#1642) * Fix Bitvec issue * Fix issues with Bitvec * Mythril v0.23.3 * Use latest blake2bpy, Fix version extraction (#1644) * Use latest blake2bpy, Fix version extraction * Fix setup.py * Handle setup.py * Handle setup.py * Handle setup.py * Fix requirements * Fix requirements * Fix requirements * restrict eth-hash * Support py36 through py39 (#1646) * Support py36 through py39 * Remove usage of cytoolz * Update tox * Add a get set for summaries (#1647) * Support py36 through py39 * Remove usage of cytoolz * Update tox * Add a get set for summaries * Mythril v0.23.4 * Deepcopy storage load and store sets (#1648) * Support py36 through py39 * Remove usage of cytoolz * Update tox * Add a get set for summaries * Support get/set * Restrict cytoolz * Move cytoolz up the dependency list * Move cytoolz up the dependency list * Fix CI (#1651) * Support py36 through py39 * Remove usage of cytoolz * Update tox * Add a get set for summaries * Support get/set * Restrict cytoolz * Move cytoolz up the dependency list * Move cytoolz up the dependency list * Add cython * Black * Remove from requirements * Add cython * Remove cython from setup * Remove cython from setup * Add cython * set cytoolz version * Add support for locking config file (#1652) * Add support for locking config file * Remove abi decode test * Fix typo * Mythril v0.23.5 * Fix issues with arbitrary jump dest (#1654) * Add partial abi support (#1655) * Fix issues with arbitrary jump dest * Support abi * Add partial abi support * Fix test * Fix test directory * Mythril v0.23.6 * Update Readme * Fix OOG issue (#1658) * Fix issues with arbitrary jump dest * Support abi * Add partial abi support * Fix test * Fix test directory * Fix OOG issue * Fix issue with simplify (#1660) * Fix issues with arbitrary jump dest * Support abi * Add partial abi support * Fix test * Fix test directory * Fix OOG issue * Fix issue with simplify * Fix typo * Fix imports for python 3.10 (#1661) * Fix issues with arbitrary jump dest * Support abi * Add partial abi support * Fix test * Fix test directory * Fix OOG issue * Fix issue with simplify * Fix typo * Fix import * Refactor * Add exit code (#1662) * Add exit code * Fix tests * Remove additional python runs in tox (#1663) Since `geth` gets killed by CI after some time, it is better to run only the necessary python versions. * Update docs and Add tutorial (#1664) * Add exit code * Update docs with tutorial * Fix docs * Reformat * Mythril v0.23.7 (#1665) * Handles issue with low constructor loop bound and new way to deal with solver-timeout (#1668) * Add exit code * Update docs with tutorial * Fix docs * Reformat * Fix the issue with loop-bound and solver-timeout * Add test changes * Restrict hexbytes * Mythril v0.23.8 (#1669) * last_jump has type `int` but is used as type `None`. (#1670) * last_jump has type `int` but is used as type `None`. "filename": "mythril/analysis/module/modules/exceptions.py" "warning_type": "Incompatible variable type [9]" "warning_message": " last_jump is declared to have type `int` but is used as type `None`." "warning_line": 28 "fix": None to 0 * Update exceptions.py * Fix typo * Add import Co-authored-by: Nikhil Parasaram <tommycjniko@gmail.com> Co-authored-by: norhh <nikhilparasaram@gmail.com> * Handle issues with simplify (#1674) * Add exit code * Update docs with tutorial * Fix docs * Reformat * Fix the issue with loop-bound and solver-timeout * Add test changes * Restrict hexbytes * Use solver over simplify * Handle OOG during CALL (#1675) * Mythril v0.23.9 Co-authored-by: Peilin Zheng <tczpl@163.com> Co-authored-by: Sir Hashalot <95114813+sirhashalot@users.noreply.github.com> Co-authored-by: Iaroslav Zeigerman <zeigerman.ia@gmail.com> Co-authored-by: Kis Gabor <mrx23dot@users.noreply.github.com> Co-authored-by: Serafim Cloud <55061526+serafimcloud@users.noreply.github.com> Co-authored-by: JoranHonig <JoranHonig@users.noreply.github.com> Co-authored-by: shafu.eth <selfouly@gmail.com> Co-authored-by: Zach Obront <zobront@gmail.com> Co-authored-by: 72521 <ysl47698@gmail.com> Co-authored-by: Christian <christiancattai@gmail.com> Co-authored-by: Luca Di Grazia <luca.digrazia94@gmail.com>
2 years ago
Install from Pypi (Python 3.6-3.9):
7 years ago
```bash
7 years ago
$ pip3 install mythril
```
7 years ago
See the [docs](https://mythril-classic.readthedocs.io/en/master/installation.html) for more detailed instructions.
7 years ago
## Usage
5 years ago
Run:
```
$ myth analyze <solidity-file>
```
Or:
```
$ myth analyze -a <contract-address>
```
Merge to Master (#1680) * Fix error message (#1506) * Fix bug during checking potential issues (#1507) * Fix bug due to list.remove() in a loop * Mythril v0.22.25 * Add BASEFEE opcode (#1513) * Add BASEFEE opcode * Add test * Support Panic(uint256) calls for asserts in v0.8.0+ (#1514) * Support panic() asserts * Use typing extensions * Add typing extensions (#1516) * Mythril v0.22.26 * [WIP] Add safe function support (#1510) * Add safe functions cli * Add a change * Add tests * Change examples * Fix bytecode tests * Use last jump as source for yul mapping (#1518) * Mythril v0.22.27 * Fix issue with source mapping (#1526) * Fix issue with source mapping * Fix issues with deployedBytecode * Add typing * Refactor opcode files and fix issues (#1532) * Use symbol_factory (#1533) * Use symbol_factory * Black * Support native calls for delegatecall and callcode (#1534) * Fix issue with calldatasize (#1537) * Mythril v0.22.28 * Fix issue with integer arthimetic (#1541) * Fix issues with exceptions module (#1542) * Mythril v0.22.29 * Ignore plyvel (#1543) * Remove additional eth transfer (#1544) * Fix issues with out of index code (#1545) * Mythril v0.22.30 * Fixes issues by considering future concrete hashes (#1547) * Fix issues with hashing * Fix offsets and edge cases * Fix onchain storage access (#1548) * Fix issues with onsite storage access * Fix issue with copy * Fix issue with get_constraints (#1549) * Handle an edgecase from local host clients (#1550) * Handle an edgecase from local host clients * Fix eth-typing * Fix pyparsing (#1551) * Mythril v0.22.31 * Removes pyethereum Dependencies and leveldb libraries (#1555) * change versions * Move away from pyethereum dependency * Remove leveldb * Change requirements * Add rzpad() * Fix issues with sha3 * Fix sha3 edge cases * Fix setup.py * Restrict eth-utils * Restrict eth-typing * Fix py-ecc * Remove mythx analysis doc * Remove -l option from docs * Fix typing_extensions (#1556) * change versions * Move away from pyethereum dependency * Remove leveldb * Change requirements * Add rzpad() * Fix issues with sha3 * Fix sha3 edge cases * Fix setup.py * Restrict eth-utils * Restrict eth-typing * Fix py-ecc * Fix typing_extensions * Fix blake2bpy (#1557) * Fix case where loader is not present (#1558) * Use empty code to denote address (#1559) * Mythril v0.22.32 * Use concrete storage (#1562) * Support symbolic bytecode (#1560) * Support symbolic bytecode * Use hex notation * Handle swarm hash * Use requirements in setup (#1564) * Fix myth --version typo in docs (#1563) Co-authored-by: Nikhil Parasaram <nikhilparasaram@gmail.com> * Fixes issues with NoneType and restricts rlp version (#1567) * Fix when args are NoneType * Fix rlp * Fix creation case and use better error message (#1569) * Handle creation code * Fix eth-keys * Mythril v0.22.33 * Fix py-evm version (#1570) * Fix py-evm when it's in alpha * Downgrade py-evm * upgrade py-evm * remove py-evm restriction * Fix trie * Fix versions * Edit versions * Edit versions * Restrict versions * Remove eth-tester * add blake2b * Support multiple function names (#1571) * Fix the leaking file descriptor when returning a z3 smt check result (#1574) * Mythril v0.22.34 * Add more precompile tests (#1576) * Add tests for natives * Black updates * Update black * Refactor code (#1577) * clean up code * Update lolcat * Fixes issues with create with symbolic bytecode (#1578) * Handle cases when create get's symbolic bytecodes * Refactor * fix typing * Mythril v0.22.35 * Handle cases with symbolic bytecode (#1581) * Fix issues with string code * revert solc changes * Allow missing solc (#1582) * allow missing solc * reformatted * dummy commit Co-authored-by: mrx23dot <none> * Handle changes in allow-paths in solc versions 0.8.8+ (#1584) * Handle changes in allow-paths in solc versions 0.8.8+ * Add docker * Remove test * Mythril v0.22.36 * Update LICENSE (#1585) * Restrict eth-rlp, eth-keyfile (#1586) * Restrict eth-rlp * Restrict eth-keyfile * Helper functions for symbolic summaries (#1587) * Restrict eth-rlp * Restrict eth-keyfile * Add functions for summaries * Add some tweaks * Revert a change * Rewrite BaseArray class * Remove unused variable * Support Pragmas (#1591) * Support Pragmas * Fix MarkUpSafe * Stop Edelweiss temporarily (#1593) * Mythril v0.22.37 * Concolic tool (#1445) * Mythril v0.22.14 * Add trace plugin and find trace * Add finding trace * Add some changes * change help text * Add some comments * Add support for concolic strategy * Fix issues * Add concolic exec tool * Add a few fixes * Fix a few errors * Add tests * Fix test interface * Add muti flip test * Add multi contract test * Fix cases with multicontract calls * Add more tests and fixes * Fix tests * Fix mypy * Change tests and other small fixes * Add more documentation * Add some changes * Update mythril/concolic/find_trace.py Co-authored-by: JoranHonig <JoranHonig@users.noreply.github.com> * Remove space Co-authored-by: JoranHonig <JoranHonig@users.noreply.github.com> * Fix typing * Fix Review issues * Change test type * Remove deepcopy * Use 3.8 for typing * Use typing_extensions * Fix prev_state * Add changes to tests and fix some bugs * Fix address assignment * Fix issues and format * Remove set_option * Split plugins * Refactor Co-authored-by: JoranHonig <JoranHonig@users.noreply.github.com> * Mythril v0.22.38 * Fix issues with sqlite3 (#1594) * Mythril v0.22.14 * Add trace plugin and find trace * Add finding trace * Add some changes * change help text * Add some comments * Add support for concolic strategy * Fix issues * Add concolic exec tool * Add a few fixes * Fix a few errors * Add tests * Fix test interface * Add muti flip test * Add multi contract test * Fix cases with multicontract calls * Add more tests and fixes * Fix tests * Fix mypy * Change tests and other small fixes * Add more documentation * Add some changes * Update mythril/concolic/find_trace.py Co-authored-by: JoranHonig <JoranHonig@users.noreply.github.com> * Remove space Co-authored-by: JoranHonig <JoranHonig@users.noreply.github.com> * Fix typing * Fix Review issues * Change test type * Remove deepcopy * Use 3.8 for typing * Use typing_extensions * Fix prev_state * Add changes to tests and fix some bugs * Fix address assignment * Fix issues and format * Remove set_option * Split plugins * Refactor * Handle sqlite3 Co-authored-by: JoranHonig <JoranHonig@users.noreply.github.com> * Mythril v0.22.39 * Init config dir (#1595) * Mythril v0.22.40 * Fixes optimizer issue (#1597) * Init config dir * Fix solc optimizer * Mythril v0.22.41 * Handle constructor edge case (#1600) * Init config dir * Fix solc optimizer * Handle constructor edge case * Fix NPM code block issue (#1602) * Init config dir * Fix solc optimizer * Fix NPM code block issue * Extend tests * Beam search (#1606) * Init config dir * Fix solc optimizer * Add beam search * Use dict over reference * Change default execution time * Support TX constraints and refactor CLI (#1607) * Support TX constraints and refactor CLI * Fix typing * Add additional typing * Use dict over accessor * Fix z3py requirements * Init storage args * Init storage args * Init args in vm tests * Unrestrict z3 to 4.8.15.0 (#1608) * Mythril v0.22.42 * Fix caching of issues across modules (#1610) * Fix caching of issues across modules * Fix caching of issues across modules * Remove logging (#1611) * Fix caching of issues across modules * Fix caching of issues across modules * Use log.info * Merge * remove comment * Check versions before using integer module (#1613) * use more secure approach to call docker (#1614) * Mythril v0.22.43 * Use better issue annotations for search (#1615) * Check versions before using integer module * Use IssueAnnotations * Fix misc issues related to summaries (#1617) * Check versions before using integer module * Use IssueAnnotations * Fix misc issues with summaries * Fix issue with cache during summaries (#1619) * Check versions before using integer module * Use IssueAnnotations * Fix misc issues with summaries * Fix cache issue * Fix safe functions * dead link (#1616) * Fix issue with PluginSkipState (#1620) * Check versions before using integer module * Use IssueAnnotations * Fix misc issues with summaries * Fix cache issue * Fix safe functions * Fix issue with PluginSkipState * Update black * Mythril v0.23.0 * fixed module links in documentation (#1622) * Use int argument (#1625) * remove depth for jump (#1628) * Use a more precise modeling of return data (#1630) * remove depth for jump * Use a more precise modeling of return data * Fix issues with lists * Fix issues * Fix misc issues (#1631) * remove depth for jump * Use a more precise modeling of return data * Fix issues with lists * Fix issues * Fix misc issues * Mythril v0.23.1 * Correct comment (#1632) * Correct comment * Update bitvec_helper.py * Fix caching for exceptions module (#1633) * Fix loop bound and other instruction performance issues (#1635) * Fix caching for exceptions module * Fix loop bound and other instruction performance issues * Remove unused variable * Increase loop bound * Mythril v0.23.2 * Handle CRLF line endings (#1637) * Handle CRLF line endings * Add new line at the end of file * Typo: External Calls now states correctly SWC-107 (#1639) External Calls mentioned *SWC-117* but links (corrrectly) to SWC-107, fixed typo to *SWC-107* * Fix Bitvec issue (#1641) * Fix issues with Bitvec (#1642) * Fix Bitvec issue * Fix issues with Bitvec * Mythril v0.23.3 * Use latest blake2bpy, Fix version extraction (#1644) * Use latest blake2bpy, Fix version extraction * Fix setup.py * Handle setup.py * Handle setup.py * Handle setup.py * Fix requirements * Fix requirements * Fix requirements * restrict eth-hash * Support py36 through py39 (#1646) * Support py36 through py39 * Remove usage of cytoolz * Update tox * Add a get set for summaries (#1647) * Support py36 through py39 * Remove usage of cytoolz * Update tox * Add a get set for summaries * Mythril v0.23.4 * Deepcopy storage load and store sets (#1648) * Support py36 through py39 * Remove usage of cytoolz * Update tox * Add a get set for summaries * Support get/set * Restrict cytoolz * Move cytoolz up the dependency list * Move cytoolz up the dependency list * Fix CI (#1651) * Support py36 through py39 * Remove usage of cytoolz * Update tox * Add a get set for summaries * Support get/set * Restrict cytoolz * Move cytoolz up the dependency list * Move cytoolz up the dependency list * Add cython * Black * Remove from requirements * Add cython * Remove cython from setup * Remove cython from setup * Add cython * set cytoolz version * Add support for locking config file (#1652) * Add support for locking config file * Remove abi decode test * Fix typo * Mythril v0.23.5 * Fix issues with arbitrary jump dest (#1654) * Add partial abi support (#1655) * Fix issues with arbitrary jump dest * Support abi * Add partial abi support * Fix test * Fix test directory * Mythril v0.23.6 * Update Readme * Fix OOG issue (#1658) * Fix issues with arbitrary jump dest * Support abi * Add partial abi support * Fix test * Fix test directory * Fix OOG issue * Fix issue with simplify (#1660) * Fix issues with arbitrary jump dest * Support abi * Add partial abi support * Fix test * Fix test directory * Fix OOG issue * Fix issue with simplify * Fix typo * Fix imports for python 3.10 (#1661) * Fix issues with arbitrary jump dest * Support abi * Add partial abi support * Fix test * Fix test directory * Fix OOG issue * Fix issue with simplify * Fix typo * Fix import * Refactor * Add exit code (#1662) * Add exit code * Fix tests * Remove additional python runs in tox (#1663) Since `geth` gets killed by CI after some time, it is better to run only the necessary python versions. * Update docs and Add tutorial (#1664) * Add exit code * Update docs with tutorial * Fix docs * Reformat * Mythril v0.23.7 (#1665) * Handles issue with low constructor loop bound and new way to deal with solver-timeout (#1668) * Add exit code * Update docs with tutorial * Fix docs * Reformat * Fix the issue with loop-bound and solver-timeout * Add test changes * Restrict hexbytes * Mythril v0.23.8 (#1669) * last_jump has type `int` but is used as type `None`. (#1670) * last_jump has type `int` but is used as type `None`. "filename": "mythril/analysis/module/modules/exceptions.py" "warning_type": "Incompatible variable type [9]" "warning_message": " last_jump is declared to have type `int` but is used as type `None`." "warning_line": 28 "fix": None to 0 * Update exceptions.py * Fix typo * Add import Co-authored-by: Nikhil Parasaram <tommycjniko@gmail.com> Co-authored-by: norhh <nikhilparasaram@gmail.com> * Handle issues with simplify (#1674) * Add exit code * Update docs with tutorial * Fix docs * Reformat * Fix the issue with loop-bound and solver-timeout * Add test changes * Restrict hexbytes * Use solver over simplify * Handle OOG during CALL (#1675) * Mythril v0.23.9 Co-authored-by: Peilin Zheng <tczpl@163.com> Co-authored-by: Sir Hashalot <95114813+sirhashalot@users.noreply.github.com> Co-authored-by: Iaroslav Zeigerman <zeigerman.ia@gmail.com> Co-authored-by: Kis Gabor <mrx23dot@users.noreply.github.com> Co-authored-by: Serafim Cloud <55061526+serafimcloud@users.noreply.github.com> Co-authored-by: JoranHonig <JoranHonig@users.noreply.github.com> Co-authored-by: shafu.eth <selfouly@gmail.com> Co-authored-by: Zach Obront <zobront@gmail.com> Co-authored-by: 72521 <ysl47698@gmail.com> Co-authored-by: Christian <christiancattai@gmail.com> Co-authored-by: Luca Di Grazia <luca.digrazia94@gmail.com>
2 years ago
Specify the maximum number of transaction to explore with `-t <number>`. You can also set a timeout with `--execution-timeout <seconds>`.
5 years ago
```
5 years ago
> myth a killbilly.sol -t 3
5 years ago
==== Unprotected Selfdestruct ====
SWC ID: 106
Severity: High
Contract: KillBilly
Function name: commencekilling()
5 years ago
PC address: 354
Estimated Gas Usage: 574 - 999
5 years ago
The contract can be killed by anyone.
Anyone can kill this contract and withdraw its balance to an arbitrary address.
--------------------
In file: killbilly.sol:22
selfdestruct(msg.sender)
--------------------
Transaction Sequence:
Caller: [CREATOR], data: [CONTRACT CREATION], value: 0x0
5 years ago
Caller: [ATTACKER], function: killerize(address), txdata: 0x9fa299ccbebebebebebebebebebebebedeadbeefdeadbeefdeadbeefdeadbeefdeadbeef, value: 0x0
Caller: [ATTACKER], function: activatekillability(), txdata: 0x84057065, value: 0x0
5 years ago
Caller: [ATTACKER], function: commencekilling(), txdata: 0x7c11da20, value: 0x0
```
Instructions for using Mythril are found on the [docs](https://mythril-classic.readthedocs.io/en/master/).
For support or general discussions please join the Mythril community on [Discord](https://discord.gg/E3YrVtG).
6 years ago
## Building the Documentation
Mythril's documentation is contained in the `docs` folder and is published to [Read the Docs](https://mythril-classic.readthedocs.io/en/develop/). It is based on Sphinx and can be built using the Makefile contained in the subdirectory:
```
cd docs
make html
```
This will create a `build` output directory containing the HTML output. Alternatively, PDF documentation can be built with `make latexpdf`. The available output format options can be seen with `make help`.
6 years ago
## Vulnerability Remediation
Visit the [Smart Contract Vulnerability Classification Registry](https://swcregistry.io/) to find detailed information and remediation guidance for the vulnerabilities reported.