Skip to main content
Splunk Lantern

Kubernetes (Amazon EKS) accounts accessing sensitive objects

Sensitive object access is not necessarily malicious, but user and object context can provide guidance for detection. You want to investigate sensitive object access on your network to determine if it represents a threat. 


Run the following search. You can optimize it by specifying an index and adjusting the time range.

sourcetype="aws:cloudwatchlogs:eks" objectRef.resource=secrets OR configmaps sourceIPs{}!=::1 sourceIPs{}!=<valid IP address>  
| table sourceIPs{} user.username user.groups{} objectRef.resource objectRef.namespace 
| dedup user.username user.groups{} 

Search explanation

The table provides an explanation of what each part of this search achieves. You can adjust this query based on the specifics of your environment.

Splunk Search Explanation


Search only AWS EKS Kubernetes data.

objectRef.resource=secrets OR configmaps sourceIPs{}!=::1 

Search specific, sensitive resources such as secrets or configmaps.

sourceIPs{}!=<valid IP address>

Exclude a legitimate IP address from the search.

| table sourceIPs{} user.username user.groups{} objectRef.resource objectRef.namespace 

Display the results in a table with columns in the order shown.

| dedup user.username user.groups{} 

Remove duplicate results from the same user names and user groups.

Next steps

Compromise of sensitive objects can lead to cluster compromise and further lateral movement. Secrets and configmaps are highly sensitive objects due the cluster information they contain. Multiple failed or denied attempts may indicate suspicious activity. Source IP address, users, geolocation, and reputation are other useful contextual items to evaluate to look for compromise. To refine the search, adding!=allow may give fewer results and more specific context on errors or suspicious requests.

For additional information about this search, such as its applicability to common frameworks and standards, see this project on GitHub for AWS, Azure, or GCP.

Finally, you might be interested in other processes associated with the Monitoring Kubernetes sensitive object access use case.