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

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

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

订阅源联系隐私© 2026 Kitploit

工具目录

分类

查看所有分类
Loading categories
WAInjectBench — 针对 Web 代理的提示注入检测基准测试。 | Kitploit
工具/GitHubGitHub/norrrrrrr-lyn/wainjectbench
漏洞分析Web安全机器学习论文与研究学习与教育AI 安全对抗性攻击
GitHubnorrrrrrr-lyn/wainjectbench

WAInjectBench

针对 Web 代理的提示注入检测基准测试。

查看仓库
235944个月前Kitploit 审核通过
分享

WAInjectBench

WAInjectBench 是一个面向 Web 智能体中提示注入检测的综合基准。 它涵盖6 种攻击类型,跨越两种模态:文本和图像。


📂 数据集结构

  • data/
    • text/
      • benign/ → 4 个类别,以 JSONL 文件存储
      • malicious/ → 8 种攻击类型,以 JSONL 文件存储
    • image/
      • benign/ → 2 个类别,存储在子文件夹中
      • malicious/ → 7 种攻击类型,存储在子文件夹中

⚙️ 安装

克隆仓库并创建环境:

git clone https://github.com/Norrrrrrr-lyn/WAInjectBench.git
cd WAInjectBench
conda env create -f environment.yml
conda activate wainjectbench

🚀 评估

WAInjectBench 支持两种评估流程:基于文本的检测和基于图像的检测。

🔹 基于文本的检测

python main_text.py \
  --data_dir [path to text dataset] \
  --detector [detector name] \
  --result_dir [output path] \
  --gpu [gpu id]

可用检测器: ["kad", "promptarmor", "embedding-t", "promptguard", "datasentinel", "ensemble"]

PromptArmor → 需要将 OPENAI_API_KEY 设置为环境变量。

DataSentinel →

git clone https://github.com/liu00222/Open-Prompt-Injection.git

将预训练模型下载到:WAInjectBench/Open-Prompt-Injection/DataSentinel_Models 在 detector_text/datasentinel.py 中设置目录和模型路径。

🔹 基于图像的检测

python main_image.py \
  --data_dir [path to image dataset] \
  --detector [detector name] \
  --result_dir [output path] \
  --gpu [gpu id]

可用检测器: ["gpt-4o-prompt", "llava-1.5-7b-prompt", "jailguard", "embedding-i", "llava-1.5-7b-ft", "ensemble"]

GPT-4o-Prompt → 需要将 OPENAI_API_KEY 设置为环境变量。

JailGuard →

git clone https://github.com/shiningrain/JailGuard.git

按照其 README 配置 MiniGPT4。

LLaVA-1.5-7B-FT → 需要下载我们微调后的模型,并在 detector_image/llava.py 中设置其路径。

🔹 域内泛化

我们还提供了 Embedding-T 和 Embedding-I 模型的域内训练版本,位于 model/embedding-t/in-domain 和 model/embedding-i/in-domain。要使用它们,请遵循与主实验相同的评估流程,但需更新 detector_text/embedding-t.py 和 detector_image/embedding-i.py 中的模型路径。

🏋️ 训练

我们提供了用于训练基于嵌入的文本和图像二分类器的代码。

文本嵌入分类器

python train/embedding-t.py \
  --input_dir [dir with training text jsonl files] \
  --output_dir [model output path]

JSONL 格式:

{"text": "example", "label": 1}   # 1 for malicious, 0 for benign

图像嵌入分类器

python train/embedding-i.py \
  --input_dir [dir with training image jsonl files] \
  --output_dir [model output path]

JSONL 格式:

{"path": "path/to/image.png", "label": 1}

微调 LLaVA-1.5-7B

python train.py \
  --train_jsonl train.jsonl \
  --val_jsonl val.jsonl \
  --use_lora \
  --amp_dtype bf16 \
  --device_mode single \
  --gpu_id 0

JSONL 文件应包含图像路径和标签(1 = 恶意,0 = 良性)。 我们论文中的实验使用默认超参数。

下载工具

最受欢迎

查看全部 →

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

  • 1

    OsintHunter

    letox4/osinthunter

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

    790
  • 2

    ghostlock-app

    yukonga/ghostlock-app

    GhostLock 一键执行应用(CVE-2026-43499)

    508
  • 3

    ARTEX

    baarai/artex

    基于LLM的多智能体自主渗透测试平台,具备规划器/执行器智能体、资产与探索图谱、MITM流量记录以及漏洞复测功能。

    435
  • 4

    redforge

    cybersecurity91/redforge

    浏览器端红队工具包,包含 102 个离线工具,用于侦察、载荷生成、凭据攻击、加密、编码和交战报告。

    346
  • 5

    CyberStrikeAI

    ed1s0nz/cyberstrikeai

    AI原生网络安全的行动系统——在这里,意图转化为受治理的执行,证据沉淀为运营记忆,每一次操作都让下一次更出色。

    263
  • 6

    looking-glass

    anonghosty/looking-glass

    CSIRT 平台,可将 Shadowserver 报告导入 MongoDB,并将其重放为交互式地图、分析、发现、公告和高管仪表板。

    260

探索所有工具

浏览我们的工具集合

查看所有工具 →