Detection: Cisco Isovalent - Access To Cloud Metadata Service

Description

The following analytic detects workloads accessing the cloud instance metadata service at 169.254.169.254. This IP is used by AWS, GCP and Azure metadata endpoints and is frequently abused in SSRF or lateral movement scenarios to obtain credentials and sensitive environment details. Monitor unexpected access to this service from application pods or namespaces where such behavior is atypical.

 1`cisco_isovalent_process_connect` 
 2| rename process_connect.parent.binary as binary 
 3| `excluded_cloud_binaries`
 4
 5| stats count 
 6        min(_time) as firstTime 
 7        max(_time) as lastTime 
 8        values(dest_port) as dest_port
 9        values(src_ip) as src_ip
10    by cluster_name pod_name pod_image_name pod_namespace node_name dest_ip
11
12| `security_content_ctime(firstTime)`
13
14| `security_content_ctime(lastTime)`
15
16| `cisco_isovalent___access_to_cloud_metadata_service_filter`

Data Source

Name Platform Sourcetype Source
Cisco Isovalent Process Connect Other 'cisco:isovalent:processConnect' 'not_applicable'

Macros Used

Name Value
cisco_isovalent_process_connect sourcetype=cisco:isovalent:processConnect
cisco_isovalent___access_to_cloud_metadata_service_filter search *
cisco_isovalent___access_to_cloud_metadata_service_filter is an empty macro by default. It allows the user to filter out any results (false positives) without editing the SPL.

Annotations

- MITRE ATT&CK
+ Kill Chain Phases
+ NIST
+ CIS
- Threat Actors
ID Technique Tactic
T1552.005 Cloud Instance Metadata API Credential Access
Exploitation
DE.AE
CIS 13

Default Configuration

This detection is configured by default in Splunk Enterprise Security to run with the following settings:

Setting Value
Disabled true
Cron Schedule 0 * * * *
Earliest Time -70m@m
Latest Time -10m@m
Schedule Window auto
Creates Risk Event True
This configuration file applies to all detections of type anomaly. These detections will use Risk Based Alerting.

Implementation

This detection relies on Cisco Isovalent Runtime Security process_connect telemetry. Deploy Isovalent Runtime Security and the Cisco Security Cloud TA to collect these logs via HEC and normalize them. Optionally, a similar variant can be built with process_exec by looking for command-lines that reference 169.254.169.254 (for example curl or wget invocations from within pods). Please update a macro named excluded_cloud_binaries that returns true for binaries that are known to access the cloud metadata service.

Known False Positives

Legitimate platform components and node agents may query the metadata service. Validate by namespace, labels and workload identity; suppress expected sources and alert on atypical pods or namespaces.

Associated Analytic Story

Risk Based Analytics (RBA)

Risk Message:

Pod [$pod_name$] accessed the cloud metadata service [$dest_ip$] in cluster [$cluster_name$]

Risk Object Risk Object Type Risk Score Threat Objects
pod_name system 50 src_ip

References

Detection Testing

Test Type Status Dataset Source Sourcetype
Validation Passing N/A N/A N/A
Unit Passing Dataset not_applicable cisco:isovalent:processConnect
Integration ✅ Passing Dataset not_applicable cisco:isovalent:processConnect

Replay any dataset to Splunk Enterprise by using our replay.py tool or the UI. Alternatively you can replay a dataset into a Splunk Attack Range


Source: GitHub | Version: 1