OffensiveSET
An offensive security dataset generator that creates high-quality, multi-turn penetration testing conversation datasets for fine-tuning security-focused LLMs. It enables users to generate realistic pentesting workflows featuring chain-of-thought reasoning, tool outputs, and over 45 diverse attack scenarios.
README
<p align="center"> <img src="assets/banner.png" alt="OffensiveSET" width="700"> </p>
<h1 align="center">OffensiveSET</h1>
<p align="center"> <strong>Offensive Security Dataset Generator</strong> — An MCP server that generates high-quality, multi-turn pentesting conversation datasets for fine-tuning security-focused LLMs. </p>
<p align="center"> <img src="https://img.shields.io/badge/version-2.0.0-red?style=flat-square" alt="Version"> <img src="https://img.shields.io/badge/scenarios-45-blue?style=flat-square" alt="Scenarios"> <img src="https://img.shields.io/badge/tools-40-blue?style=flat-square" alt="Tools"> <img src="https://img.shields.io/badge/MCP-compatible-green?style=flat-square" alt="MCP"> <img src="https://img.shields.io/badge/Qwen3.5-optimized-orange?style=flat-square" alt="Qwen"> <img src="https://img.shields.io/badge/license-MIT-gray?style=flat-square" alt="License"> </p>
Built for training models like Qwen3.5 to think and act like professional penetration testers.
What It Does
OffensiveSET generates realistic penetration testing conversations in ShareGPT/ChatML JSONL format. Each entry is a complete pentest engagement — from reconnaissance to exploitation to professional reporting — with:
- Multi-turn conversations (8-15 turns) following real pentester workflows
- Chain-of-thought reasoning via
<think>blocks modeling how pentesters analyze attack surfaces - Realistic tool outputs — unique nmap scans, sqlmap dumps, nuclei findings per entry (no duplicates)
- Failure cases — blocked attacks, WAF bypasses, honeypot detection, and pivoting strategies
- Professional reports — CVSS scoring, CWE references, evidence PoCs, and secure code remediation
- Qwen3.5 native format —
observationrole,<tool_call>tags, inline<think>reasoning
Stats
| Metric | Value |
|---|---|
| Attack scenarios | 45 |
| Pentesting tools | 40 |
| Dynamic output generators | 25 |
| User prompt templates | 120+ |
| Target domains | 50 |
| Failure patterns | 13 |
| Export formats | 5 (Qwen ChatML, Generic ChatML, ShareGPT, OpenAI, Alpaca) |
Quick Start
Install & Setup
git clone https://github.com/PentesterFlow/OffensiveSET.git
cd OffensiveSET
npm install
npm run build
Claude Code (CLI) — Quickest Setup
# Add the MCP server (run from inside the cloned repo)
claude mcp add offensiveset node $(pwd)/dist/index.js
# Verify
claude mcp list
# Start using it
claude
Claude Desktop (GUI)
Open your MCP config file:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json
Add this block (update the path to where you cloned the repo):
{
"mcpServers": {
"offensiveset": {
"command": "node",
"args": ["/Users/YOUR_USER/OffensiveSET/dist/index.js"]
}
}
}
Restart Claude Desktop. The 10 OffensiveSET tools will appear in the tools menu.
VS Code / JetBrains (Claude Code Extension)
# From the integrated terminal
claude mcp add offensiveset node /path/to/OffensiveSET/dist/index.js
Or add a .mcp.json to your project root:
{
"mcpServers": {
"offensiveset": {
"command": "node",
"args": ["/path/to/OffensiveSET/dist/index.js"]
}
}
}
One-Line Install (Clone + Build + Register)
git clone https://github.com/PentesterFlow/OffensiveSET.git && cd OffensiveSET && npm install && npm run build && claude mcp add offensiveset node $(pwd)/dist/index.js
Generate a Dataset
Once connected, ask Claude to use the tools:
> Generate a 5000 entry offensive security dataset with 60% thinking blocks
> List all available attack scenarios
> Preview a single entry for the NoSQL injection scenario
> Export my dataset to Qwen ChatML format
Or call tools directly:
generate_dataset_v2
count: 5000
thinking_ratio: 0.6
failure_ratio: 0.35
thinking_style: "inline"
Export for Training
export_for_training
input_path: "./datasets/your_dataset.jsonl"
output_format: "chatml_qwen"
MCP Tools
| Tool | Description |
|---|---|
generate_dataset |
V1 generator — baseline pentesting conversations |
generate_dataset_v2 |
V2 generator — dynamic outputs, failures, deep thinking (recommended) |
list_scenarios |
Browse 45 attack scenarios with filtering |
list_tools |
Display 40 pentesting tools and capabilities |
preview_entry |
Preview a single entry before full generation |
get_dataset_stats |
Analyze a generated dataset |
validate_dataset |
Check JSONL structure, schema compliance, placeholder detection |
quality_score |
Deep quality analysis with A-F grading |
export_for_training |
Convert to Qwen ChatML, ShareGPT, OpenAI, or Alpaca format |
merge_datasets |
Combine multiple datasets with deduplication |
Dataset Output Format
Each JSONL line is a complete pentesting conversation:
{
"id": "offensiveset-owasp-a03-sqli-584721-42",
"conversations": [
{"from": "system", "value": "You are PentesterFlow, an expert offensive security AI..."},
{"from": "human", "value": "Perform recon on acme-corp.com..."},
{"from": "gpt", "value": "<think>\nLet me analyze the attack surface...\n</think>\n\n## Recon Results\n...", "tool_calls": [...]},
{"from": "observation", "value": "[nmap] PORT STATE SERVICE...", "tool_results": [...]},
{"from": "human", "value": "Exploit the SQLi finding..."},
{"from": "gpt", "value": "<think>\nThe parameter is injectable...\n</think>\n\n## Exploitation\n..."},
{"from": "gpt", "value": "## Finding Report\n| Severity | Critical 9.8 | ..."}
],
"metadata": {
"scenario_id": "owasp-a03-sqli",
"category": "OWASP Top 10",
"difficulty": "advanced",
"tags": ["sqli", "injection"],
"tools_used": ["nmap", "sqlmap", "curl"],
"has_thinking": true,
"has_failures": false,
"turn_count": 12,
"estimated_tokens": 4606,
"cve_references": ["CWE-89"]
}
}
Scenario Coverage
OWASP Top 10 (19 scenarios)
IDOR, Admin Panel Bypass, JWT Algorithm Confusion, Blind SQL Injection, SSTI to RCE, Business Logic Flaws, Cloud Misconfiguration, Stored XSS, NoSQL Injection, XXE, Path Traversal, File Upload RCE, Mass Assignment, CRLF Injection, LDAP Injection, OAuth Token Theft, 2FA Bypass, Deserialization RCE
Modern Attacks (20 scenarios)
GraphQL Batching, HTTP Request Smuggling, Prototype Pollution, Race Conditions, WebSocket Hijacking, Subdomain Takeover, CORS Exploitation, Cache Poisoning, CI/CD Pipeline Attacks, Container Escape, DNS Rebinding, Kubernetes RBAC Escape, GitHub Actions Secret Exfiltration
API Security Top 10 (6 scenarios)
BOLA + Mass Assignment, Excessive Data Exposure, Broken Function Level Authorization, Rate Limit Bypass
Tool Arsenal (40 tools)
Recon: nmap, subfinder, amass, httpx, rustscan, puredns, dnsx
Enumeration: ffuf, gobuster, dirsearch, feroxbuster, katana, kiterunner, linkfinder, paramspider, gau, arjun
Scanning: nuclei, nikto, wfuzz, trufflehog, semgrep, crlfuzz, corsy, secretfinder, testssl
Exploitation: sqlmap, dalfox, commix, ssrfmap, jwt_tool, hydra, metasploit, caido, interactsh, nosqlmap
Utility: curl, linpeas, report_generator, gf
Training with Qwen3.5
LLaMA-Factory
# dataset_info.json
{
"offensiveset": {
"file_name": "dataset_chatml_qwen.jsonl",
"formatting": "sharegpt",
"columns": {
"messages": "messages"
},
"tags": {
"role_tag": "role",
"content_tag": "content",
"user_tag": "user",
"assistant_tag": "assistant",
"observation_tag": "observation",
"system_tag": "system"
}
}
}
llamafactory-cli train \
--model_name_or_path Qwen/Qwen3.5-7B \
--stage sft \
--dataset offensiveset \
--template qwen \
--output_dir ./offensiveset-model \
--per_device_train_batch_size 2 \
--gradient_accumulation_steps 8 \
--learning_rate 1e-4 \
--num_train_epochs 3 \
--cutoff_len 8192 \
--finetuning_type lora \
--lora_rank 64 \
--bf16 true
Recommended Settings
| Setting | Value | Notes |
|---|---|---|
| Model | Qwen3.5-7B or 14B | Best quality/cost balance |
| Context | 8192 tokens | 97% of entries fit in 8K |
| Epochs | 2-3 | Enough for domain knowledge |
| LoRA rank | 64-128 | Security is a specialized domain |
| Thinking style | inline |
Qwen native <think> format |
Project Structure
src/
├── index.ts # Entry point (34 lines)
├── server/
│ ├── generate-tools.ts # generate_dataset, generate_dataset_v2
│ ├── browse-tools.ts # list_scenarios, list_tools, preview
│ ├── analysis-tools.ts # stats, validate, quality_score
│ ├── export-tools.ts # export, merge
│ └── resources.ts # MCP resources
├── generators/
│ ├── v1-generator.ts # V1 generation engine
│ ├── v2/
│ │ ├── types.ts # Interfaces + config
│ │ ├── prompts.ts # 120+ prompt templates
│ │ ├── system-prompts.ts # System prompt rotation
│ │ ├── responses.ts # Grounded response generation
│ │ ├── reports.ts # Reports + remediation
│ │ ├── conversation.ts # Conversation builder
│ │ ├── post-processor.ts # Qwen compat + token control
│ │ ├── quality.ts # Quality scoring engine
│ │ └── index.ts # Main generator
│ ├── outputs/
│ │ ├── helpers.ts # RNG, TargetProfile, constants
│ │ ├── recon.ts # nmap, rustscan, subfinder...
│ │ ├── enum.ts # ffuf, feroxbuster, katana...
│ │ ├── vuln.ts # nuclei, semgrep, testssl...
│ │ ├── exploit.ts # sqlmap, hydra, metasploit...
│ │ ├── cloud.ts # S3, env files
│ │ ├── failures.ts # 13 failure patterns
│ │ └── index.ts # DynamicOutputEngine
│ └── thinking-engine.ts # Chain-of-thought reasoning
├── templates/
│ └── scenarios/
│ ├── types.ts # ScenarioTemplate interface
│ ├── owasp.ts # OWASP Top 10 scenarios
│ ├── modern.ts # Modern attacks
│ ├── api.ts # API Security scenarios
│ ├── advanced.ts # Advanced scenarios
│ └── index.ts # ALL_SCENARIOS
└── schemas/
└── tools/
├── types.ts # ToolDefinition interface
├── recon.ts # Recon tools
├── enum.ts # Enumeration tools
├── scan.ts # Scanning tools
├── exploit.ts # Exploitation tools
├── utility.ts # Utility tools
└── index.ts # PENTESTING_TOOLS
Adding New Content
Add a Scenario
Edit src/templates/scenarios/advanced.ts (or create a new category file):
{
id: "my-new-scenario",
category: "OWASP Top 10",
subcategory: "A03 - Injection",
title: "My Custom Injection Scenario",
difficulty: "advanced",
description: "...",
target_description: "...",
attack_phases: [ /* 4-6 phases */ ],
cve_references: ["CWE-89"],
tools_involved: ["sqlmap", "curl"],
tags: ["sqli", "injection"],
}
Add a Tool
Edit the relevant category file in src/schemas/tools/:
{
name: "mytool",
description: "...",
category: "scanning",
parameters: { /* ... */ },
example_commands: ["mytool -u https://target.com"],
typical_output: "...",
}
Add a Dynamic Output Generator
Add a method to src/generators/outputs/ in the appropriate category file, then register it in src/generators/outputs/index.ts.
License
MIT
Author
secfathy — Offensive Security Researcher
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。