Skip to content
Threat Feed
high advisory

Detection of Suspicious AWS API Activity via Offensive Tooling User Agents

This brief details the detection of successful AWS API calls utilizing user-agent fingerprints associated with Kali Linux or TruffleHog, which are commonly indicative of credential testing or unauthorized access attempts.

Security teams should monitor for unauthorized use of AWS API credentials by identifying suspicious user-agent strings within CloudTrail logs. Attackers frequently use Kali Linux to interact with AWS environments, leaving distrib#kali fingerprints, or leverage tools like TruffleHog to validate stolen credentials against cloud APIs. These activities are highly indicative of compromised IAM principals or unauthorized external scanning. While these tools may exist within authorized penetration testing or DevSecOps workflows, their usage outside of documented change windows or by unexpected IAM roles often signals an active security incident. This detection mechanism specifically targets successful API calls to distinguish between noise and high-confidence alerts.

Attack Chain

  1. Attacker obtains valid AWS IAM access keys or temporary security tokens through phishing, secret leakage, or source-code repository compromise.
  2. Attacker configures a CLI/SDK environment, potentially using a Kali Linux distribution for its pre-installed toolset.
  3. Attacker uses a tool such as TruffleHog to programmatically verify the validity and scope of the stolen credentials by making authenticated AWS API calls.
  4. Attacker performs discovery tasks, such as ListRoles, GetCallerIdentity, or ListBuckets, to assess the permissions attached to the compromised account.
  5. Attacker executes higher-impact API actions, such as CreateAccessKey for persistent access or AssumeRole to escalate privileges across accounts.
  6. Attacker exfiltrates sensitive data or modifies infrastructure configurations to establish long-term persistence.

Impact

Successful exploitation allows threat actors to gain unauthorized access to cloud environments, leading to potential data exfiltration, service disruption, or infrastructure manipulation. The use of automated tools allows for rapid discovery and privilege expansion, potentially exposing an entire organization's cloud footprint if high-privileged keys are compromised.

Recommendation

  • Deploy the provided Sigma rule to alert on non-standard user agents in your SIEM environment.
  • Implement service control policies (SCPs) or IAM policies to restrict API access for sensitive roles to known corporate IP ranges or VPN gateways.
  • Establish a process to audit and rotate access keys for any IAM principal flagged by these user-agent signatures.
  • Review all authorized red team or automated security scanning activities to ensure they are properly documented and allowlisted to reduce alert fatigue.

Immediate actions

Review CloudTrail logs for the flagged indicators and verify the IAM principal intent.

SOC 24h

Threat Hunt

Search for non-standard user agent strings in CloudTrail logs originating from unusual source IPs.

T1078 medium medium confidence convert to detection

Data: user_agent.original, source.ip

Mitigations

Enforce MFA and source IP restrictions on high-privileged IAM roles.

short_term IT Operations

T1078.004

Detection coverage 1

AWS Suspicious User Agent Fingerprint

high

Detects successful AWS API calls using user agents associated with Kali Linux or TruffleHog, indicating potential credential validation or unauthorized access.

sigma tactics: initial_access techniques: T1078.004 sources: webserver, aws

Detection queries are available on the platform. Get full rules →