HF INCIDENT REPLAY
▸ emulate the public incident safely.
Safely replay the public Hugging Face agent intrusion with Elastic detections.
Generate synthetic telemetry shaped from the public Hugging Face incident, exercise OOTB Elastic Security and Elastic Defend coverage, and produce a coherent attack narrative from the resulting alerts.
Inspired by and credited to Hugging Face's public incident materials: technical timeline and interactive attack replay. This project is an independent synthetic Elastic emulation and is not affiliated with Hugging Face.
Five stages to a coherent attack narrative.
Live action stream
representative eventsdataset_config_processed file.path=/proc/self/environfootholdpython3 -c "gzip/base64 staged execution marker"c2/dropperenv; cat /proc/self/mountinfo; getent hosts internal connectorreconcreate serviceaccounts/token; create selfsubjectrulesreviewsk8s rbaccreate privileged pod hostPath=/; chroot /hostnode pivotGetCallerIdentity; DescribeVpcs; ListClusters; GetAuthorizationTokencloud iamtailscaled --tun=userspace-networking --state=mem: --socks5-server=127.0.0.1:1055tailscaleintegration_installation_token.create; pull_request.creategithubPOST encoded chunks to capture, dataset, paste, and proxy destinationsexfilOut-of-the-box Elastic coverage that would help
primary story: SIEM + endpoint protectionsElastic Security / SIEM rules
Rules marked fired live are actively exercised: the kit writes precisely-shaped ECS telemetry to the real integration data streams and confirms each one produces alerts — 25 verified firing against the Elastic 9.x prebuilt package. Rules under reference coverage are relevant to this incident and stay listed for context, but this kit does not trigger them via synthetic ingestion on this stack (the per-item note says why).
- Suspicious Child Execution via Web Server
- Suspicious Command Execution via Web Server
- Curl or Wget Spawned via Node.js
- Base64 Decoded Payload Piped to Interpreter
- GenAI CLI Started with Unsafe Permission Bypass
- Kubernetes and Cloud Credential Path Access via Process Arguments
- Curl SOCKS Proxy Activity from Unusual Parent
- Potential Linux Tunneling and/or Port Forwarding via Command Line
- Kubernetes Direct API Request via Curl or Wget
- Kubernetes Service Account Token Created via TokenRequest API
- Kubernetes Secret get or list with Suspicious User Agent
- Kubernetes Secret get or list from Node or Pod Service Account
- Kubernetes Secrets List Across Cluster or Sensitive Namespaces
- Kubernetes Privileged Pod Created
- Kubernetes Pod Created with a Sensitive hostPath Volume
- Kubernetes Pod Created With HostPID
- Kubernetes Pod Created With HostNetwork
- Kubernetes Pod Created With HostIPC
- Kubernetes Denied Service Account Request via Unusual User Agent
- Kubernetes Suspicious Self-Subject Review via Unusual User Agent
- Kubernetes Multi-Resource Discovery
- GenAI Process Accessing Sensitive Files — needs endpoint file events
- GenAI Process Connection to Unusual Domain — new_terms, macOS network
- GenAI Process Connection to Suspicious Top Level Domain — Windows/macOS network only
- GenAI Process Performing Encoding/Chunking Prior to Network Activity — process→network sequence
- Connection to Common Large Language Model Endpoints — Windows/macOS DNS only
- Unusual Process Modifying GenAI Configuration File — new_terms, endpoint file events
- Elastic Defend Alert from GenAI Utility or Descendant — ES|QL, needs Elastic Defend endpoint alerts
- LLM-Based Attack Chain Triage by Host — ES|QL, needs an LLM inference connector
Elastic Defend endpoint protections
MITRE ATT&CK coverage matrix
SIEM + endpoint + optional generated rulesOptional generated SIEM rules
add-on contentRun this replay against Elastic
self-hosted · API driven · taggedlogs-frontier_lab_agent_emulation.* data streams designed to exercise OOTB coverage first.frontier-lab-agent-emulation-run-<timestamp>.--include-custom-rules to create the generated gap-filler rules shown above.--list-connectors, then choose one with --connector-name or --connector-id/--connector-type.export ELASTIC_USERNAME="elastic-user"
export ELASTIC_PASSWORD="elastic-password"
python3 scripts/run_hf_emulation.py \
--es-url http://localhost:9200 \
--kibana-url http://localhost:5601 \
--space default
View full Python runner script
Loading scripts/run_hf_emulation.py...