Skip to content
KitploitKITPLOIT
工具漏洞利用博客
Log in
提交
工具漏洞利用博客
提交

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

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

订阅源联系隐私© 2026 Kitploit

工具目录

分类

查看所有分类
Loading categories
ROPE — 防御框架,通过强制执行路由来源策略来防止使用工具的LLM代理遭受间接提示注入,具备确定性来源检查以及用于评估攻击成功率和效用保留的基准测试工具。 | Kitploit
工具/GitHubGitHub/xhowenma/rope
防御工具漏洞分析论文与研究学习与教育AI 安全
GitHubxhowenma/rope

ROPE

防御框架,通过强制执行路由来源策略来防止使用工具的LLM代理遭受间接提示注入,具备确定性来源检查以及用于评估攻击成功率和效用保留的基准测试工具。

查看仓库
7910天前尚未审核
分享

ROPE:路由来源策略执行

我们论文的代码、路由器缓存和运行日志:

ROPE:针对间接提示注入的路由来源策略执行 作者:Xinhang Ma、Chaowei Xiao、William Yeoh、Ning Zhang、Yevgeniy Vorobeychik

ROPE 仅允许某个值在来自用户、用户指定的来源或用户自己的记录时,才能到达会改变状态的工具。 执行过程是对一组经过审计的敏感工具参数进行确定性的来源检查;路由器 LLM 只读取可信的用户请求,并设定每个参数的检查严格程度。

目录结构

路径内容
src/rope/防御实现:路由器、按任务划分的作用域、策略编译器、来源标注器、运行时防护。
src/rope/scopes/_floor/<suite>.json每个套件经过审计的敏感参数表(所有路由器共享)。
src/rope/scopes/<router>/<suite>.json路由器缓存:四个被评估路由器的按任务作用域(opus 覆盖全部六个套件;gemini-3-flash、gpt-oss-20b、gpt-4o-mini 覆盖 AgentDyn 套件)。
src/common/路由器的 LLM 补全缓存。
autodojo/基准测试框架,包含六个被评估的套件(来自 AgentDojo 的 banking、slack、travel;来自 AgentDyn 的 github、shopping、dailylife)以及自适应(AutoDojo)攻击。
agentlab/长时程基准测试:AgentLAB Task-Injection 轨迹和回放驱动程序(agentlab/README.md)。
logs/论文数据背后的每一次 ROPE 运行记录。
analysis/aggregate.py从 logs/ 重新计算论文中的每一个 ROPE 数值。

环境配置

Python 3.12,需安装 openai、pydantic、jsonschema、pyyaml、docstring-parser(以及用于原生 Gemini 路径的 google-genai)。在仓库根目录下执行:

export PYTHONPATH=$PWD/autodojo/src:$PWD/src

从日志中复现论文中的数字(无需 API 访问)

python analysis/aggregate.py logs                      # every model
python analysis/aggregate.py logs gpt-4o-mini          # one model

它按智能体模型打印:每个套件的干净效用(CU)、攻击下的效用(UA)和攻击成功率(ASR),以及作为未加权套件均值的对应值,覆盖每种配置;静态攻击与自适应攻击;长时程攻击;按类别划分的结果;以及每一次残余的攻击成功。 三个基准 oracle 将一次被阻止的攻击判定为成功;analysis/corrections.py 根据其效果对这三个注入任务重新评分(slack IT5、dailylife IT7、github IT1)。CU 和 UA 从不被改动。

日志

logs/<benchmark>/<model>/<config>/<suite>/user_task_<i>/<attack>/<case>.json
级别取值
<benchmark>agentdyn、agentdojo
<model>gpt-4o-mini、gpt-4o(仅 AgentDyn)、gemini-2.5-flash、qwen3-235b
<config>rope(防御,Opus 4.8 路由器);AgentDyn 上的 GPT-4o-mini 还支持:rope-clamp、rope-defaults-only、rope-always-fully-specified、rope-always-action-open(策略消融)、rope-router-<router>[-clamp](更廉价的路由器)
<attack>clean(无攻击,none.json)、static(important_instructions)、adaptive(AutoDojo)、long_horizon(AgentLAB Task-Injection,AgentDojo 套件)
<case>none.json(干净)或 injection_task_<k>.json

每个 JSON 都是一份 AgentDojo 运行日志:完整的消息轨迹、注入内容,以及 utility 和 security 判定结果(security: true 表示攻击成功)。

运行防御

# the defense (cached Opus router):
python -m rope.run_eval --suite github --attack important_instructions
python -m rope.run_eval --suite github --attack none              # clean utility
python -m rope.run_eval --suite github --defense passthrough      # no defense

# a cheaper router, optionally clamped to the audited floor; a fixed-policy ablation arm:
python -m rope.run_eval --suite github --router gemini-3-flash --clamp
python -m rope.run_eval --suite github --policy-mode defaults-only

# a live router (any OpenAI-compatible model):
python -m rope.run_eval --suite github --router live --router-model openai/gpt-4o-mini

# adaptive attack: replay the AutoDojo-optimized injections
AUTODOJO_CACHE=$PWD/autodojo/variant_generation/variants/github/openai/gpt-4o-mini/routed/injections.json \
  python -m rope.run_eval --suite github --attack autodojo

# long-horizon attack: replay the AgentLAB traces
python agentlab/run_eval.py --suite banking --user-task user_task_0 --injection-task injection_task_0

环境变量:OPENROUTER_API_KEY(agent 模型和实时路由器)、ROPE_AGENT_MODEL(默认 openai/gpt-4o-mini)、ROPE_PIPELINE_TAG(运行名称前缀;它必须包含一个 AgentDojo 模型名称,默认 gpt-4o-mini-2024-07-18)。

要缓存你自己的路由器并像内置路由器一样使用它:

python -m rope.cache_router --router my-router --router-model <llm-id> --suite github
python -m rope.run_eval     --router my-router --suite github --attack important_instructions

致谢

本仓库基于 AgentDojo 和 AgentDyn(基准测试套件)、AutoDojo(自适应攻击)以及 AgentLAB(长时程攻击轨迹)构建。

引用

@article{ma2026rope,
  title={ROPE: Routed origin policy enforcement against indirect prompt injection},
  author={Ma, Xinhang and Xiao, Chaowei and Yeoh, William and Zhang, Ning and Vorobeychik, Yevgeniy},
  journal={arXiv preprint arXiv:2608.27496},
  year={2026}
}
下载工具

最受欢迎

查看全部 →

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

  • 1

    ghostlock-app

    yukonga/ghostlock-app

    针对 CVE-2026-43499 的一键式 Android 内核漏洞利用应用,通过内核模块加载实现权限提升,并提供偏移提取与设备端分析工具。

    951
  • 2

    wifit3

    derv82/wifit3

    Wifite 但仅限 USB 且跨平台。

    743
  • 3

    OsintHunter

    letox4/osinthunter

    🎯 终极 OSINT 工具包:调查图谱、置信度评分、别名家族、地图、时间线和报告。49 个模块、400+ 个站点,无需 API 密钥。

    668
  • 4

    jumpserver

    jumpserver/jumpserver

    JumpServer是一个开源的特权访问管理(PAM)平台,为DevOps和IT团队提供通过Web浏览器按需安全访问SSH、RDP、Kubernetes、数据库和RemoteApp端点的能力。

    492
  • 5

    SafeLine

    chaitin/safeline

    自托管WAF和反向代理,可过滤恶意HTTP流量、阻止SQL注入、XSS和机器人攻击,具备速率限制和动态HTML/JS加密功能。

    446
  • 6

    mcp-reverse

    1llu50ry/mcp-reverse

    MCP 服务器,提供 180 多个逆向工程工具,聚合了 Ghidra、IDA、x64dbg、Frida 以及其他 56 个后端,并内置原生二进制解析器和包含 4,200 项技能的知识库。

    337

探索所有工具

浏览我们的工具集合

查看所有工具 →