← All Threat Hunting ReportsThreat Hunting Exercise

Threat Hunting Exercise: Analyzing AWS CloudTrail Logging Disabled - GuardDuty Evasion Dataset

This hunt uses a simulated AWS CloudTrail dataset (aws_cloudtrail_disable_2022-06-25T041500.json) capturing T1562.008: Disable or Modify Cloud Logs, where an adversary who has obtained IAM credentials with sufficient privilege stops or modifies CloudTrail logging before conducting further malicious actions, attempting to evade GuardDuty and forensic reconstruction.

Step 1: Hypothesis Formation

Hypothesis: An IAM principal calls StopLogging, DeleteTrail, UpdateTrail (narrowing scope/removing S3 destination), or PutEventSelectors (excluding management events) against an active CloudTrail trail, from a session/role not normally associated with logging administration, followed shortly by other sensitive API activity that would otherwise be logged. Indicators:

Null Hypothesis: A cloud administrator legitimately modified trail configuration as part of an approved logging architecture change (e.g., consolidating trails, migrating to CloudTrail Lake). Invalidate via change-management ticket cross-check and by confirming the calling principal matches the organization's designated logging-admin role.

Rationale: CloudTrail is the primary forensic record in AWS; an adversary disabling it is both a powerful evasion move and, paradoxically, one of the most reliably alertable actions available, since GuardDuty has a purpose-built finding type for exactly this behavior - this hunt validates that the alert pipeline and response process actually work end-to-end.

Step 2: Data Sources and Scope

Step 3: Key Findings

Parsed events (6 shown) confirm CloudTrail was deliberately stopped by an automation role after a burst of reconnaissance API calls, with GuardDuty independently flagging the action.

Timestamp (UTC)PrincipalEvent NameDetailsIOC/Why Suspicious?
2022-06-25 04:16:02AssumedRole/DevOpsAutomationGetCallerIdentity-Baseline recon: attacker confirms current privilege context.
2022-06-25 04:17:40AssumedRole/DevOpsAutomationListUsers, ListRoles, ListAttachedRolePolicies14 calls in 90 secondsRecon burst IOC: enumeration volume far exceeds this role's documented automation function (routine deployment tasks, not IAM enumeration).
2022-06-25 04:20:11AssumedRole/DevOpsAutomationStopLoggingTrailARN=arn:aws:cloudtrail:us-east-1:445566778899:trail/org-trailCore IOC: management-event logging halted by a role with no prior logging-administration history.
2022-06-25 04:20:12GuardDutyFindingStealth:IAMUser/CloudTrailLoggingDisabled, Severity=HighCorroboration IOC: GuardDuty independently and automatically flags this exact action - confirms the detection pipeline caught it in near-real-time.
--(log-archive trail)Organization-level trail in the separate log-archive account continued recording throughout - captured all subsequent actions the attacker believed were unlogged.Architecture win: a properly configured multi-account logging architecture defeats this evasion attempt entirely - the attacker's own StopLogging call, and everything after, is fully visible in the org trail.
2022-06-25 04:22:00 - 04:45:00AssumedRole/DevOpsAutomationCreateAccessKey, AttachUserPolicy (AdministratorAccess)Target user: a newly created IAM user svc-backup-mgrDespite believing logging was disabled, these privilege-escalation actions were fully captured by the org-level trail - attacker proceeded under a false sense of stealth.

Validation:

Step 4: Recommendations & Next Steps

Hypothesis confirmed - an automation role disabled CloudTrail logging in an apparent evasion attempt, fully captured by an independent organization-level trail and flagged by GuardDuty!