Synthetic Elastic replay for the Hugging Face incident
HF ATTACK EMU
▸ emulate the public incident safely.
A tool to emulate the Hugging Face agent intrusion in Elastic Security.
Generate safe synthetic telemetry for the public Hugging Face agent intrusion, exercise OOTB Elastic Security 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.
// replay diagram
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
Worker and GenAI host detections 9
- Suspicious Child Execution via Web Server
- Curl or Wget Spawned via Node.js
- GenAI Process Accessing Sensitive Files
- GenAI Process Connection to Unusual Domain
- GenAI Process Connection to Suspicious Top Level Domain
- GenAI Process Performing Encoding/Chunking Prior to Network Activity
- Connection to Common Large Language Model Endpoints
- Unusual Process Modifying GenAI Configuration File
- GenAI CLI Started with Unsafe Permission Bypass
Kubernetes, cloud, and identity 12
- Kubernetes Denied Service Account Request via Unusual User Agent
- Kubernetes Suspicious Self-Subject Review via Unusual User Agent
- Kubernetes Multi-Resource Discovery
- Kubernetes Secret get or list with Suspicious User Agent
- Kubernetes Secret get or list from Node or Pod Service Account
- Kubernetes Service Account Token Created via TokenRequest API
- Kubernetes Direct API Request via Curl or Wget
- Kubernetes Privileged Pod Created
- Kubernetes Pod Created with a Sensitive hostPath Volume
- AWS Discovery API Calls via CLI from a Single Resource
- AWS STS GetCallerIdentity API Called for the First Time
- AWS EC2 Role GetCallerIdentity from New Source AS Organization
Correlation and triage 2
Elastic Defend endpoint protections
Execution and payload behavior 5
Credential collection and persistence 5
Egress and suspicious binaries 2
MITRE ATT&CK coverage matrix
SIEM + endpoint + optional generated rules
Card color:
more synthetic activity in this tactic
some activity
lower activity
Coverage badge:
SIEMalert rules from Elastic Security
EDRendpoint protections from Elastic Defend
OPToptional generated rules from this kit
Initial Access3
Exploit Public-Facing AppT119011
Supply Chain CompromiseT11955
External Remote ServicesT11333
Execution4
Command and Scripting InterpreterT105915
PythonT1059.0068
Unix ShellT1059.0046
User ExecutionT12043
Persistence2
External ProxyT10904
Create Account / TokenT11362
Privilege Esc.4
Escape to HostT16118
Additional Cloud RolesT1098.0035
Valid AccountsT10784
Sudo Chroot AttemptCVE-2025-324632
Stealth0
No activity
Credential Access6
Unsecured CredentialsT155216
Cloud CredentialsT1552.0059
Proc Filesystemprocfs7
Secrets ManagerGetSecretValue5
Discovery5
Cloud Service DiscoveryT152616
Permission Groups DiscoveryT106912
System Information DiscoveryT10826
Lateral Movement3
Proxy / TunnelT109011
Remote ServicesT10214
C25
Ingress Tool TransferT110515
ProxyT109011
Web ServiceT11026
Exfiltration3
Exfiltration Over C2 ChannelT104120
Exfiltration to Cloud StorageT15377
Source Code Exfiltrationgit.clone5
Impact0
No destructive activity
Optional generated SIEM rules
add-on contentDataset Worker Local File Disclosure via External Referencegenerated locally
Python Gzip Base64 Payload Executiongenerated locally
Linux Service Account Token and Environment Discoverygenerated locally
Kubernetes Service Account TokenRequest and RBAC Reviewgenerated locally
Kubernetes Privileged Pod Created With HostPath Mountgenerated locally
Cloud Metadata Credential Access Followed by IAM Enumerationgenerated locally
Tailscale Userspace Networking Proxy Startedgenerated locally
GitHub App Installation Token Created and Repository Accessgenerated locally
Chunked Exfiltration to Public Dead-Drop Servicesgenerated locally
Run this replay against Elastic
self-hosted · API driven · taggedCreates:
logs-frontier_lab_agent_emulation.* data streams designed to exercise OOTB coverage first.Scopes: every run with
frontier-lab-agent-emulation-run-<timestamp>.Optional: add
--include-custom-rules to create the generated gap-filler rules shown above.Connector: run
--list-connectors, then choose one with --connector-name or --connector-id/--connector-type.
recommended command
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
language: python
open script source
Loading scripts/run_hf_emulation.py...