File size: 9,555 Bytes
6d7da07
a012bb0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
6d7da07
a012bb0
 
 
10ab7c2
a012bb0
 
 
 
10ab7c2
 
 
 
 
 
 
 
1781b47
a012bb0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1781b47
 
a012bb0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
10ab7c2
1781b47
10ab7c2
a012bb0
1781b47
a012bb0
 
 
 
 
 
 
1781b47
 
 
a012bb0
 
 
1781b47
 
 
 
 
 
 
 
 
 
 
 
a012bb0
 
 
 
 
1781b47
 
a012bb0
 
 
 
 
10ab7c2
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1781b47
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
10ab7c2
1781b47
 
 
 
 
a012bb0
 
1781b47
 
a012bb0
 
 
 
1781b47
 
 
a012bb0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1781b47
a012bb0
1781b47
a012bb0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
---
license: other
language:
- en
task_categories:
- text-generation
tags:
- security
- offensive-security
- red-team
- pentesting
- cybersecurity
- chat
pretty_name: Attacker (Offensive-Security Chat Dataset)
size_categories:
- 100K<n<1M
configs:
- config_name: default
  data_files:
  - split: train
    path: data/train-*.parquet
  - split: val
    path: data/val-*.parquet
---

# Attacker — Offensive-Security Chat Dataset

A chat-format (ShareGPT/ChatML-style) supervised fine-tuning dataset of **107,756**
offensive-security conversations, curated to focus on *attack-side* procedures and
knowledge (exploitation, vulnerability research, post-exploitation, red-team
methodology, recon, C2, malware/threat analysis, cryptanalysis, tooling).

> **v3 (2026-12-02, partial — regeneration in progress).** Continues v2: a further
> **4,073** det-flagged records were regenerated into real analyses and moved back into
> `train`, and **4,290** answers whose code had been flattened onto one line were
> regenerated with properly-formatted multi-line code (replaced in place). Every new
> answer passed offline validation (no flattened code, no refusals, no truncation).
> Regeneration is **not finished** — ~3,216 collapsed-code and ~6,651 det records remain
> held back in a local quarantine and will be added in a later release. The previous
> release (v2) had 103,683 records; this one has 107,756.

> ⚠️ **Intended use / safety.** This dataset contains offensive-security content and
> is released **for authorized security research, red-team training, and defensive
> model evaluation only**. Use it exclusively in contexts where you have explicit
> authorization (e.g. your own labs, sanctioned pentest/CTF engagements, security
> research). Do **not** use it to attack systems you do not own or lack written
> permission to test. The authors and uploader accept no liability for misuse.
> Category labels are dictionary-based heuristics, **not** ground truth — spot-check
> before training.

## Schema

Each record is one conversation with a uniform schema:

| field | type | description |
|---|---|---|
| `id` | string | stable unique id (e.g. `atk-0000001`) |
| `category` | string | attack category (see table below); `defense` marks a genuinely-defensive record |
| `tier` | string | `core` (attack *procedures*), `adjacent` (attack *knowledge*), or `defense` |
| `source` | string | originating source file |
| `messages` | list\<{`role`, `content`}\> | chat turns; `role` ∈ {`system`, `user`, `assistant`}, lowercased |
| `meta` | struct | `{attack_score: float, defense_score: float, turns_dropped: int}` |

Every conversation opens with a `system` turn framing an *offensive security assistant
for authorized pentesting*, followed by one or more `user`/`assistant` turns
(multi-turn conversations are included).

### Load

```python
from datasets import load_dataset

ds = load_dataset("daipham31/attacker")          # DatasetDict: train, val
# filter to the pure attack-procedure tier:
core = ds["train"].filter(lambda r: r["tier"] == "core")
```

## Splits

| split | records |
|---|---|
| `train` | 106,754 |
| `val` | 1,002 |
| **total** | **107,756** |

The `tier` column (`core` / `adjacent` / `defense`) is available as a filter within each split.

## Counts

### By tier

| tier | records | meaning |
|---|---|---|
| `core` | 52,018 | attack procedures |
| `adjacent` | 50,707 | attack knowledge |
| `defense` | 958 | genuinely-defensive Q&A (relabeled in v2; see changelog) |

### By category

| category | records | description |
|---|---|---|
| `vuln_research` | 46,567 | CVE research, exploitability, vulnerability analysis |
| `exploitation` | 39,644 | exploitation, PoC, payloads |
| `post_exploitation` | 4,267 | privesc, lateral movement, credentials, persistence, evasion |
| `malware_threat` | 4,140 | malware / RaaS / threat-actor technique analysis |
| `redteam` | 3,045 | red-team / pentest methodology |
| `recon` | 2,331 | reconnaissance, scanning, enumeration |
| `c2` | 1,161 | command & control, tunneling, botnets |
| `cryptanalysis` | 1,103 | crypto attacks: side-channel, timing, DPA |
| `defense` | 958 | genuinely-defensive Q&A |
| `tooling` | 467 | offensive tooling (Metasploit, Impacket, Cobalt Strike, …) |

### By source (top)

| source file | records |
|---|---|
| `cybersec_master.jsonl` | 73,360 |
| `220426-CyberSec-Dataset_escaped.jsonl` | 18,490 |
| `Cybersecurity-ShareGPT.jsonl` | 11,065 |
| `mitre-attack-instruction-dataset.json` | 291 |
| `malware-instruction-dataset.json` | 199 |
| *(30 further small sources)* | 278 |

## Changelog — v3 (2026-12-02, partial)

Continues the v2 quality pass; same models, prompts and attack-focus. This is a **partial**
push made while regeneration is still running (a GPU budget interruption paused the remaining
work). All new answers were regenerated with **Inkling-2-Mini-Uncensored** and passed offline
validation before inclusion: no code flattened onto a single line, no refusals, no truncated
or empty answers.

| change | records | what |
|---|---|---|
| det answers regenerated (new) | 4,073 | more metadata-card / restated-input records rewritten into real analyses; moved from local quarantine back into `train` |
| collapsed-code answers regenerated | 4,290 | answers whose code had lost all line breaks (a v1 source defect) were rewritten with properly-formatted multi-line code, replacing the original in place |
| still held back in local quarantine | 6,651 | det-flagged records not yet regenerated (down from 10,724) |
| collapsed-code still to do | ~3,216 | flattened-code records not yet regenerated; originals unchanged for now |

The attack level of regenerated answers is preserved or increased: the only automated
"decreases" come from a scorer that rates a flattened keyword blob higher than the same code
written cleanly, which is a measurement artifact, not a content change.

## Changelog — v2 (2026-12-01)

A quality pass (an LLM critic plus targeted regeneration and deterministic repairs) on the
v1 release of 114,407 records. The system prompts and the attack-focus of every record were
left unchanged; only answers judged low-quality were repaired/regenerated, a few records were
relabeled, and unrepairable records were held back.

**Regeneration model.** Answers were regenerated with **Inkling-2-Mini-Uncensored** (Q4_K,
self-hosted on an RTX 5090 via llama.cpp); an earlier portion of the det regenerations was
produced with DeepSeek (`deepseek-flash`) before the self-hosted endpoint was available. Each
regenerated record keeps provenance in its (local) metadata.

| change | records | what |
|---|---|---|
| det answers regenerated | 5,200 | records whose answer was only a metadata card or a restatement of the input were rewritten into a real analysis (sources: 3,200 DeepSeek API + 627 + 1,373 self-hosted) |
| general answers regenerated | 1,282 | answers the critic judged off-topic / wrong were rewritten to answer the question correctly |
| phase-A/B answer repairs | ~14,213 | deterministic repairs (cut leaked defense sections, fix collapsed code, etc.) on the original answers |
| relabeled to `tier`/`category` = `defense` | 958 | records whose *question* is genuinely defensive and whose answer ships no attack code |
| removed from this release | 6,651 | det-flagged records not yet regenerated; held back (kept in a local quarantine), not deleted (was 10,724 in v2; 4,073 regenerated in v3) |
| refusals kept as originals | 5 | 5 general answers that regenerated into a refusal were discarded; their original answer was kept instead |

No record ids were added. `meta` scores (`attack_score`, `defense_score`, `turns_dropped`) are
unchanged from v1.

## Token estimate

≈ **66M tokens** (char/4 heuristic over all message content). Median / p90 record length ≈
2,100 / 5,400 characters.

## Provenance

Filtered and standardized from an initial pool of **1,981,019** input records by an
`attack_pipeline.py` build step, which kept **114,407** attack-focused records (v1) and
excluded **1,497,640** defense/non-attack records (plus 6,593 lead-defense records removed in
post-filtering). v2 then applied the quality pass above. Notable processing:

- **Attack-focus filter.** Defense-leaning records (threat hunting, detection rules,
  incident response, hardening, remediation, compliance/reporting) were excluded.
  `Detection` / `Prevention` / `Mitigation` / `Remediation` / `Hardening` sections
  were cut from the assistant answers of mixed records; purely-defensive turns were
  dropped from multi-turn conversations (`meta.turns_dropped` records how many).
- **De-duplication.** Exact prompt-hash duplicates and repetitive templates were
  merged (capped at 300 records per template; 362,379 duplicate/template records
  collapsed). Double-escaped `*_escaped.jsonl` sources were unescaped.
- **Reference dumps removed.** MITRE ATT&CK / NVD reference tables (not Q&A pairs)
  and non-security coding/math (`code_train*`) were excluded.

## Limitations

- `CyberSec-Dataset_escaped.jsonl` is a subset of `220426-CyberSec-Dataset_escaped.jsonl`;
  overlap was merged by prompt hash.
- The Exploit-DB branch of `cybersec_master` had faulty metadata (always `aix/dos`)
  and templated junk answers; those junk turns were dropped or regenerated in v2.
- Category labels are heuristic (dictionary-based), **not** ground truth.
- Regenerated answers are model-written; spot-check before training.
- Offensive-security content only — do not use for anything but authorized research.