Skip to content
Back to search

OffensiveSET

Offensive Security Dataset Generator — MCP server for generating high-quality pentesting conversation datasets for LLM fine-tuning

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today
Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/pentesterflow--offensiveset/badge.svg)](/listings/pentesterflow--offensiveset)

HTML

<a href="/listings/pentesterflow--offensiveset"><img src="/api/listings/pentesterflow--offensiveset/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

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"

---

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

README.md · README · 393 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

  1. <p align="center">
  2. <img src="assets/banner.png" alt="OffensiveSET" width="700">
  3. </p>
  4. <h1 align="center">OffensiveSET</h1>
  5. <p align="center">
  6. <strong>Offensive Security Dataset Generator</strong> — An MCP server that generates high-quality, multi-turn pentesting conversation datasets for fine-tuning security-focused LLMs.
  7. </p>
  8. <p align="center">
  9. <img src="https://img.shields.io/badge/version-2.0.0-red?style=flat-square" alt="Version">
  10. <img src="https://img.shields.io/badge/scenarios-45-blue?style=flat-square" alt="Scenarios">
  11. <img src="https://img.shields.io/badge/tools-40-blue?style=flat-square" alt="Tools">
  12. <img src="https://img.shields.io/badge/MCP-compatible-green?style=flat-square" alt="MCP">
  13. <img src="https://img.shields.io/badge/Qwen3.5-optimized-orange?style=flat-square" alt="Qwen">
  14. <img src="https://img.shields.io/badge/license-MIT-gray?style=flat-square" alt="License">
  15. </p>
  16. Built for training models like Qwen3.5 to think and act like professional penetration testers.
  17. ---
  18. ## What It Does
  19. 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:
  20. - **Multi-turn conversations** (8-15 turns) following real pentester workflows
  21. - **Chain-of-thought reasoning** via `<think>` blocks modeling how pentesters analyze attack surfaces
  22. - **Realistic tool outputs** — unique nmap scans, sqlmap dumps, nuclei findings per entry (no duplicates)
  23. - **Failure cases** — blocked attacks, WAF bypasses, honeypot detection, and pivoting strategies
  24. - **Professional reports** — CVSS scoring, CWE references, evidence PoCs, and secure code remediation
  25. - **Qwen3.5 native format** — `observation` role, `<tool_call>` tags, inline `<think>` reasoning
  26. ---
  27. ## Stats
  28. | Metric | Value |
  29. |--------|-------|
  30. | Attack scenarios | 45 |
  31. | Pentesting tools | 40 |
  32. | Dynamic output generators | 25 |
  33. | User prompt templates | 120+ |
  34. | Target domains | 50 |
  35. | Failure patterns | 13 |
  36. | Export formats | 5 (Qwen ChatML, Generic ChatML, ShareGPT, OpenAI, Alpaca) |
  37. ---
  38. ## Quick Start
  39. ### Install & Setup
  40. ```bash
  41. git clone https://github.com/PentesterFlow/OffensiveSET.git
  42. cd OffensiveSET
  43. npm install
  44. npm run build
  45. ```
  46. ### Claude Code (CLI) — Quickest Setup
  47. ```bash
  48. # Add the MCP server (run from inside the cloned repo)
  49. claude mcp add offensiveset node $(pwd)/dist/index.js
  50. # Verify
  51. claude mcp list
  52. # Start using it
  53. claude
  54. ```
  55. ### Claude Desktop (GUI)
  56. Open your MCP config file:
  57. - **macOS**: `~/Library/Application Support/Claude/claude_desktop_config.json`
  58. - **Windows**: `%APPDATA%\Claude\claude_desktop_config.json`
  59. Add this block (update the path to where you cloned the repo):
  60. ```json
  61. {
  62. "mcpServers": {
  63. "offensiveset": {
  64. "command": "node",
  65. "args": ["/Users/YOUR_USER/OffensiveSET/dist/index.js"]
  66. }
  67. }
  68. }
  69. ```
  70. Restart Claude Desktop. The 10 OffensiveSET tools will appear in the tools menu.
  71. ### VS Code / JetBrains (Claude Code Extension)
  72. ```bash
  73. # From the integrated terminal
  74. claude mcp add offensiveset node /path/to/OffensiveSET/dist/index.js
  75. ```
  76. Or add a `.mcp.json` to your project root:
  77. ```json
  78. {
  79. "mcpServers": {
  80. "offensiveset": {
  81. "command": "node",
  82. "args": ["/path/to/OffensiveSET/dist/index.js"]
  83. }
  84. }
  85. }
  86. ```
  87. ### One-Line Install (Clone + Build + Register)
  88. ```bash
  89. git clone https://github.com/PentesterFlow/OffensiveSET.git && cd OffensiveSET && npm install && npm run build && claude mcp add offensiveset node $(pwd)/dist/index.js
  90. ```
  91. ### Generate a Dataset
  92. Once connected, ask Claude to use the tools:
  93. ```
  94. > Generate a 5000 entry offensive security dataset with 60% thinking blocks
  95. > List all available attack scenarios
  96. > Preview a single entry for the NoSQL injection scenario
  97. > Export my dataset to Qwen ChatML format
  98. ```
  99. Or call tools directly:
  100. ```
  101. generate_dataset_v2
  102. count: 5000
  103. thinking_ratio: 0.6
  104. failure_ratio: 0.35
  105. thinking_style: "inline"
  106. ```
  107. ### Export for Training
  108. ```
  109. export_for_training
  110. input_path: "./datasets/your_dataset.jsonl"
  111. output_format: "chatml_qwen"
  112. ```
  113. ---
  114. ## MCP Tools
  115. | Tool | Description |
  116. |------|-------------|
  117. | `generate_dataset` | V1 generator — baseline pentesting conversations |
  118. | `generate_dataset_v2` | V2 generator — dynamic outputs, failures, deep thinking (recommended) |
  119. | `list_scenarios` | Browse 45 attack scenarios with filtering |
  120. | `list_tools` | Display 40 pentesting tools and capabilities |
  121. | `preview_entry` | Preview a single entry before full generation |
  122. | `get_dataset_stats` | Analyze a generated dataset |
  123. | `validate_dataset` | Check JSONL structure, schema compliance, placeholder detection |
  124. | `quality_score` | Deep quality analysis with A-F grading |
  125. | `export_for_training` | Convert to Qwen ChatML, ShareGPT, OpenAI, or Alpaca format |
  126. | `merge_datasets` | Combine multiple datasets with deduplication |
  127. ---
  128. ## Dataset Output Format
  129. Each JSONL line is a complete pentesting conversation:
  130. ```json
  131. {
  132. "id": "offensiveset-owasp-a03-sqli-584721-42",
  133. "conversations": [
  134. {"from": "system", "value": "You are PentesterFlow, an expert offensive security AI..."},
  135. {"from": "human", "value": "Perform recon on acme-corp.com..."},
  136. {"from": "gpt", "value": "<think>\nLet me analyze the attack surface...\n</think>\n\n## Recon Results\n...", "tool_calls": [...]},
  137. {"from": "observation", "value": "[nmap] PORT STATE SERVICE...", "tool_results": [...]},
  138. {"from": "human", "value": "Exploit the SQLi finding..."},
  139. {"from": "gpt", "value": "<think>\nThe parameter is injectable...\n</think>\n\n## Exploitation\n..."},
  140. {"from": "gpt", "value": "## Finding Report\n| Severity | Critical 9.8 | ..."}
  141. ],
  142. "metadata": {
  143. "scenario_id": "owasp-a03-sqli",
  144. "category": "OWASP Top 10",
  145. "difficulty": "advanced",
  146. "tags": ["sqli", "injection"],
  147. "tools_used": ["nmap", "sqlmap", "curl"],
  148. "has_thinking": true,
  149. "has_failures": false,
  150. "turn_count": 12,
  151. "estimated_tokens": 4606,
  152. "cve_references": ["CWE-89"]
  153. }
  154. }
  155. ```
  156. ---
  157. ## Scenario Coverage
  158. ### OWASP Top 10 (19 scenarios)
  159. 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
  160. ### Modern Attacks (20 scenarios)
  161. 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
  162. ### API Security Top 10 (6 scenarios)
  163. BOLA + Mass Assignment, Excessive Data Exposure, Broken Function Level Authorization, Rate Limit Bypass
  164. ---
  165. ## Tool Arsenal (40 tools)
  166. **Recon:** nmap, subfinder, amass, httpx, rustscan, puredns, dnsx
  167. **Enumeration:** ffuf, gobuster, dirsearch, feroxbuster, katana, kiterunner, linkfinder, paramspider, gau, arjun
  168. **Scanning:** nuclei, nikto, wfuzz, trufflehog, semgrep, crlfuzz, corsy, secretfinder, testssl
  169. **Exploitation:** sqlmap, dalfox, commix, ssrfmap, jwt_tool, hydra, metasploit, caido, interactsh, nosqlmap
  170. **Utility:** curl, linpeas, report_generator, gf
  171. ---
  172. ## Training with Qwen3.5
  173. ### LLaMA-Factory
  174. ```yaml
  175. # dataset_info.json
  176. {
  177. "offensiveset": {
  178. "file_name": "dataset_chatml_qwen.jsonl",
  179. "formatting": "sharegpt",
  180. "columns": {
  181. "messages": "messages"
  182. },
  183. "tags": {
  184. "role_tag": "role",
  185. "content_tag": "content",
  186. "user_tag": "user",
  187. "assistant_tag": "assistant",
  188. "observation_tag": "observation",
  189. "system_tag": "system"
  190. }
  191. }
  192. }
  193. ```
  194. ```bash
  195. llamafactory-cli train \
  196. --model_name_or_path Qwen/Qwen3.5-7B \
  197. --stage sft \
  198. --dataset offensiveset \
  199. --template qwen \
  200. --output_dir ./offensiveset-model \
  201. --per_device_train_batch_size 2 \
  202. --gradient_accumulation_steps 8 \
  203. --learning_rate 1e-4 \
  204. --num_train_epochs 3 \
  205. --cutoff_len 8192 \
  206. --finetuning_type lora \
  207. --lora_rank 64 \
  208. --bf16 true
  209. ```
  210. ### Recommended Settings
  211. | Setting | Value | Notes |
  212. |---------|-------|-------|
  213. | Model | Qwen3.5-7B or 14B | Best quality/cost balance |
  214. | Context | 8192 tokens | 97% of entries fit in 8K |
  215. | Epochs | 2-3 | Enough for domain knowledge |
  216. | LoRA rank | 64-128 | Security is a specialized domain |
  217. | Thinking style | `inline` | Qwen native `<think>` format |
  218. ---
  219. ## Project Structure
  220. ```
  221. src/
  222. ├── index.ts # Entry point (34 lines)
  223. ├── server/
  224. │ ├── generate-tools.ts # generate_dataset, generate_dataset_v2
  225. │ ├── browse-tools.ts # list_scenarios, list_tools, preview
  226. │ ├── analysis-tools.ts # stats, validate, quality_score
  227. │ ├── export-tools.ts # export, merge
  228. │ └── resources.ts # MCP resources
  229. ├── generators/
  230. │ ├── v1-generator.ts # V1 generation engine
  231. │ ├── v2/
  232. │ │ ├── types.ts # Interfaces + config
  233. │ │ ├── prompts.ts # 120+ prompt templates
  234. │ │ ├── system-prompts.ts # System prompt rotation
  235. │ │ ├── responses.ts # Grounded response generation
  236. │ │ ├── reports.ts # Reports + remediation
  237. │ │ ├── conversation.ts # Conversation builder
  238. │ │ ├── post-processor.ts # Qwen compat + token control
  239. │ │ ├── quality.ts # Quality scoring engine
  240. │ │ └── index.ts # Main generator
  241. │ ├── outputs/
  242. │ │ ├── helpers.ts # RNG, TargetProfile, constants
  243. │ │ ├── recon.ts # nmap, rustscan, subfinder...
  244. │ │ ├── enum.ts # ffuf, feroxbuster, katana...
  245. │ │ ├── vuln.ts # nuclei, semgrep, testssl...
  246. │ │ ├── exploit.ts # sqlmap, hydra, metasploit...
  247. │ │ ├── cloud.ts # S3, env files
  248. │ │ ├── failures.ts # 13 failure patterns
  249. │ │ └── index.ts # DynamicOutputEngine
  250. │ └── thinking-engine.ts # Chain-of-thought reasoning
  251. ├── templates/
  252. │ └── scenarios/
  253. │ ├── types.ts # ScenarioTemplate interface
  254. │ ├── owasp.ts # OWASP Top 10 scenarios
  255. │ ├── modern.ts # Modern attacks
  256. │ ├── api.ts # API Security scenarios
  257. │ ├── advanced.ts # Advanced scenarios
  258. │ └── index.ts # ALL_SCENARIOS
  259. └── schemas/
  260. └── tools/
  261. ├── types.ts # ToolDefinition interface
  262. ├── recon.ts # Recon tools
  263. ├── enum.ts # Enumeration tools
  264. ├── scan.ts # Scanning tools
  265. ├── exploit.ts # Exploitation tools
  266. ├── utility.ts # Utility tools
  267. └── index.ts # PENTESTING_TOOLS
  268. ```
  269. ---
  270. ## Adding New Content
  271. ### Add a Scenario
  272. Edit `src/templates/scenarios/advanced.ts` (or create a new category file):
  273. ```typescript
  274. {
  275. id: "my-new-scenario",
  276. category: "OWASP Top 10",
  277. subcategory: "A03 - Injection",
  278. title: "My Custom Injection Scenario",
  279. difficulty: "advanced",
  280. description: "...",
  281. target_description: "...",
  282. attack_phases: [ /* 4-6 phases */ ],
  283. cve_references: ["CWE-89"],
  284. tools_involved: ["sqlmap", "curl"],
  285. tags: ["sqli", "injection"],
  286. }
  287. ```
  288. ### Add a Tool
  289. Edit the relevant category file in `src/schemas/tools/`:
  290. ```typescript
  291. {
  292. name: "mytool",
  293. description: "...",
  294. category: "scanning",
  295. parameters: { /* ... */ },
  296. example_commands: ["mytool -u https://target.com"],
  297. typical_output: "...",
  298. }
  299. ```
  300. ### Add a Dynamic Output Generator
  301. Add a method to `src/generators/outputs/` in the appropriate category file, then register it in `src/generators/outputs/index.ts`.
  302. ---
  303. ## License
  304. MIT
  305. ---
  306. ## Author
  307. **secfathy** — Offensive Security Researcher

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.