pakala-master

所属分类:Windows编程
开发工具:WINDOWS
文件大小:59KB
下载次数:0
上传日期:2020-06-02 17:46:52
上 传 者scQrp
说明:  pakala master software

文件列表:
.circleci (0, 2020-02-18)
.circleci\config.yml (1374, 2020-02-18)
.flake8 (30, 2020-02-18)
LICENSE.txt (32473, 2020-02-18)
pakala (0, 2020-02-18)
pakala\__init__.py (0, 2020-02-18)
pakala\analyzer.py (7961, 2020-02-18)
pakala\claripy_sha3.py (10383, 2020-02-18)
pakala\cli.py (8253, 2020-02-18)
pakala\env.py (3208, 2020-02-18)
pakala\memory.py (5663, 2020-02-18)
pakala\recursive_analyzer.py (9244, 2020-02-18)
pakala\sm.py (34140, 2020-02-18)
pakala\state.py (5593, 2020-02-18)
pakala\summary.py (3256, 2020-02-18)
pakala\test_analyzer.py (7538, 2020-02-18)
pakala\test_claripy_sha3.py (9517, 2020-02-18)
pakala\test_env.py (601, 2020-02-18)
pakala\test_memory.py (6543, 2020-02-18)
pakala\test_recursive_analyzer.py (13696, 2020-02-18)
pakala\test_sm.py (22383, 2020-02-18)
pakala\test_state.py (1847, 2020-02-18)
pakala\utils.py (924, 2020-02-18)
requirements.txt (88, 2020-02-18)
setup.py (1476, 2020-02-18)
solidity_tests (0, 2020-02-18)
solidity_tests\__init__.py (0, 2020-02-18)
solidity_tests\arbitrary_storage_write.sol (436, 2020-02-18)
solidity_tests\arbitrary_storage_write2.sol (397, 2020-02-18)
solidity_tests\array_write.sol (550, 2020-02-18)
solidity_tests\constructor_wrongly_named.sol (631, 2020-02-18)
solidity_tests\delegatecall.sol (202, 2020-02-18)
solidity_tests\mapping.sol (1112, 2020-02-18)
solidity_tests\mapping2.sol (765, 2020-02-18)
solidity_tests\multiple_write_multiple_tx.sol (263, 2020-02-18)
solidity_tests\multiple_write_one_tx.sol (345, 2020-02-18)
solidity_tests\recursive_mapping.sol (859, 2020-02-18)
... ...

Pakala ====== [![PyPI](https://badge.fury.io/py/pakala.svg)](https://pypi.python.org/pypi/pakala) [![Build States](https://circleci.com/gh/palkeo/pakala.svg?style=svg)](https://circleci.com/gh/palkeo/pakala) *"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 [0xeBE6c7a839A660a0F04BdF6816e2eA182F5d542C](http://eveem.com/code/0xeBE6c7a839A660a0F04BdF6816e2eA182F5d542C): it has a ``transfer(address _to, uint256 _value)`` function. It is supposedly protected by a ``require(call.value - _value) >= 0`` but that condition always holds because we are substracting two unsigned integers, so the result is also an unsigned integer. Let's scan it: ``` pakala 0xeBE6c7a839A660a0F04BdF6816e2eA182F5d542C --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 help`` for more complete usage information. How does it works? What does it do? ----------------------------------- See the [introductory article](https://www.palkeo.com/projets/ethereum/pakala.html) for more information and a demo. In a nutshell: * It's very good at finding simple bugs in simple contracts. * The false-positive rate is very low. If it flags your contract it's likely people can drain it. * It can exploit non-trivial bugs requiring to overwrite some storage keys with others (array size underflow...), has a good modeling of cryptographic hashes, and support chaining multiple transactions. However, It only implements an "interesting" subset of the EVM. It doesn't handle: * gas, * precompiles, * or a contract interacting with other contracts (DELEGATECALL, STATICCALL...). This means that CALL support is limited to sending ethers. Other tools like Manticore can do that much better, and the focus for Pakala was offensive vulnerability scanning of contracts *en masse*.

近期下载者

相关文件


收藏者