f15hb0wn commited on
Commit
8d57073
·
verified ·
1 Parent(s): fbde2d7

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +440 -0
README.md ADDED
@@ -0,0 +1,440 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ task_categories:
4
+ - text-classification
5
+ - graph-ml
6
+ language:
7
+ - en
8
+ tags:
9
+ - cybersecurity
10
+ - intrusion-detection
11
+ - provenance-graphs
12
+ - MITRE-ATT&CK
13
+ - SOAR
14
+ - security-operations
15
+ - IDS
16
+ - network-security
17
+ - threat-detection
18
+ - labeled-dataset
19
+ size_categories:
20
+ - 1M<n<10M
21
+ configs:
22
+ - config_name: signals
23
+ data_files:
24
+ - split: train
25
+ path: signals/signals.parquet
26
+ - config_name: graph_nodes
27
+ data_files:
28
+ - split: train
29
+ path: graph/nodes.jsonl
30
+ - config_name: graph_edges
31
+ data_files:
32
+ - split: train
33
+ path: graph/edges.jsonl
34
+ - config_name: incidents
35
+ data_files:
36
+ - split: train
37
+ path: graph/incidents.jsonl
38
+ ---
39
+
40
+ # WitFoo Precinct6 Cybersecurity Dataset
41
+
42
+ ## Overview
43
+
44
+ A large-scale, labeled cybersecurity dataset derived from production Security Operations Center (SOC) data processed by [WitFoo Precinct](https://www.witfoo.com/) version 6.x. The dataset contains **1.96 million sanitized security events** (signal logs) and **provenance graphs** (10,442 incident graphs with 18,083 nodes and 469,894 edges) from real enterprise network monitoring across multiple organizations.
45
+
46
+ This dataset is designed to support research in:
47
+ - **Provenance graph-based intrusion detection** (KnowHow, NodLink, and similar systems)
48
+ - **AI-driven cyber defense simulation** (CybORG and MARL-based defense policy training)
49
+ - **Security alert classification** (malicious vs. benign event labeling)
50
+ - **Attack lifecycle analysis** using MITRE ATT&CK framework mappings
51
+
52
+ ## Quick Start
53
+
54
+ ```python
55
+ from datasets import load_dataset
56
+
57
+ # Load flat signal logs (1.95M rows, Parquet)
58
+ signals = load_dataset("witfoo/precinct6-cybersecurity", "signals", split="train")
59
+
60
+ # Load provenance graph nodes (18K nodes)
61
+ nodes = load_dataset("witfoo/precinct6-cybersecurity", "graph_nodes", split="train")
62
+
63
+ # Load provenance graph edges (470K edges)
64
+ edges = load_dataset("witfoo/precinct6-cybersecurity", "graph_edges", split="train")
65
+
66
+ # Load full incident graphs (10K incidents with embedded artifacts, leads, and MITRE mappings)
67
+ incidents = load_dataset("witfoo/precinct6-cybersecurity", "incidents", split="train")
68
+ ```
69
+
70
+ ## Dataset Configurations
71
+
72
+ ### `signals` — Flat Security Signal Logs
73
+
74
+ Tabular format ideal for ML classification, anomaly detection, and feature engineering. Each row is a sanitized security event from production network monitoring.
75
+
76
+ | Column | Type | Description |
77
+ |--------|------|-------------|
78
+ | `timestamp` | float | Unix epoch timestamp of the event |
79
+ | `message_type` | string | Event classification (e.g., `firewall_action`, `account_logon`, `security_audit_event`, `dns_event`, AWS API names) |
80
+ | `stream_name` | string | Source product/data stream identifier (see [Source Products](#source-products-stream-names)) |
81
+ | `pipeline` | string | Ingestion pipeline (`syslog`, `aws_cloudtrail`, etc.) |
82
+ | `src_ip` | string | Source IP address (sanitized) |
83
+ | `dst_ip` | string | Destination IP address (sanitized) |
84
+ | `src_port` | string | Source port |
85
+ | `dst_port` | string | Destination port |
86
+ | `protocol` | string | Network protocol (6=TCP, 17=UDP, 1=ICMP, etc.) |
87
+ | `src_host` | string | Source hostname (sanitized) |
88
+ | `dst_host` | string | Destination hostname (sanitized) |
89
+ | `username` | string | Associated username (sanitized) |
90
+ | `action` | string | Event action (`block`, `Logon`, `Logoff`, `File System`, etc.) |
91
+ | `severity` | string | Severity level (`warning`, `informational`, `Info`, etc.) |
92
+ | `vendor_code` | string | Vendor-specific event code (e.g., `ASA-4-106023` for Cisco) |
93
+ | `message_sanitized` | string | Full sanitized raw log message (syslog, XML, JSON, CSV depending on source) |
94
+ | `label_binary` | string | `malicious` or `benign` (derived from incident correlation) |
95
+ | `label_confidence` | float | Confidence score for the binary label (0.0–1.0) |
96
+ | `attack_techniques` | string | JSON array of MITRE ATT&CK technique IDs |
97
+ | `attack_tactics` | string | JSON array of MITRE ATT&CK tactic names |
98
+ | `mo_name` | string | Modus operandi / attack campaign type (e.g., `Data Theft`) |
99
+ | `suspicion_score` | float | WitFoo-computed suspicion score (0.0–1.0) |
100
+ | `lifecycle_stage` | string | Kill chain stage mapping for KnowHow compatibility |
101
+
102
+ ### `graph_nodes` — Provenance Graph Nodes
103
+
104
+ Nodes in the provenance graph representing network entities observed in security monitoring.
105
+
106
+ | Field | Type | Description |
107
+ |-------|------|-------------|
108
+ | `node_id` | string | Unique node identifier (sanitized IP, hostname, or UUID) |
109
+ | `type` | string | Entity type: `HOST`, `CREDENTIAL`, `SERVICE`, `FILE`, `CRED`, `ACTOR` |
110
+ | `attrs` | object | Node attributes: `ip` (sanitized), `hostname` (sanitized), `credential` (sanitized) |
111
+
112
+ ### `graph_edges` — Provenance Graph Edges
113
+
114
+ Directed edges representing security events and relationships between entities. Each edge is a connection observed in production network traffic or security monitoring.
115
+
116
+ | Field | Type | Description |
117
+ |-------|------|-------------|
118
+ | `edge_id` | string | Unique edge identifier |
119
+ | `src` | string | Source node ID |
120
+ | `dst` | string | Destination node ID |
121
+ | `type` | string | Edge type: `NETWORK_FLOW`, `AUDIT_EVENT`, `DNS_RESOLVE`, `INCIDENT_LINK`, `EVENT` |
122
+ | `timestamp` | float | Unix epoch timestamp |
123
+ | `attrs` | object | Edge attributes: `message_type`, `action`, `protocol`, `src_port`, `dst_port`, `stream` |
124
+ | `labels` | object | Labels: `label_binary`, `label_confidence`, `suspicion_score`, `attack_techniques`, `attack_tactics`, `mo_name`, `lifecycle_stage` |
125
+
126
+ ### `incidents` — Full Incident Graphs
127
+
128
+ Complete incident records as produced by WitFoo Precinct's threat detection engine. Each incident is a self-contained provenance graph capturing a correlated chain of suspicious or malicious activity. This is the richest configuration — each record contains embedded nodes, edges, leads (the triggering artifacts with full raw messages), and framework mappings.
129
+
130
+ **Top-level fields:**
131
+
132
+ | Field | Type | Description |
133
+ |-------|------|-------------|
134
+ | `id` | string | Unique incident identifier |
135
+ | `name` | string | Auto-generated incident name (e.g., "Convoluted Bandicoot 241304") |
136
+ | `mo_id` | int | Modus operandi ID |
137
+ | `mo_name` | string | Attack campaign type: `Data Theft`, `Ransomware`, `Credential Theft`, etc. |
138
+ | `suspicion_score` | float | WitFoo-computed suspicion score (0.0–1.0) |
139
+ | `status_id` | int | Incident status code |
140
+ | `status_name` | string | Status: `Unprocessed`, `Investigating`, `Disrupted`, `False Positive`, etc. |
141
+ | `first_observed_at` | int | Unix timestamp of earliest event in the incident |
142
+ | `last_observed_at` | int | Unix timestamp of latest event in the incident |
143
+ | `created_at` | int | Unix timestamp when the incident was created |
144
+ | `lead_count` | int | Number of triggering signals (leads) |
145
+ | `nodes` | object | Dict of entity nodes in the incident graph (see below) |
146
+ | `edges` | object | Dict of connections between nodes (see below) |
147
+ | `leads` | object | Dict of triggering artifacts with full event data (see below) |
148
+ | `products` | object | Security products involved in detection |
149
+ | `tools` | object | Security tools that generated the signals |
150
+ | `sets` | list | WitFoo classification sets (Exploiting Host, Exploiting Target, etc.) |
151
+ | `actors` | list | Threat actor attributions (if any) |
152
+ | `top_set` | int | Primary classification set ID |
153
+
154
+ **Incident nodes** (`nodes.{uuid}`):
155
+
156
+ | Field | Type | Description |
157
+ |-------|------|-------------|
158
+ | `id` | string | Node UUID |
159
+ | `type` | string | Entity type: `host`, `cred`, `service`, `file`, `actor` |
160
+ | `ip_address` | string | Sanitized IP address |
161
+ | `hostname` | string | Sanitized hostname |
162
+ | `credential` | string | Sanitized credential identifier |
163
+ | `suspicion_score` | float | Per-node suspicion score |
164
+ | `internal` | bool | Whether the entity is internal to the network |
165
+ | `managed` | bool | Whether the entity is a managed asset |
166
+ | `sets` | object | Classification sets assigned to this node |
167
+ | `products` | object | Products that observed this entity, with full framework mappings (MITRE ATT&CK, D3FEND, NIST 800-53, CIS, PCI, ISO 27001, SOC 2, CMMC) |
168
+
169
+ **Incident edges** (`edges.{id}`):
170
+
171
+ | Field | Type | Description |
172
+ |-------|------|-------------|
173
+ | `id` | string | Edge identifier |
174
+ | `source` | string | Source node UUID |
175
+ | `target` | string | Target node UUID |
176
+ | `type` | string | Connection type (e.g., `connection`) |
177
+ | `subtype` | int | Connection subtype code |
178
+ | `started` | int | Unix timestamp of connection start |
179
+ | `ended` | int | Unix timestamp of connection end |
180
+ | `count` | int | Number of events in this connection |
181
+ | `bytes` | int | Total bytes transferred |
182
+ | `artifacts` | object | Dict of raw artifacts (security events) associated with this edge |
183
+ | `products` | object | Products that observed this connection |
184
+
185
+ **Incident leads** (`leads.{uuid}`):
186
+
187
+ | Field | Type | Description |
188
+ |-------|------|-------------|
189
+ | `id` | string | Lead UUID |
190
+ | `artifact` | object | Full artifact record (85+ fields) — the triggering security event with sanitized raw message, extracted fields, vendor codes, and all metadata |
191
+ | `details` | string | Sanitized raw log message that triggered the lead |
192
+ | `description` | string | Human-readable lead description |
193
+ | `set_id` | int | Classification set (1=Exploiting Host, 5=Exploiting Target, etc.) |
194
+ | `node_id` | string | Associated node UUID |
195
+ | `product` | object | Product that generated this lead |
196
+ | `observed_at` | int | Unix timestamp of observation |
197
+ | `status_id` | int | Lead status code |
198
+ | `statuses` | object | Available status transitions |
199
+
200
+ ### Additional Formats (in repository)
201
+
202
+ - **`graph/graph.graphml`** — Full provenance graph in GraphML format for direct import into NetworkX, Gephi, or graph databases
203
+ - **`graph/graph.json`** — NetworkX node-link JSON format
204
+ - **`signals/signals.csv`** — CSV version of signal logs (larger than Parquet, identical content)
205
+
206
+ ## Data Provenance
207
+
208
+ ### Production Origin
209
+
210
+ This dataset was generated from **production security operations data** collected by WitFoo Precinct 6.x, a Security Orchestration, Automation, and Response (SOAR) platform. The data originates from real enterprise networks monitored by WitFoo's SOC platform, covering multiple organizations across diverse industry sectors.
211
+
212
+ **Data collection period:** July–August 2024
213
+
214
+ **Processing pipeline:**
215
+ 1. Security events were ingested by WitFoo Precinct 6.x from production network monitoring tools via syslog, API connectors, and agent-based collection
216
+ 2. Events were parsed by WitFoo's signal processing pipeline using field extractors specific to each product/vendor
217
+ 3. Events were correlated into incidents by WitFoo's automated threat detection and incident analysis engine, which assigns suspicion scores, modus operandi labels, and maps to security frameworks (MITRE ATT&CK, D3FEND, NIST, CIS, PCI, etc.)
218
+ 4. Raw signal data and incident graphs were extracted from WitFoo's Cassandra database
219
+ 5. All data was sanitized through a comprehensive 4-layer PII removal pipeline (see [Sanitization](#sanitization-methodology))
220
+ 6. Labels were derived from WitFoo's incident analysis (see [Labeling](#labeling-methodology))
221
+
222
+ ### Source Products (Stream Names)
223
+
224
+ The dataset contains security events from the following monitoring products and data sources, reflecting a typical enterprise SOC deployment:
225
+
226
+ | Stream Name | Product/Source | Event Types |
227
+ |-------------|----------------|-------------|
228
+ | `microsoft-windows-security-auditing` | Microsoft Windows Security | Logon/logoff, file access, privilege use, account management (Event IDs: 4624, 4656, 4658, 4662, 4688, 4690, 4776, 4799, 4985, 5156, 5158) |
229
+ | `cisco_asa` | Cisco ASA Firewall | Firewall allow/deny, connection teardown, VPN events |
230
+ | `cisco_os` | Cisco IOS/NX-OS | Network device management and routing events |
231
+ | `cisco_stealthwatch` | Cisco Stealthwatch | Network flow analytics and anomaly detection |
232
+ | `aws_cloudtrail_events` | AWS CloudTrail | API calls: AssumeRole, DescribeInstances, GetLogEvents, ListClusters, S3 operations, IAM operations, Lambda, SNS, SQS, and 50+ other AWS API event types |
233
+ | `aws_vpc_flow_log` | AWS VPC Flow Logs | Network flow data within AWS VPCs |
234
+ | `network_communication` | Network Flow Data | TCP/UDP/ICMP communication events |
235
+ | `pan_firewall` | Palo Alto Networks Firewall | Traffic allow/drop, threat events, URL filtering |
236
+ | `symantec_sep` | Symantec Endpoint Protection | Endpoint security events |
237
+ | `ad fs auditing` | Active Directory Federation Services | Authentication and federation events |
238
+ | `generic_log` | Various (unclassified) | Events from sources without dedicated parsers |
239
+ | `precinct_audit` | WitFoo Precinct | Internal SOAR platform audit events |
240
+ | `sshd` | OpenSSH | SSH authentication and session events |
241
+ | `pam` | Linux PAM | Pluggable Authentication Module events |
242
+ | `systemd` | Linux systemd | System service management events |
243
+ | `crond` | Linux cron | Scheduled task execution events |
244
+ | `filebeat_diagnostic` | Elastic Filebeat | Log shipper diagnostic events |
245
+ | `security` | Linux Security | SELinux and security subsystem events |
246
+
247
+ ### WitFoo Precinct 6.x
248
+
249
+ WitFoo Precinct is a SOAR (Security Orchestration, Automation, and Response) platform that ingests security telemetry from diverse sources, parses events using vendor-specific field extractors, correlates events into incidents using automated threat detection rules, and maps findings to security frameworks. Key capabilities relevant to this dataset:
250
+
251
+ - **Signal Processing:** Multi-stage pipeline with field extraction, normalization, and enrichment
252
+ - **Incident Correlation:** Automated grouping of related signals into incident graphs with nodes (hosts, credentials, actors) and edges (connections, communications)
253
+ - **Framework Mapping:** Events and incidents are mapped to MITRE ATT&CK, MITRE D3FEND, NIST 800-53, NIST CSF, CIS Controls, PCI DSS, ISO 27001, SOC 2, and CMMC frameworks
254
+ - **Suspicion Scoring:** Proprietary scoring algorithm that assigns suspicion levels to nodes and incidents based on observed behavior patterns
255
+
256
+ ## Labeling Methodology
257
+
258
+ ### Binary Labels (`malicious` / `benign`)
259
+
260
+ Labels are derived from WitFoo Precinct's automated incident analysis:
261
+
262
+ - **`malicious`**: The event appears as a lead (triggering artifact) in one or more confirmed incidents with suspicion_score > 0. These events were identified by WitFoo's detection rules as part of attack patterns or suspicious activity chains.
263
+ - **`benign`**: The event does not appear in any incident, or appears only in incidents classified as false positives.
264
+
265
+ ### Label Distribution
266
+
267
+ | Label | Count | Percentage |
268
+ |-------|-------|------------|
269
+ | `malicious` | 34,362 | ~1.8% |
270
+ | `benign` | ~1.91M | ~98.2% |
271
+
272
+ This imbalanced distribution reflects the reality of production SOC environments where the vast majority of events are benign, and is consistent with published IDS datasets (DARPA TC, LANL).
273
+
274
+ ### MITRE ATT&CK Mappings
275
+
276
+ Attack technique and tactic labels are derived from WitFoo's framework mapping of incident patterns. The `lifecycle_stage` field maps events to the 7-stage APT kill chain used by KnowHow and similar provenance graph detection systems:
277
+
278
+ 1. `initial-compromise` — Initial access to the network
279
+ 2. `establish-foothold` — Execution and establishing persistence
280
+ 3. `escalate-privilege` — Privilege escalation attempts
281
+ 4. `internal-reconnaissance` — Discovery and internal scanning
282
+ 5. `move-laterally` — Lateral movement between hosts
283
+ 6. `maintain-persistence` — Command & control and persistence
284
+ 7. `complete-mission` — Data theft, exfiltration, or impact
285
+
286
+ ## Sanitization Methodology
287
+
288
+ All customer-identifying information has been removed through a comprehensive, iterative multi-layer sanitization pipeline. **Quality was prioritized over processing speed** — the dataset underwent multiple full re-sanitization cycles until convergence (near-zero new PII discoveries per cycle).
289
+
290
+ ### Pipeline Architecture
291
+
292
+ The sanitization pipeline operates in 4 layers, applied iteratively. Each cycle processes all ~2 million records, and the pipeline repeats until Layers 3 and 4 find no (or near-zero) additional PII. A persistent **PII Registry** (SQLite-backed) maintains a global mapping of every original value to its sanitized replacement. The same original value always maps to the same token, preserving graph topology, network relationships, and host behavior patterns across all records.
293
+
294
+ A self-referencing token guard prevents the pipeline from registering its own replacement tokens (e.g., `HOST-0001`, `ORG-1234`) as new PII entries, which would otherwise cause runaway registry inflation during iterative cycles.
295
+
296
+ ### Layer 1: Structured Field Sanitization + Aho-Corasick Sweep
297
+
298
+ **Structured field matching:** Known JSON fields are sanitized based on their semantic meaning using deterministic regex and format-aware type inference:
299
+
300
+ - **IP addresses** → Private IPs remapped deterministically within RFC 1918 ranges using HMAC-based subnet-preserving mapping; public IPs replaced with RFC 5737 TEST-NET addresses (192.0.2.0/24, 198.51.100.0/24, 203.0.113.0/24)
301
+ - **Organization names** → `ORG-NNNN`
302
+ - **Hostnames** → `HOST-NNNN` or `host-NNNN.example.internal`
303
+ - **FQDNs** → `host-NNNN.example.internal` (public domains like google.com, microsoft.com are preserved via allowlist)
304
+ - **Usernames** → `USER-NNNN` (system accounts like `SYSTEM`, `LOCAL SERVICE`, `NETWORK SERVICE`, `root`, `sshd` are preserved)
305
+ - **Emails** → `user-NNNN@example.net`
306
+ - **Domains** → `domain-NNNN.example.net`
307
+ - **Windows SIDs** → `S-1-5-21-1000000000-2000000000-3000000000-NNNN` (well-known SIDs like `S-1-5-18` are preserved)
308
+ - **AWS Account IDs** → Sequential 12-digit replacements
309
+ - **ARNs** → `arn:aws:iam::NNNN:sanitized/NNNN`
310
+ - **Credentials / API keys** → `CRED-NNNN`
311
+ - **Machine accounts** → `MACHINE-NNNN$`
312
+
313
+ **Field-agnostic deep scanning:** All unknown or unrecognized JSON fields are inspected value-by-value using type heuristics (IP regex, FQDN patterns, email patterns, SID patterns, hostname conventions) to catch PII in fields not covered by structured parsers. Nested JSON objects and arrays are scanned recursively to arbitrary depth.
314
+
315
+ **Aho-Corasick multi-pattern sweep:** After field-level sanitization, the full serialized record is swept using an [Aho-Corasick automaton](https://en.wikipedia.org/wiki/Aho%E2%80%93Corasick_algorithm) built from all registry entries ≥4 characters. This catches PII values that appear in unexpected contexts — concatenated strings, log message bodies, cross-field references, and embedded JSON. The automaton is rebuilt each cycle as the registry grows.
316
+
317
+ ### Layer 2: Format-Specific Message Parsing
318
+
319
+ Raw log messages (`message_sanitized`) are parsed using 8 format-specific parsers that understand the exact structure of each vendor's log format:
320
+
321
+ - **Cisco ASA syslog** — Regex extraction of `src IFACE:IP/PORT dst IFACE:IP/PORT` patterns from ASA deny/permit messages
322
+ - **Windows Security Event XML** — DOM parsing of XML elements including `TargetUserName`, `IpAddress`, `WorkstationName`, `Computer`, `SubjectDomainName`, `SubjectUserName`, `TargetDomainName`, `MemberSid`
323
+ - **WinLogBeat JSON** — Full recursive parsing of nested WinLogBeat JSON structures, including `agent.name`, `host.hostname`, `winlog.event_data.*`, `organization`, `senderHost`, and all `SubjectDomainName`/`SubjectUserName`/`TargetUserName` fields within the embedded event data
324
+ - **AWS CloudTrail** — Sanitization of `userIdentity.accountId`, `userIdentity.arn`, `sourceIPAddress`, `userName`, `accessKeyId`, and recursive scanning of `requestParameters` and `responseElements`
325
+ - **Palo Alto Networks CSV** — BSD syslog header hostname extraction plus CSV body field parsing for source/destination IPs, hostnames, and user fields
326
+ - **VMware ESXi** — BSD syslog header hostname and IP extraction from vCenter/ESXi log formats
327
+ - **DNS events** — Sanitization of resolved IPs while preserving public domain names (google.com, microsoft.com, etc.) via a curated allowlist of ~1,000 public domains and TLDs
328
+ - **Generic fallback** — Comprehensive regex battery applied to all unrecognized formats: IP addresses, FQDNs, email addresses, Windows SIDs, machine accounts (`*$` pattern), ARNs, `user=`/`host=`/`domain=` key-value pairs, `\\DOMAIN\user` UNC paths, and BSD syslog header hostnames
329
+
330
+ ### Layer 3: ML/NER Residual Detection
331
+
332
+ After Layers 1–2, machine learning models scan a stratified random sample of 2,000 sanitized records for residual PII that regex and format parsers missed:
333
+
334
+ - **Microsoft Presidio** with spaCy `en_core_web_lg` model — Entity recognition for PERSON, ORGANIZATION, IP_ADDRESS, EMAIL_ADDRESS, with custom `PatternRecognizer` instances for AWS account IDs (12-digit patterns) and machine accounts (`*$` suffix)
335
+ - **HuggingFace BERT NER** (`dslim/bert-base-NER`) — Transformer-based token classification for PER (person), ORG (organization), and LOC (location) entities, providing a second-opinion cross-check against Presidio's spaCy-based detection
336
+
337
+ All ML findings are filtered against an allowlist of safe values (system accounts, well-known services, public domains) and existing registry entries. New PII discoveries are added to the registry and trigger a **full re-sanitization pass** across all ~2 million records.
338
+
339
+ ### Layer 4: Claude AI Contextual Review
340
+
341
+ A stratified random sample of 500 sanitized records (sampled proportionally across message types and stream names) is submitted to Anthropic's Claude API for contextual PII review. Claude is prompted to identify PII that pattern-based and NER approaches commonly miss:
342
+
343
+ - Organization names, abbreviations, or acronyms embedded in log messages
344
+ - Internal hostnames that reveal organizational structure or naming conventions
345
+ - Employee names embedded in file paths, process names, or service descriptions
346
+ - Custom Active Directory group names, policy names, or OU names that identify the organization
347
+ - Geographic identifiers tied to specific offices or data centers (e.g., `ATL-DC1`, `NYC-PROD`)
348
+ - Database instance names containing organization identifiers (e.g., `mssql$acmesql01`)
349
+
350
+ Claude's response is parsed for structured findings, each with a span, category, confidence score, and reasoning. New discoveries are added to the registry and trigger another full re-sanitization pass.
351
+
352
+ ### Iterative Convergence
353
+
354
+ The 4-layer pipeline runs in iterative cycles:
355
+
356
+ 1. **Cycle N**: Layers 1–2 sanitize all records using the current registry → Layer 3 (ML) scans a sample → Layer 4 (Claude) scans a sample → New findings are added to registry → Full re-sanitize if new PII found
357
+ 2. **Cycle N+1**: Repeat with the enriched registry — Layers 1–2 now catch everything previously found by ML/Claude
358
+ 3. **Convergence**: Cycles repeat until Layer 3 and Layer 4 find near-zero new entries
359
+
360
+ This iterative approach ensures that PII discovered by expensive ML/AI methods in one cycle is caught cheaply by regex/Aho-Corasick in all subsequent cycles across the full dataset (not just the sampled records).
361
+
362
+ ### Sanitization Registry Statistics
363
+
364
+ The final PII registry contains **~157,000 unique mappings** across 14 categories:
365
+
366
+ | PII Category | Entries Found | Replacement Pattern |
367
+ |--------------|--------------|---------------------|
368
+ | Public IPs | ~80,500 | RFC 5737 TEST-NET (deterministic) |
369
+ | Hostnames | ~21,900 | `HOST-NNNN` |
370
+ | Private IPs | ~18,000 | HMAC-remapped RFC 1918 (subnet-preserving) |
371
+ | Credentials | ~13,100 | `CRED-NNNN` |
372
+ | FQDNs | ~11,100 | `host-NNNN.example.internal` |
373
+ | Organizations | ~7,500 | `ORG-NNNN` |
374
+ | Usernames | ~2,400 | `USER-NNNN` |
375
+ | Windows SIDs | ~1,400 | Standardized replacement SIDs |
376
+ | Emails | ~575 | `user-NNNN@example.net` |
377
+ | Machine Accounts | ~350 | `MACHINE-NNNN$` |
378
+ | Domains | ~23 | `domain-NNNN.example.net` |
379
+ | AWS Accounts | ~16 | Sequential 12-digit IDs |
380
+ | Org IDs | 6 | Numeric replacement IDs |
381
+ | ARNs | 2 | `arn:aws:iam::NNNN:sanitized/NNNN` |
382
+
383
+ ### What Is Preserved
384
+
385
+ The following security-relevant information is intentionally preserved:
386
+ - **Timestamps** — Event timing, dwell time, and lateral movement sequences
387
+ - **Port numbers** — Protocol behavior signals
388
+ - **Protocol types** — TCP/UDP/ICMP classification
389
+ - **Severity levels** — Event priority and criticality
390
+ - **Vendor event codes** — Cisco ASA codes, Windows Event IDs, AWS API names
391
+ - **Action types** — Block, permit, logon, logoff, file access
392
+ - **MITRE ATT&CK / D3FEND mappings** — Framework technique and tactic IDs
393
+ - **Graph topology** — Node relationships and connection patterns (via consistent IP/hostname replacement)
394
+ - **Product/stream identifiers** — Which security tool generated the event
395
+
396
+ ## Intended Uses
397
+
398
+ ### Primary Use Cases
399
+
400
+ 1. **Provenance graph-based intrusion detection research** — Evaluate and benchmark graph-based IDS approaches (KnowHow, NodLink) on production-derived data
401
+ 2. **AI cyber defense simulation** — Train and evaluate reinforcement learning defense policies in CybORG and similar simulators
402
+ 3. **Security alert classification** — Build and evaluate ML models for malicious/benign event classification
403
+ 4. **Attack lifecycle analysis** — Study attack progression patterns mapped to MITRE ATT&CK
404
+
405
+ ### Research Context
406
+
407
+ This dataset was produced in collaboration with the University of Canterbury (New Zealand) Computer Science and Software Engineering department for two research projects:
408
+ - **AI Cyber-Security Battle Simulator** — Improving CybORG with realistic IDS observations, graph-based defense policies, and AI-driven attacker modeling
409
+ - **Intrusion Detection based on Provenance Graphs** — Evaluating reproducibility and generalizability of KnowHow and NodLink detection methods
410
+
411
+ ## Limitations
412
+
413
+ - **Label imbalance**: ~98% benign, ~2% malicious — reflects production SOC reality but may require sampling strategies for balanced training
414
+ - **Temporal scope**: Data covers July–August 2024, a limited time window
415
+ - **Organization diversity**: Data from 5 organizations, each with different security tool deployments
416
+ - **Sanitization trade-offs**: Some log message detail is reduced by PII replacement, particularly in free-text fields
417
+ - **Label derivation**: Binary labels depend on WitFoo's automated detection; some attacks may be unlabeled (false negatives) and some benign events may be incorrectly linked to incidents
418
+
419
+ ## Ethical Considerations
420
+
421
+ - All customer-identifying information has been removed through the 4-layer sanitization process described above
422
+ - The dataset does not contain personally identifiable information (PII) of any individual
423
+ - IP addresses, hostnames, usernames, and organization names have been replaced with consistent synthetic tokens
424
+ - The dataset should be used for defensive security research only
425
+
426
+ ## Citation
427
+
428
+ ```bibtex
429
+ @dataset{witfoo_precinct6_2025,
430
+ title={WitFoo Precinct6 Cybersecurity Dataset: Labeled Provenance Graphs and Signal Logs from Production SOC Operations},
431
+ author={WitFoo, Inc.},
432
+ year={2025},
433
+ url={https://huggingface.co/datasets/witfoo/precinct6-cybersecurity},
434
+ license={Apache-2.0}
435
+ }
436
+ ```
437
+
438
+ ## License
439
+
440
+ This dataset is released under the [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0).