T1552.005 CrowdStrike LogScale · LogScale

Detect Cloud Instance Metadata API in CrowdStrike LogScale

Adversaries may attempt to access the Cloud Instance Metadata API to collect credentials and other sensitive data. Most cloud providers host a metadata API at http://169.254.169.254 (AWS, Azure, GCP, DigitalOcean) or http://fd00:ec2::254 (AWS IPv6). This internal endpoint provides running instances with credentials including temporary IAM role credentials (AWS), managed identity tokens (Azure), and service account tokens (GCP). Adversaries with code execution on a VM can query this endpoint directly, or exploit Server-Side Request Forgery (SSRF) vulnerabilities in public-facing applications to retrieve cloud credentials from external networks. TeamTNT, Peirates, and Hildegard have all exploited this API. The Capital One breach involved SSRF to the metadata API.

MITRE ATT&CK

Tactic
Credential Access
Technique
T1552 Unsecured Credentials
Sub-technique
T1552.005 Cloud Instance Metadata API
Canonical reference
https://attack.mitre.org/techniques/T1552/005/

LogScale Detection Query

CrowdStrike LogScale (LogScale)
cql
// Cloud Instance Metadata API Access Detection — CrowdStrike LogScale (CQL)
// Pattern 1: Network connections to metadata endpoint IP
#event_simpleName = NetworkConnectIP4
| ipv4Destination = "169.254.169.254"
| ImageFileName = /(?i)^(?!.*(AzureGuestAgent|WindowsAzureGuestAgent|WaAppAgent|amazon-ssm-agent|google_guest_agent|cloud-init|waagent|aws-cfn-bootstrap)).*/
| table([@timestamp, ComputerName, UserName, ImageFileName, CommandLine, ContextBaseFileName, ipv4Destination, RemotePort])

// Pattern 2: Process events with metadata API command line patterns
| union {
  #event_simpleName = ProcessRollup2
  | CommandLine = /(?i)(169\.254\.169\.254|metadata\/instance|iam\/security-credentials|latest\/meta-data|latest\/dynamic|instance-identity|computeMetadata|metadata\.google\.internal|imds\.azure\.com|metadata\/v1)/
  | CommandLine != /(?i)(aws-cfn-bootstrap|cloud-init|amazon-ssm|google_guest_agent|waagent|AzureGuestAgent)/
  | table([@timestamp, ComputerName, UserName, FileName, CommandLine, ParentBaseFileName, SHA256HashData])
}

// Pattern 3: DNS requests resolving metadata hostnames
| union {
  #event_simpleName = DnsRequest
  | DomainName = /(?i)(metadata\.google\.internal|imds\.azure\.com)/
  | ContextBaseFileName != /(?i)(AzureGuestAgent|amazon-ssm-agent|google_guest_agent|cloud-init)/
  | table([@timestamp, ComputerName, UserName, ContextBaseFileName, DomainName, RequestType])
}

| sort(@timestamp, order=desc, limit=500)
high severity high confidence

CrowdStrike LogScale (CQL) query detecting Cloud Instance Metadata API access using Falcon telemetry. Covers three patterns: direct network connections to 169.254.169.254 (NetworkConnectIP4), process launches with IMDS command line patterns (ProcessRollup2), and DNS resolutions of metadata hostnames (DnsRequest). Excludes known cloud management agent processes.

Data Sources

CrowdStrike Falcon Endpoint Protection (EDR)Falcon Event Stream — ProcessRollup2Falcon Event Stream — NetworkConnectIP4Falcon Event Stream — DnsRequest

Required Tables

ProcessRollup2NetworkConnectIP4DnsRequest

False Positives & Tuning

  • HashiCorp Vault agent running on cloud VMs using AWS/Azure/GCP auth methods that query IMDS to obtain a signed identity document for Vault authentication during secrets retrieval
  • Kubernetes node bootstrap processes (kubelet, kube-proxy, cloud-controller-manager) on managed cloud Kubernetes nodes that use IMDS to retrieve node identity and cluster configuration
  • Serverless function runtimes and container-on-VM workloads (AWS Fargate on EC2, Azure Container Instances) where the container runtime itself legitimately queries the underlying host's IMDS for execution environment metadata
Download portable Sigma rule (.yml)

Other platforms for T1552.005


Testing Methodology

Validate this detection against 4 adversary techniques from Atomic Red Team. Each test below lists the behaviour to exercise and the telemetry you should expect to see. Executable commands and cleanup steps are available with Pro.

  1. Test 1Query AWS Instance Metadata for IAM Credentials

    Expected signal: Linux auditd EXECVE records for curl with 169.254.169.254 metadata URLs. CONNECT syscall to 169.254.169.254:80. Network connection visible in /proc/net/tcp. AWS access logs would capture this if instance metadata logging is enabled.

  2. Test 2Query Azure IMDS for Managed Identity Token

    Expected signal: Linux auditd EXECVE for curl with 169.254.169.254 and metadata/identity in args. HTTP connection to 169.254.169.254. Response contains access_token, token_type, expires_in fields.

  3. Test 3Query GCP Instance Metadata for Service Account Token

    Expected signal: Linux auditd EXECVE for curl with metadata.google.internal URL. DNS resolution for metadata.google.internal (resolves to 169.254.169.254). Network connection to 169.254.169.254:80.

  4. Test 4Steal Cloud Credentials via Python SSRF Simulation

    Expected signal: Linux auditd EXECVE for python3 with 169.254.169.254 URL in command. CONNECT syscall from python3 to 169.254.169.254. Unexpected process (python3) accessing metadata API.

Unlock Pro Content

Get the full detection package for T1552.005 including response playbook, investigation guide, and atomic red team tests.

Response PlaybookInvestigation GuideHunting QueriesAtomic Red Team TestsTuning Guidance

Related Detections