During an incident you find CloudTrail has no events for a 6-hour window, and the trail shows a `StopLogging` call
AdvancedTroubleshootingCertificates, TLS and security incident response
Answer
Likely causes → The attacker had enough privilege to stop the trail to cover their tracks. Some evidence may also have been deleted from the log bucket.
Diagnose →
aws cloudtrail lookup-events --lookup-attributes AttributeKey=EventName,AttributeValue=StopLogging
aws cloudtrail get-trail-status --name main
aws cloudtrail validate-logs --trail-arn <arn> --start-time <t> # detects missing or modified files
Event history (90 days of management events) is separate from the trail, so check it for the gap. Also use other sources: VPC Flow Logs, S3 access logs, GuardDuty and Config.
Fix → Restart logging, contain the principal that called StopLogging, and reconstruct the window from secondary sources.
Prevent → An organization trail owned by the management account (member accounts cannot stop it), an SCP denying cloudtrail:StopLogging/DeleteTrail, log file validation, a separate log-archive account with S3 Object Lock, and alerts on any CloudTrail configuration change.
More on Certificates, TLS and security incident response
A cert-manager Certificate stays `Ready=False` and the Challenge shows `Waiting for HTTP-01 challenge propagation: wrong status code '404', expected '200'`IntermediateA DNS-01 challenge hangs forever with `DNS record for "acme.com" not yet propagated`, although `dig` from your laptop shows the TXT recordAdvancedIssuance fails with `429 urn:ietf:params:acme:error:rateLimited: too many certificates already issued`BeginnerA service calling another internal service fails with `x509: certificate signed by unknown authority`BeginnerAt 05:30 every client starts failing with `x509: certificate has expired or is not yet valid`BeginnerBrowsers load `https://api.acme.com` fine, but `curl` and Java clients fail with `unable to get local issuer certificate`Intermediate