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

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

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

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

工具目录

分类

查看所有分类
Loading categories
exrop — 面向x86-64二进制文件的自动化ROP链生成器,使用符号执行。支持寄存器/内存写入、函数调用、系统调用、坏字符规避、栈迁移以及使用retpoline重写的内核模式。 | Kitploit
工具/GitHubGitHub/d4em0n/exrop
漏洞利用框架Payload生成逆向工程CTF二进制利用
GitHubd4em0n/exrop

exrop

面向x86-64二进制文件的自动化ROP链生成器,使用符号执行。支持寄存器/内存写入、函数调用、系统调用、坏字符规避、栈迁移以及使用retpoline重写的内核模式。

查看仓库
309225个月前Kitploit 审核通过

最受欢迎

查看全部 →

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

探索所有工具

浏览我们的工具集合

查看所有工具 →
分享

Exrop

面向 x86-64 二进制文件的自动 ROP 链生成器,基于 Triton 符号执行引擎。

特性

  • 将寄存器设置为常量或其他寄存器的值(rdi=0x41414141,rdi=rax)
  • 写入内存(支持常量和基于寄存器的地址/值)
  • 将字符串/字节写入内存
  • 函数调用,支持混合常量/寄存器/字符串参数(open("/etc/passwd", 0))
  • 系统调用链
  • 坏字符规避
  • 支持非返回型 gadget(jmp reg, call reg)
  • 栈迁移,配合 JOP 链搜索用于内核漏洞利用
  • 内核模式,自动重写 retpoline thunk
  • 仅清理模式,过滤带有危险副作用内存写入的 gadget
  • 基于后缀的组合:从已分析的后缀构建多指令 gadget
  • 多进程 gadget 分析,带进度条
  • Gadget 缓存(pickle)以快速复用

安装

pip(推荐)

root@kitploit:~
pip install git+https://github.com/d4em0n/exrop.git

这会安装 exrop 及其 Python 依赖(pyelftools,ROPGadget,triton-library)。

注意: triton-library 的 pip 包可能并非在所有平台上都可用。如果安装失败,请从源码构建 Triton,然后在不安装 Triton 依赖的情况下安装 exrop:

root@kitploit:~
pip install --no-deps git+https://github.com/d4em0n/exrop.git
pip install pyelftools ROPGadget

用于开发(可编辑安装,含测试依赖):

root@kitploit:~
git clone https://github.com/d4em0n/exrop.git
cd exrop
pip install -e ".[dev]"

手动安装

  1. 安装 Python 3.6+
  2. 安装 Triton
  3. 安装 ROPGadget
  4. 可选:安装 Keystone(仅在测试时需要)
  5. 克隆此仓库并将其添加到 Python 路径:
    root@kitploit:~
    git clone https://github.com/d4em0n/exrop.git
    export PYTHONPATH=/path/to/exrop:$PYTHONPATH
    

快速开始

root@kitploit:~
from Exrop import Exrop

rop = Exrop("/bin/ls")
rop.find_gadgets(cache=True)

# 设置寄存器
chain = rop.set_regs({'rdi': 0x41414141, 'rsi': 0x42424242, 'rdx': 0x43434343})
chain.dump()

# 写入内存
chain = rop.set_writes({0x41414141: 0xdeadbeefff, 0x43434343: 0x00110011})
chain.dump()

# 向内存写入字符串
chain = rop.set_string({0x41414141: "Hello world!\n"})
chain.dump()

# 函数调用
chain = rop.func_call(0x41414141, (0x20, 0x30, "Hello"), 0x7fffff00)
chain.dump()

输出:

root@kitploit:~
$RSP+0x0000 : 0x00000000000060d0 # pop rbx; ret
$RSP+0x0008 : 0x0000000044444444
$RSP+0x0010 : 0x0000000000014852 # mov rax, rbx; pop rbx; ret
$RSP+0x0018 : 0x0000000000000000
$RSP+0x0020 : 0x0000000000004ce5 # pop rdi; ret
$RSP+0x0028 : 0x0000000041414141
$RSP+0x0030 : 0x000000000000629c # pop rsi; ret
$RSP+0x0038 : 0x0000000042424242
$RSP+0x0040 : 0x0000000000003a62 # pop rdx; ret
$RSP+0x0048 : 0x0000000043434343
$RSP+0x0050 : 0x00000000000060d0 # pop rbx; ret
$RSP+0x0058 : 0x0000000045454545

内核模式

对于启用了 retpoline 缓解措施的 Linux 内核,设置 kernel_mode=True 可自动检测 thunk 符号,重写 gadget,并限制在 .text 节中:

root@kitploit:~
from Exrop import Exrop

rop = Exrop("/path/to/vmlinux")
rop.find_gadgets(cache=True, kernel_mode=True)
rop.clean_only = True  # 排除带有危险副作用写入的 gadget

# 设置寄存器
chain = rop.set_regs({'rdi': 0x41414141, 'rsi': 0})
chain.dump()

# 查找迁移 gadget(直接、JOP 链式、间接)
pivots = rop.stack_pivot_reg('rdi')
for p in pivots[:5]:
    p.dump()

# 为迁移构建载荷
payload = pivots[0].build_payload(chain)

exkrop 命令行工具

exkrop 命令提供了一个交互式工作流,用于生成内核 ROP 链,支持 pivot 选择和 C 代码输出:

root@kitploit:~
exkrop <vmlinux>
# 或:python3 -m exkrop <vmlinux>

特性:漏洞利用模板(权限提升、core_pattern 覆盖)、KASLR 相对地址输出、pivot gadget 浏览器、保留偏移处理以及 C 代码生成。详情请参见 exkrop/README.md。

用户空间示例:open-read-write

root@kitploit:~
from pwn import *
from Exrop import Exrop

libc = ELF("/lib/x86_64-linux-gnu/libc.so.6", checksec=False)
rop = Exrop(libc.path)
rop.find_gadgets(cache=True)

bss = libc.bss()

chain = rop.func_call(libc.symbols['open'], ("/etc/passwd", 0), bss)
chain.set_base_addr(0x00007ffff79e4000)
chain.dump()

chain = rop.func_call(libc.symbols['read'], ('rax', bss, 0x100))
chain.set_base_addr(0x00007ffff79e4000)
chain.dump()

chain = rop.func_call(libc.symbols['write'], (1, bss, 0x100))
chain.set_base_addr(0x00007ffff79e4000)
chain.dump()

更多示例请参见 examples/ 目录。

下载工具