Upload README.md with huggingface_hub
Browse files
README.md
CHANGED
|
@@ -376,68 +376,13 @@ Attack technique and tactic labels are derived from WitFoo's framework mapping o
|
|
| 376 |
|
| 377 |
## Sanitization Methodology
|
| 378 |
|
| 379 |
-
All customer-identifying information has been removed through a comprehensive, iterative
|
| 380 |
|
| 381 |
-
###
|
| 382 |
|
| 383 |
-
|
| 384 |
|
| 385 |
-
|
| 386 |
-
|
| 387 |
-
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.
|
| 388 |
-
|
| 389 |
-
### Layer 1: Structured Field Sanitization + Aho-Corasick Sweep
|
| 390 |
-
|
| 391 |
-
**Structured field matching:** Known JSON fields are sanitized based on their semantic meaning using deterministic regex and format-aware type inference:
|
| 392 |
-
|
| 393 |
-
- **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)
|
| 394 |
-
- **Organization names** → `ORG-NNNN`
|
| 395 |
-
- **Hostnames** → `HOST-NNNN` or `host-NNNN.example.internal`
|
| 396 |
-
- **FQDNs** → `host-NNNN.example.internal` (public domains like google.com, microsoft.com are preserved via allowlist)
|
| 397 |
-
- **Usernames** → `USER-NNNN` (system accounts like `SYSTEM`, `LOCAL SERVICE`, `NETWORK SERVICE`, `root`, `sshd` are preserved)
|
| 398 |
-
- **Emails** → `user-NNNN@example.net`
|
| 399 |
-
- **Domains** → `domain-NNNN.example.net`
|
| 400 |
-
- **Windows SIDs** → `S-1-5-21-1000000000-2000000000-3000000000-NNNN` (well-known SIDs preserved)
|
| 401 |
-
- **AWS Account IDs** → Sequential 12-digit replacements
|
| 402 |
-
- **ARNs** → `arn:aws:iam::NNNN:sanitized/NNNN`
|
| 403 |
-
- **Credentials / API keys** → `CRED-NNNN`
|
| 404 |
-
- **Machine accounts** → `MACHINE-NNNN$`
|
| 405 |
-
|
| 406 |
-
**Field-agnostic deep scanning:** All unknown JSON fields are inspected recursively using type heuristics to catch PII in fields not covered by structured parsers.
|
| 407 |
-
|
| 408 |
-
**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 (~166,000 patterns). Product identifiers (stream names, message types, pipeline names, severity codes, etc.) are protected from the sweep.
|
| 409 |
-
|
| 410 |
-
### Layer 2: Format-Specific Message Parsing
|
| 411 |
-
|
| 412 |
-
Raw log messages are parsed using 8 format-specific parsers:
|
| 413 |
-
|
| 414 |
-
- **Cisco ASA syslog** — `src IFACE:IP/PORT dst IFACE:IP/PORT` patterns
|
| 415 |
-
- **Windows Security Event XML** — DOM parsing of `TargetUserName`, `IpAddress`, `WorkstationName`, `SubjectDomainName`, `MemberSid`, etc.
|
| 416 |
-
- **WinLogBeat JSON** — Recursive parsing of nested structures including `agent.name`, `host.hostname`, `winlog.event_data.*`, `organization`
|
| 417 |
-
- **AWS CloudTrail** — `userIdentity`, `sourceIPAddress`, `userName`, `accessKeyId`, recursive `requestParameters`/`responseElements`
|
| 418 |
-
- **Palo Alto Networks CSV** — BSD syslog header + CSV field parsing
|
| 419 |
-
- **VMware ESXi** — BSD syslog header hostname and IP extraction
|
| 420 |
-
- **DNS events** — IP sanitization with public domain allowlist (~1,000 domains)
|
| 421 |
-
- **Generic fallback** — Comprehensive regex battery for all unrecognized formats
|
| 422 |
-
|
| 423 |
-
### Layer 3: ML/NER Residual Detection
|
| 424 |
-
|
| 425 |
-
Machine learning models scan a stratified random sample of sanitized records:
|
| 426 |
-
|
| 427 |
-
- **Microsoft Presidio** with spaCy `en_core_web_lg` — Entity recognition for PERSON, ORGANIZATION, IP_ADDRESS, EMAIL_ADDRESS
|
| 428 |
-
- **HuggingFace BERT NER** (`dslim/bert-base-NER`) — Transformer-based PER, ORG, LOC detection
|
| 429 |
-
|
| 430 |
-
### Layer 4: Claude AI Contextual Review
|
| 431 |
-
|
| 432 |
-
A stratified sample is submitted to Anthropic's Claude API for contextual PII review, catching organization names, internal hostnames, employee names in file paths, AD group names, geographic identifiers, and database instance names.
|
| 433 |
-
|
| 434 |
-
### Iterative Convergence
|
| 435 |
-
|
| 436 |
-
The 4-layer pipeline runs in iterative cycles until Layer 3 and Layer 4 find near-zero new entries. PII discovered by ML/AI in one cycle is caught by regex/Aho-Corasick in all subsequent cycles across the full dataset.
|
| 437 |
-
|
| 438 |
-
### Sanitization Registry Statistics
|
| 439 |
-
|
| 440 |
-
The final PII registry contains **~302,000 unique mappings** across 14 categories:
|
| 441 |
|
| 442 |
| PII Category | Entries | Replacement Pattern |
|
| 443 |
|--------------|---------|---------------------|
|
|
@@ -456,8 +401,26 @@ The final PII registry contains **~302,000 unique mappings** across 14 categorie
|
|
| 456 |
| Domains | 23 | `domain-NNNN.example.net` |
|
| 457 |
| Org IDs | 6 | Numeric replacement IDs |
|
| 458 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 459 |
### What Is Preserved
|
| 460 |
|
|
|
|
|
|
|
| 461 |
- **Timestamps** — Event timing, dwell time, and lateral movement sequences
|
| 462 |
- **Port numbers** — Protocol behavior signals
|
| 463 |
- **Protocol types** — TCP/UDP/ICMP classification
|
|
|
|
| 376 |
|
| 377 |
## Sanitization Methodology
|
| 378 |
|
| 379 |
+
All customer-identifying information has been removed through a comprehensive, iterative four-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). The sanitization pipeline is [open source](https://github.com/witfoo/dataset-from-precinct6) under the Apache 2.0 license.
|
| 380 |
|
| 381 |
+
### Layer 1: Structured Field Sanitization with Multi-Pattern Sweep
|
| 382 |
|
| 383 |
+
Known data fields are sanitized based on their semantic meaning using deterministic replacement rules. IP addresses are replaced with reserved documentation ranges ([RFC 5737](https://datatracker.ietf.org/doc/html/rfc5737) for public IPs, HMAC-based remapping for private IPs that preserves subnet relationships). Hostnames, usernames, organization names, email addresses, Windows Security Identifiers, AWS account numbers, and credentials are each replaced with consistent sequential tokens (e.g., `HOST-0001`, `USER-0001`, `ORG-0001`). All replacements are consistent — the same original value always maps to the same sanitized token across every record, preserving network relationships and graph topology essential for security research.
|
| 384 |
|
| 385 |
+
After field-level sanitization, every record is swept using an [Aho-Corasick](https://en.wikipedia.org/wiki/Aho%E2%80%93Corasick_algorithm) multi-pattern matching automaton built from the full registry of over 300,000 known PII values. This catches PII that appears in unexpected contexts such as concatenated strings, cross-field references, and embedded data structures. Product identifiers (vendor names, event types, pipeline names) are explicitly protected from this sweep to preserve the security-relevant metadata researchers need.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 386 |
|
| 387 |
| PII Category | Entries | Replacement Pattern |
|
| 388 |
|--------------|---------|---------------------|
|
|
|
|
| 401 |
| Domains | 23 | `domain-NNNN.example.net` |
|
| 402 |
| Org IDs | 6 | Numeric replacement IDs |
|
| 403 |
|
| 404 |
+
### Layer 2: Format-Specific Log Message Parsing
|
| 405 |
+
|
| 406 |
+
Raw security log messages come in diverse vendor-specific formats. Eight specialized parsers handle the major formats: Cisco ASA syslog, Microsoft Windows Security Event XML, Elastic WinLogBeat JSON, AWS CloudTrail, Palo Alto Networks, VMware vCenter, DNS resolution logs, and a comprehensive generic fallback parser. Each parser understands the exact structure of its format and sanitizes PII within structured fields like XML elements, nested JSON objects, and CSV columns — contexts where simple pattern matching would be unreliable.
|
| 407 |
+
|
| 408 |
+
### Layer 3: Machine Learning Residual Detection
|
| 409 |
+
|
| 410 |
+
After rule-based sanitization, machine learning models scan a stratified random sample of sanitized records for residual PII that pattern-based approaches may miss. Two complementary models are used: [Microsoft Presidio](https://microsoft.github.io/presidio/) (powered by a spaCy natural language processing model) for entity recognition of persons, organizations, IP addresses, and email addresses; and a [BERT-based Named Entity Recognition model](https://huggingface.co/dslim/bert-base-NER) for an independent second opinion on person, organization, and location entities. New discoveries are added to the PII registry and trigger a full re-sanitization pass across all records.
|
| 411 |
+
|
| 412 |
+
### Layer 4: Large Language Model Contextual Review
|
| 413 |
+
|
| 414 |
+
A stratified random sample of sanitized records is reviewed by Anthropic's [Claude](https://www.anthropic.com/claude) for contextual PII detection. The model is prompted to identify subtle PII that statistical pattern matching and NER models commonly miss: organization names or abbreviations embedded in log messages, internal hostnames that reveal organizational structure, employee names in file paths or service descriptions, Active Directory group names, and geographic identifiers tied to specific offices or data centers. Findings trigger additional registry updates and re-sanitization.
|
| 415 |
+
|
| 416 |
+
### Iterative Convergence
|
| 417 |
+
|
| 418 |
+
The four layers run in iterative cycles. PII discovered by the ML and AI layers in one cycle is added to the pattern-matching registry, ensuring it is caught automatically by Layer 1 in all subsequent cycles across the complete dataset — not just in the sampled records. Cycles repeat until the ML and AI layers find near-zero new discoveries, indicating convergence.
|
| 419 |
+
|
| 420 |
### What Is Preserved
|
| 421 |
|
| 422 |
+
The sanitization preserves all security-relevant information needed for research:
|
| 423 |
+
|
| 424 |
- **Timestamps** — Event timing, dwell time, and lateral movement sequences
|
| 425 |
- **Port numbers** — Protocol behavior signals
|
| 426 |
- **Protocol types** — TCP/UDP/ICMP classification
|