DET-183 · agent · confidence Medium
Catching One Agent Credential Used in Many Places
Alert when the same agent token or key shows up from several hosts, regions or sessions at once.
A well-behaved agent credential comes from known workloads. When the same key shows up in two regions, from a laptop and a cloud runner, or in overlapping sessions, it has been copied, shared or stolen. Since agents run unattended, nobody notices this by eye.
Collect auth and token events with source IP, workload, user agent and session. Look for overlapping use, impossible travel between runtimes, and tokens used outside their issuing workload. Long-lived keys pasted into prompts or config files are a common root cause, so check where the credential was exposed.
- Data sources
- CloudTrailIdentity provider logsOAuth app audit logsAPI gateway logsKubernetes audit logs
- Platforms
- AWSIdentitySaaS
Logic
Group events by accessKeyId or token_id in 10-minute windows. Alert when dc(sourceIPAddress) > 1 across different ASNs, or when user agent family differs from the issuing workload's. SPL: index=cloudtrail | bin _time span=10m | stats dc(sourceIPAddress) as ips dc(userAgent) as uas by userIdentity.accessKeyId, _time | where ips > 1 AND uas > 1.
False positives
Autoscaled workers and NAT pool changes. Resolve IPs to workload IDs before comparing.