Skip to main content

An EVM symbolic execution tool and vulnerability scanner

Project description

Pakala

PyPI Build States

"ilo Pakala li pakala e mani sona"

  • Pakala is a tool to search for exploitable bugs in Ethereum smart contracts.
  • Pakala is a symbolic execution engine for the Ethereum Virtual Machine.

The intended public for the tool are security researchers interested by Ethereum / the EVM.

Installation

pip3 install pakala

It works only with python 3.

Usage

Let's look at 0x612f1BDbe93523b7f5036EfA87493B76341726E3: the constructor doesn't have the same name as the contract. Anybody can call HT() and become owner, then call withdraw.

Let's scan it:

./pakala.py 0x612f1BDbe93523b7f5036EfA87493B76341726E3 --force-balance="1 ether"

The contract balance being 0, we won't be able to have it send us some ethers. So we override the balance to be 1 ETH: then it has some "virtual" money to send us.

The tool with tell you a bug was found, and dump you a path of "states". Each state corresponds to a transaction, with constraints that needs to be respected for that code path to be taken, storage that has been read/written...

Advice: look at calldata[0] in the constraints to see the function signature for each transaction.

See ./pakala.py help for more complete usage information.

How does it works? What does it do?

See the introductory article for more information and a demo.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pakala-1.0.4.tar.gz (28.1 kB view details)

Uploaded Source

Built Distribution

pakala-1.0.4-py3-none-any.whl (33.7 kB view details)

Uploaded Python 3

File details

Details for the file pakala-1.0.4.tar.gz.

File metadata

  • Download URL: pakala-1.0.4.tar.gz
  • Upload date:
  • Size: 28.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.1 setuptools/40.6.2 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.1

File hashes

Hashes for pakala-1.0.4.tar.gz
Algorithm Hash digest
SHA256 016102923dc5688ce5ec64b919e32af91e47c8ed5eebed89f7ce3009e168947b
MD5 67fb23d72dd03a3a7b9a2ae7edcaae0f
BLAKE2b-256 78f8d1922489cadabf37503ee74dcc77d9c8b466b4b0d3ce4499663e949e4e95

See more details on using hashes here.

File details

Details for the file pakala-1.0.4-py3-none-any.whl.

File metadata

  • Download URL: pakala-1.0.4-py3-none-any.whl
  • Upload date:
  • Size: 33.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.1 setuptools/40.6.2 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.1

File hashes

Hashes for pakala-1.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 354615281da1807a16d3c6e7de4f95d294a5bbb74b108d7c7a0f6038f0373fef
MD5 8189ae6f49b1dc8ab9586d9c14d8be09
BLAKE2b-256 ec8b83d67cff023ff856772ec820eeb886f67d9aed27272aa7ac118891e891c1

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page