mythril


Namemythril JSON
Version 0.24.8 PyPI version JSON
download
home_pagehttps://github.com/ConsenSys/mythril
SummarySecurity analysis tool for Ethereum smart contracts
upload_time2024-03-27 22:32:08
maintainerNone
docs_urlNone
authorConsenSys Dilligence
requires_python>=3.7.0
licenseMIT
keywords hacking disassembler security ethereum
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            
# Mythril

<p align="center">
	<img src="/static/mythril_new.png" height="320px"/>
</p>

[![Discord](https://img.shields.io/discord/697535391594446898)](https://discord.com/channels/697535391594446898/712829485350649886)
[![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/develop/)
[![CircleCI](https://dl.circleci.com/status-badge/img/gh/Consensys/mythril/tree/develop.svg?style=shield&circle-token=fd6738fd235f6c2d8e10234259090e3b05190d0e)](https://dl.circleci.com/status-badge/redirect/gh/Consensys/mythril/tree/develop)
[![Sonarcloud - Maintainability](https://sonarcloud.io/api/project_badges/measure?project=mythril&metric=sqale_rating)](https://sonarcloud.io/dashboard?id=mythril)
[![Pypi Installs](https://static.pepy.tech/badge/mythril)](https://pepy.tech/project/mythril)
[![DockerHub Pulls](https://img.shields.io/docker/pulls/mythril/myth.svg)](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.

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.

Whether you want to contribute, need support, or want to learn what we have cooking for the future, you can checkout diligence-mythx channel in [ConsenSys Discord server](https://discord.gg/consensys).

## Installation and setup

Get it with [Docker](https://www.docker.com):

```bash
$ docker pull mythril/myth
```

Install from Pypi (Python 3.7-3.10):

```bash
$ pip3 install mythril
```

See the [docs](https://mythril-classic.readthedocs.io/en/master/installation.html) for more detailed instructions. 

## Usage

Run:

```
$ myth analyze <solidity-file>
```

Or:

```
$ myth analyze -a <contract-address>
```

Specify the maximum number of transactions to explore with `-t <number>`. You can also set a timeout with `--execution-timeout <seconds>`.

Here is an example of running Mythril on the file `killbilly.sol` which is in the `solidity_examples` directory for `3` transactions:

```
> 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

```


Instructions for using Mythril are found on the [docs](https://mythril-classic.readthedocs.io/en/develop/). 

For support or general discussions please checkout [diligence-mythx channel](https://discord.com/channels/697535391594446898/712829485350649886) in [ConsenSys Discord server](https://discord.gg/consensys)..

## 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`.

## Vulnerability Remediation

Visit the [Smart Contract Vulnerability Classification Registry](https://swcregistry.io/) to find detailed information and remediation guidance for the vulnerabilities reported.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/ConsenSys/mythril",
    "name": "mythril",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.7.0",
    "maintainer_email": null,
    "keywords": "hacking disassembler security ethereum",
    "author": "ConsenSys Dilligence",
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/0e/9d/52478275d6b6c1f6f662634de7e53e9a4005d44226764dd59c7718f0b0db/mythril-0.24.8.tar.gz",
    "platform": null,
    "description": "\n# Mythril\n\n<p align=\"center\">\n\t<img src=\"/static/mythril_new.png\" height=\"320px\"/>\n</p>\n\n[![Discord](https://img.shields.io/discord/697535391594446898)](https://discord.com/channels/697535391594446898/712829485350649886)\n[![PyPI](https://badge.fury.io/py/mythril.svg)](https://pypi.python.org/pypi/mythril)\n[![Read the Docs](https://readthedocs.org/projects/mythril-classic/badge/?version=master)](https://mythril-classic.readthedocs.io/en/develop/)\n[![CircleCI](https://dl.circleci.com/status-badge/img/gh/Consensys/mythril/tree/develop.svg?style=shield&circle-token=fd6738fd235f6c2d8e10234259090e3b05190d0e)](https://dl.circleci.com/status-badge/redirect/gh/Consensys/mythril/tree/develop)\n[![Sonarcloud - Maintainability](https://sonarcloud.io/api/project_badges/measure?project=mythril&metric=sqale_rating)](https://sonarcloud.io/dashboard?id=mythril)\n[![Pypi Installs](https://static.pepy.tech/badge/mythril)](https://pepy.tech/project/mythril)\n[![DockerHub Pulls](https://img.shields.io/docker/pulls/mythril/myth.svg)](https://cloud.docker.com/u/mythril/repository/docker/mythril/myth)\n\nMythril 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.\n\nIf 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.\n\nWhether you want to contribute, need support, or want to learn what we have cooking for the future, you can checkout diligence-mythx channel in [ConsenSys Discord server](https://discord.gg/consensys).\n\n## Installation and setup\n\nGet it with [Docker](https://www.docker.com):\n\n```bash\n$ docker pull mythril/myth\n```\n\nInstall from Pypi (Python 3.7-3.10):\n\n```bash\n$ pip3 install mythril\n```\n\nSee the [docs](https://mythril-classic.readthedocs.io/en/master/installation.html) for more detailed instructions. \n\n## Usage\n\nRun:\n\n```\n$ myth analyze <solidity-file>\n```\n\nOr:\n\n```\n$ myth analyze -a <contract-address>\n```\n\nSpecify the maximum number of transactions to explore with `-t <number>`. You can also set a timeout with `--execution-timeout <seconds>`.\n\nHere is an example of running Mythril on the file `killbilly.sol` which is in the `solidity_examples` directory for `3` transactions:\n\n```\n> myth a killbilly.sol -t 3\n==== Unprotected Selfdestruct ====\nSWC ID: 106\nSeverity: High\nContract: KillBilly\nFunction name: commencekilling()\nPC address: 354\nEstimated Gas Usage: 974 - 1399\nAny sender can cause the contract to self-destruct.\nAny 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.\n--------------------\nIn file: killbilly.sol:22\n\nselfdestruct(msg.sender)\n\n--------------------\nInitial State:\n\nAccount: [CREATOR], balance: 0x2, nonce:0, storage:{}\nAccount: [ATTACKER], balance: 0x1001, nonce:0, storage:{}\n\nTransaction Sequence:\n\nCaller: [CREATOR], calldata: , decoded_data: , value: 0x0\nCaller: [ATTACKER], function: killerize(address), txdata: 0x9fa299cc000000000000000000000000deadbeefdeadbeefdeadbeefdeadbeefdeadbeef, decoded_data: ('0xdeadbeefdeadbeefdeadbeefdeadbeefdeadbeef',), value: 0x0\nCaller: [ATTACKER], function: activatekillability(), txdata: 0x84057065, value: 0x0\nCaller: [ATTACKER], function: commencekilling(), txdata: 0x7c11da20, value: 0x0\n\n```\n\n\nInstructions for using Mythril are found on the [docs](https://mythril-classic.readthedocs.io/en/develop/). \n\nFor support or general discussions please checkout [diligence-mythx channel](https://discord.com/channels/697535391594446898/712829485350649886) in [ConsenSys Discord server](https://discord.gg/consensys)..\n\n## Building the Documentation\nMythril'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:\n\n```\ncd docs\nmake html\n```\n\nThis 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`.\n\n## Vulnerability Remediation\n\nVisit the [Smart Contract Vulnerability Classification Registry](https://swcregistry.io/) to find detailed information and remediation guidance for the vulnerabilities reported.\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Security analysis tool for Ethereum smart contracts",
    "version": "0.24.8",
    "project_urls": {
        "Homepage": "https://github.com/ConsenSys/mythril"
    },
    "split_keywords": [
        "hacking",
        "disassembler",
        "security",
        "ethereum"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "0e9d52478275d6b6c1f6f662634de7e53e9a4005d44226764dd59c7718f0b0db",
                "md5": "2b45a8408fdc539f41b353115a573ce1",
                "sha256": "6631ffaad0342c9b2a6b82dbe12106ab38512be45b6c8e0a364e9d4cb146874a"
            },
            "downloads": -1,
            "filename": "mythril-0.24.8.tar.gz",
            "has_sig": false,
            "md5_digest": "2b45a8408fdc539f41b353115a573ce1",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7.0",
            "size": 4561643,
            "upload_time": "2024-03-27T22:32:08",
            "upload_time_iso_8601": "2024-03-27T22:32:08.581343Z",
            "url": "https://files.pythonhosted.org/packages/0e/9d/52478275d6b6c1f6f662634de7e53e9a4005d44226764dd59c7718f0b0db/mythril-0.24.8.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-03-27 22:32:08",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "ConsenSys",
    "github_project": "mythril",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "circle": true,
    "requirements": [],
    "tox": true,
    "lcname": "mythril"
}
        
Elapsed time: 0.21780s