Cloud Logging & Detection
Seeing what happens in your cloud accounts
In the cloud, almost everything is an API call, and every API call can be logged. Audit logs, managed threat detection and posture management tools together show who did what, flag suspicious behaviour, and catch risky settings before attackers do.
Intermediate · 5 steps
| Audit log | AWS CloudTrail (Azure Activity Log, GCP Cloud Audit Logs) |
|---|---|
| Threat detection | Amazon GuardDuty |
| Posture | CSPM / Security Hub |
| Benchmark | CIS AWS Foundations |
| Protect logs | Separate log account, immutable storage |
| Alert on | Root use, logging changes, new keys |
Step by step
Every action is an API call Audit logging
Whether someone clicks in the console or runs a script, each action becomes an API call: who, what, when, from where and whether it succeeded. CloudTrail records these and delivers them to a log bucket in a separate, locked-down account, so an attacker in production can't erase them.
Suspicious behaviour Managed threat detection
An intruder uses a stolen access key from an unusual country and starts listing everything: users, buckets, instances. GuardDuty analyses the logs and network data, recognises this reconnaissance pattern from an unfamiliar location, and raises a finding.
Attempts to hide Watch the watchers
Next the intruder tries to stop CloudTrail logging. That call itself is logged, and a high-priority rule fires immediately. An organisation policy also denies stopping or deleting the trail, so the attempt fails.
Posture checks Finding risky settings before attackers do
Separately, a posture tool checks every account against a benchmark: root account without MFA, security groups open to the world on SSH, unencrypted volumes, buckets made public. Each failed check becomes a ticket with an owner.
Respond From finding to fix
The SOC disables the stolen key, checks CloudTrail for everything it did, and confirms nothing was changed. The posture issues are fixed through infrastructure code so they don't come back.
Best practices
- Turn on audit logging in every account and region, sent to a separate log account
- Protect logs from deletion with object lock and restricted access
- Enable managed threat detection and route findings to the SOC
- Alert on root account use, MFA changes, new access keys and logging being disabled
- Continuously check settings against a benchmark and fix drift
More in Cloud Security.
Packets
| No. | Time | Source | Destination | Protocol | Info | Size |
|---|