UTMStack

Articles9 min read

AWS CloudTrail SIEM Use Cases: 18 Detections Worth Running

By UTMStack Team

UTMStack blog: AWS CloudTrail SIEM use cases

Most attacks on an Amazon Web Services (AWS) account do not look like malware. They look like ordinary API calls made with stolen keys: a new user here, a changed policy there, a trail switched off so nobody sees the rest. AWS CloudTrail records almost every one of those calls. The problem is that a busy account writes millions of them a day, so the record is only useful once something reads it and reacts.

That reading is the job of a SIEM (security information and event management) tool. This guide lists 18 AWS CloudTrail SIEM use cases worth running, the CloudTrail event each one reads, and what the detection is really looking for. For the on-premises side of the same account, see our guides to Linux SIEM use cases and Active Directory SIEM use cases.

The short answer: the AWS CloudTrail detections that catch the most real attacks are someone turning off CloudTrail, Config or GuardDuty; root account use, especially without multi-factor authentication; a console login from an impossible location; new IAM users, access keys or policy attachments; a trust policy rewritten to let an outside account assume a role; an S3 bucket made public; and bulk reads or snapshot exports that move data out. Almost all of these read CloudTrail management events, which AWS records by default. The exceptions are bulk object reads, which need Amazon S3 data events, and GuardDuty findings, which need GuardDuty switched on.

Where each detection catches an attacker in AWS

The CloudTrail use cases along a typical account takeover, with the source each one reads

Works from management events (on by default)Needs data events or an extra source
  1. Get inUse stolen keys or a password
    Root loginConsoleLoginRoot use without MFAmanagement eventsImpossible travelConsoleLogin + geoAssume-role brute forceUpdateAssumeRolePolicy
  2. Look aroundMap the account
    Burst of Describe and List callsmanagement eventsGuardDuty high-severity findingGuardDuty
  3. Gain privilegeBecome admin
    New IAM user, key or policyCreateUser, CreateAccessKeyPolicy or role attachmentAttachUserPolicyTrust policy rewrittenUpdateAssumeRolePolicySSO identity provider changesso.amazonaws.com
  4. StayKeep a way back in
    Login profile addedCreateLoginProfileLambda function URL backdoorCreateFunctionUrlConfigRoute 53 domain transferroute53domains
  5. Blind youStop the recording
    CloudTrail stopped or deletedStopLogging, DeleteTrailConfig or GuardDuty disabledmanagement eventsFlow log or log group deletedmanagement events
  6. Take dataExpose or copy it out
    S3 bucket made publicPutBucketAclBulk object readsS3 data eventsSnapshot shared or exportedModifySnapshotAttribute
Illustration. Most read CloudTrail management events, which AWS records by default. GuardDuty findings and bulk object reads need the service switched on or data events turned on, which you do yourself.

Before you start: the AWS logs these detections need

A detection cannot fire on an event that was never recorded. In AWS that is the usual reason a cloud use case fails, so start with the sources.

SourceWhat it recordsOn by default?
CloudTrail management eventsControl-plane API calls: logins, IAM changes, resource creation and deletion, config changesYes. The first copy delivered to a trail is free
CloudTrail data eventsData-plane actions inside a resource, such as S3 object reads and writes or Lambda invocationsNo. You turn them on per resource, and they are charged
CloudTrail Event historyA searchable record of management events for the last 90 days, per regionYes, and free, but it is not a feed a SIEM can read continuously
Amazon GuardDutyFindings built from CloudTrail, VPC Flow Logs and DNS query logs, scored by severityNo. You enable it, then route findings out
VPC Flow LogsSource, destination, port and byte counts for network traffic in a virtual private cloudNo. You create them and send them to CloudWatch Logs or S3

To read any of this continuously, create a CloudTrail trail that delivers to an Amazon S3 bucket or to CloudWatch Logs, then forward that to your SIEM. Event history alone is not enough, because it only answers searches and keeps 90 days. The figure below shows the path.

How CloudTrail reaches a SIEM

Event history is for ad hoc searches. A trail gives a SIEM a continuous feed

  1. API callSomeone acts in the account
  2. CloudTrailRecords the event
  3. TrailDelivers to S3 or CloudWatch Logs
  4. SIEM reads the feedParses and normalizes
  5. Detection firesRule matches, alert raised
Illustration. GuardDuty findings and VPC Flow Logs join the same feed through Amazon EventBridge or CloudWatch Logs.

The 18 use cases

Each row is a detection, the CloudTrail event or source it reads, and what it catches. Every one of these ships as a built-in rule in UTMStack, mapped to the technique in the MITRE ATT&CK framework shown. ATT&CK is a public catalog of attacker techniques.

Blind the defender first

An attacker who has admin rights often starts by turning off the recording. These are the highest-value detections, because they protect everything else.

Use caseCloudTrail eventWhat it catchesATT&CK
CloudTrail logging disabledStopLogging, DeleteTrailSomeone stops or deletes the trail so later actions are not recordedT1562.008
Event selector changedPutEventSelectorsA trail quietly narrowed so it stops recording the events that matterT1562.008
Config recorder stoppedStopConfigurationRecorderAWS Config, which tracks resource changes, switched offT1562.001
GuardDuty detector deletedDeleteDetectorThe threat-detection service removed so its findings stopT1562.008
Flow log deletedDeleteFlowLogsNetwork logging for a virtual private cloud removedT1562.008
CloudWatch log group deletedDeleteLogGroupStored logs destroyed to cover tracksT1070
WAF rule or ACL deletedDeleteWebACL, DeleteRuleA web application firewall rule removed to open an app back upT1562.001

Get in and move up

Use caseCloudTrail eventWhat it catchesATT&CK
Root account used without MFAmanagement events, userIdentity type RootThe most powerful account in use, with no second factorT1078.004
Console login impossible travelConsoleLogin from two countries within 30 minutesThe same user signing in from places too far apart to be realT1078.004
Assume-role policy brute forceUpdateAssumeRolePolicy, 5 in 15 minutesRepeated edits to a role’s trust policy, probing for a way inT1110
IAM backdoor creationCreateUser, CreateAccessKey, AttachUserPolicy, 3 in 30 minutesA fresh user with keys and a policy, built to keep accessT1136.003
IAM privilege escalation pathCreatePolicyVersion, AttachRolePolicy, AddUserToGroupPermissions widened step by step toward full adminT1098
SSO identity provider changesso.amazonaws.com directory changesThe single sign-on trust changed, a route to a golden SAML attackT1078.004

Reconnaissance, persistence and data theft

Use caseCloudTrail eventWhat it catchesATT&CK
Burst of Describe and List calls50 read-only calls in 10 minutesAn attacker mapping the account right after getting inT1106
Lambda function URL backdoorCreateFunctionUrlConfigA public web address bolted onto a function for later accessT1546
S3 bucket made publicPutBucketAcl, DeleteBucketPublicAccessBlockA bucket opened to the internet, exposing its contentsT1530
S3 bulk data exfiltrationGetObject, 100 in 15 minutes (data events)Large-scale copying of objects out of a bucketT1530
Snapshot shared or exportedModifySnapshotAttribute, EC2 and RDS exportA disk or database copy shared to an outside account or exportedT1537

How UTMStack fits, and where it stops

UTMStack ships 73 AWS detection rules, each mapped to MITRE ATT&CK and checked the moment a CloudTrail event arrives, before it is written to storage. The 18 above are the ones worth turning on first. You ingest AWS by creating a trail and letting UTMStack read it through CloudWatch, the same way its threat detection reads any other source. GuardDuty findings and VPC Flow Logs come in on the same feed.

Three detections in the list deserve plain warnings:

  • Bulk object reads need S3 data events. The S3 exfiltration rule counts GetObject calls, and GetObject is a data event. AWS does not record data events by default, and they are charged. If you have not turned them on for the bucket, the rule has nothing to read. Management-event detections, which are most of the list, work without this.
  • Impossible travel needs location data. The rule compares the country of two logins. UTMStack adds the location from the source address, so a login through a virtual private network can look like travel. Treat it as a prompt to check, not proof.
  • Snapshot and packet-capture detections depend on the right events reaching the trail. Cross-account snapshot sharing shows up in management events, but full network packet capture and some export paths rely on sources you may not be sending yet.

Being honest about limits matters more in the cloud, where it is easy to assume a managed service is watching when it is not. GuardDuty, for example, only produces findings for the data sources it is given, and only when it is enabled in every region you use.

What UTMStack does once a rule fires is the second half of the job. Its automated response flows can disable an IAM user or revoke a session so a stolen key stops working while someone investigates. For how the matching works, see our guide to SIEM correlation rules, and for the wider picture of which logs to collect, what logs should be sent to a SIEM. UTMStack is priced per device, never by log volume, so a noisy AWS account does not change the bill; for a quote, see pricing.

Frequently asked questions

Does AWS CloudTrail count as a SIEM? No. CloudTrail records events and keeps 90 days of management events in Event history that you can search. It does not correlate events across sources, raise alerts on patterns, or respond. A SIEM reads the CloudTrail feed and does that work. GuardDuty is closer to detection, but it covers only its own data sources and does not take in your firewall, server or identity logs.

What is the difference between CloudTrail management events and data events? Management events are control-plane actions, such as creating a user or changing a policy, and the first copy to a trail is free. Data events are actions inside a resource, such as reading an S3 object or invoking a function. Data events are off by default and are charged, so you turn them on only for the buckets and functions that hold sensitive data.

Which AWS logs should I send to a SIEM first? Start with CloudTrail management events from every region, because they carry the logins, IAM changes and service-disabling actions in most of these use cases. Add GuardDuty findings next, then VPC Flow Logs, then data events for your most sensitive S3 buckets. Sending every data event from the start is expensive and rarely worth it.

Can a SIEM stop an AWS attack, not just alert on it? It can respond if it is allowed to act in the account. UTMStack response flows can disable an IAM user or revoke a session so stolen credentials stop working. Response should be scoped carefully, because a wrong automatic action in a production account can cause an outage.

How far back can I investigate an AWS incident? Event history keeps 90 days of management events for searching. For anything longer, you need a trail delivering to storage or a SIEM that retains the data. UTMStack keeps events for up to five years with searchable cold storage, which covers most compliance and investigation needs.

Sources