Skip to content

feat: PII Exfiltration to External Inference Services test (6d33cc62) - #64

Merged
ubercylon8 merged 3 commits into
mainfrom
feat/pii-exfil-inference-test
Jul 8, 2026
Merged

feat: PII Exfiltration to External Inference Services test (6d33cc62)#64
ubercylon8 merged 3 commits into
mainfrom
feat/pii-exfil-inference-test

Conversation

@ubercylon8

Copy link
Copy Markdown
Owner

Summary

Adds a multi-stage intel-driven test (6d33cc62-d59d-4661-a76d-715aa4abddfd) that helps organizations discover whether they leak PII to external AI inference services ("shadow AI" data governance). The test simulates the full killchain and validates whether DLP/CASB/egress controls detect or block PII heading to real AI vendor hosts. Maps to T1552.001, T1119, T1005, T1567.

Stages

  1. Shadow-AI staging & key discovery (T1552.001, T1119) — drops an AI-helper artifact, scans env/config for AI-service API keys
  2. Synthetic canary PII collection (T1005) — generates format/checksum-valid canary records (Luhn PANs, structured SSNs, @…invalid emails), tagged with a run-unique marker
  3. Exfiltration to inference services (T1567) — POSTs canary PII over real TLS, unauthenticated, to OpenAI / Anthropic / Gemini / Copilot; classifies leak vs. org-control block

Classification integrity (load-bearing)

Keys on who answered, not status code. A vendor 401/403 = the bytes crossed the boundary = LEAK (101). A block (126) requires positive evidence an org control intervened (DNS sinkhole, TLS-inspection cert error, proxy refuse/reset). Anything ambiguous → 999, never a default block (CLAUDE.md Rule 8). The three ambiguous edge cases (transparent-MITM 200, captive-portal redirect, silent timeout) are adjudicated to remain inconclusive (999) by design.

Safety

Canary-only synthetic PII (no real person), no credentials transmitted, artifacts cleaned from ARTIFACT_DIR after run (verified on both platforms).

Validation

  • win (Defender ON): exit 101 — all 4 vendors leaked, correctly classified; canary cleanup verified
  • debian (no EDR): exit 101 — cross-platform parity; canary cleanup verified
  • Egress classifier extracted into a classifier/ subpackage with committed tests: go test ./classifier green (27 sub-tests incl. DLP-vs-CDN header discrimination), go vet clean
  • Both platforms build 🟢 GREEN (Windows 6.56 MB, Linux 6.18 MB)

Test score

7.8/10 (v2.1)

Notes

  • Real AI-vendor egress is an explicit, owned trade-off (spec §6.3) — synthetic canaries only, hit unauthenticated so vendors never ingest a valid-auth body.
  • Design spec: docs/superpowers/specs/2026-07-07-pii-exfil-inference-services-design.md

🤖 Generated with Claude Code

ubercylon8 and others added 3 commits July 7, 2026 13:16
Multi-stage killchain (shadow-AI staging -> PII collection -> exfil to
real AI vendor hosts), Windows+Linux, synthetic canary PII, no creds.
Test UUID 6d33cc62-d59d-4661-a76d-715aa4abddfd.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Multi-stage cross-platform (Windows + Linux) intel-driven test validating
DLP/CASB/egress-proxy coverage of "shadow AI" PII egress:
  - Stage 1 (T1552.001, T1119): shadow-AI staging & AI-service key discovery
  - Stage 2 (T1005): synthetic canary PII collection (Luhn PANs, reserved-range
    SSNs, .invalid emails; run-unique marker; ARTIFACT_DIR cleanup)
  - Stage 3 (T1567): unauthenticated HTTPS egress to real OpenAI/Anthropic/
    Gemini/Copilot hosts with a positive-evidence-only leak-vs-block classifier

Classification integrity (CLAUDE.md Rule 8): a vendor 401/403 = LEAK (bytes
crossed the boundary), block only on positive org-control evidence (DNS
sinkhole, TLS-inspection failure, proxy refused/reset); leak-dominates
aggregation; three ambiguous edge cases left as TODO(user-adjudication)
stubs defaulting to 999.

Includes gzip-embed 8-step build_all.sh, F0RT1KA-signed Windows stages,
Schema v2.0 / RubricVersion v2.1 (score 7.8/10), README + info + references,
5 detection-rule formats (KQL/YARA/Sigma/EQL/LC D&R), defense guidance +
Windows/Linux hardening, and kill-chain diagram. Orchestrator GREEN tier
(6.57 MB win / 6.18 MB linux).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
… finalize edge-case wording

Move the integrity-critical leak/block/ambiguous classification out of the Stage 3
transport path into a classifier/ subpackage (package classifier) so it can be directly
go-tested — the stage directory has multiple package-main entrypoints and cannot be
tested as a unit. Adds classifier_test.go covering DLP-vs-CDN header discrimination,
redirect same-vendor vs non-vendor, and transport-error mapping (27 sub-tests; go vet
clean). stage-T1567.go is reduced to transport only and delegates to the package.

Adjudicate the three ambiguous edge cases (spec §4): all remain inconclusive (999),
never a block. Case (f) evidence reworded to 'DLP/SWG in-path, disposition unobservable
(blocked vs. forwarded)' — isolated tests ruled out CDN false-positives, but the
block-vs-passthrough disposition is unobservable client-side. Removes stale
user-adjudication TODOs. Behavior unchanged; re-validated end-to-end on debian (exit 101).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@ubercylon8
ubercylon8 merged commit 1b88443 into main Jul 8, 2026
8 of 14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant