Map type: map
A system drawn as zones, boxes and arrows. Tabs recolour it: how it works, where it breaks, how it is fixed. Arrows can be cut. Use it for trust boundaries and data paths.
Show the data
flow:
type: map
title: Where CloudTrail events go, and what each permission in the post can cut
kind: Logging path
caption: >-
Three views: how events are recorded, what the five permissions in the post do to that path, and
the guardrails. Click any box for details.
zones:
- id: src
name: Sources
- id: ct
name: CloudTrail
- id: soc
name: Defenders
nodes:
- id: api
name: AWS API calls
sub: users, roles, services
zone: src
col: 0
row: 0
text: Every action taken by a user, a role or an AWS service is recorded as a CloudTrail event.
- id: ext
name: Outside source
sub: e.g. CrowdStrike Falcon
zone: src
col: 0
row: 2
text: A partner or your own app that sends its events into CloudTrail Lake through a channel.
- id: ct
name: CloudTrail
sub: records events
zone: ct
col: 1
row: 0
text: The service that records events and delivers them to trails and event data stores.
- id: chan
name: Channel
sub: integration
zone: ct
col: 1
row: 2
text: >-
Carries events from an outside source into an event data store. Listed with `aws cloudtrail
list-channels`.
- id: trail
name: Trail + Insights
sub: unusual-activity events
zone: ct
col: 2
row: 0
text: >-
A trail with Insights selectors raises Insights events when API call volume or error rates
look unusual. Read with `aws cloudtrail get-insight-selectors`.
- id: eds
name: Event data store
sub: CloudTrail Lake
zone: ct
col: 2
row: 2
text: Stores events for querying. Listed with `aws cloudtrail list-event-data-stores`.
- id: soc
name: Detection
sub: queries and alerts
zone: soc
col: 3
row: 1
text: 'Whoever reads the logs: a SIEM, an alert rule, an investigator.'
edges:
- from: api
to: ct
- from: ct
to: trail
- from: ct
to: eds
- from: ext
to: chan
- from: chan
to: eds
- from: trail
to: soc
- from: eds
to: soc
modes:
- name: How it records
title: Two paths into the logs
text: >-
AWS activity goes through CloudTrail to trails and event data stores. Events from outside
tools come in through channels into an event data store. Defenders read both.
- name: What each permission cuts
tone: bad
title: Five permissions, five blind spots
text: >-
Each permission from the post either cuts an arrow or fills the store with events that never
happened. Click a red box to see which permission and what is lost.
nodes:
chan:
tone: bad
note: DeleteChannel
text: >-
`cloudtrail:DeleteChannel` removes the integration. Events from that tool stop reaching
the event data store.
ext:
tone: bad
note: PutAuditEvents
text: >-
`cloudtrail-data:PutAuditEvents` writes events into a channel. With it, someone can add
events that never happened: log poisoning.
eds:
tone: bad
note: DeleteEventDataStore
text: >-
`cloudtrail:DeleteEventDataStore` deletes the store and the events in it.
`cloudtrail:StopEventDataStoreIngestion` keeps the store but stops new events arriving.
trail:
tone: bad
note: PutInsightSelectors
text: >-
`cloudtrail:PutInsightSelectors` with an empty list turns Insights events off for the
trail. The post does it through the console's own request.
edges:
ext>chan:
tone: bad
label: fake events
chan>eds:
cut: true
ct>eds:
cut: true
label: ingestion stopped
trail>soc:
cut: true
label: no Insights
eds>soc:
tone: bad
- name: Guardrails
tone: ok
title: Keep these permissions to the people who need them
text: >-
The post's advice: scope the dangerous permissions with condition statements so only the
intended principal can use them. Across an AWS organization, a service control policy can
deny them outright, and an alert on these API calls catches anyone who tries.
nodes:
chan:
tone: ok
note: conditions
text: >-
Allow channel changes only to the principal that manages the integration, with an IAM
condition.
ext:
tone: ok
note: one writer
text: Only the integration's own role should hold `PutAuditEvents` for that channel.
eds:
tone: ok
note: termination protection
text: >-
Termination protection is on by default and blocks deletion; keep it on and limit who
can turn it off. A deleted event data store waits seven days before it is removed and
can be restored in that time.
trail:
tone: ok
note: SCP deny
text: >-
Deny `PutInsightSelectors` and the other changes in a service control policy, except for
a break-glass role.
soc:
tone: ok
note: alert on the calls
text: >-
These API calls are themselves management events. Alert on DeleteChannel,
DeleteEventDataStore, StopEventDataStoreIngestion and PutInsightSelectors.