What you'll learn
- Check and protect log coverage across accounts, subscriptions and projects
- Read and normalise CloudTrail, Entra ID, Azure Activity and Cloud Audit Logs
- Detect identity attacks, privilege escalation, evasion and exfiltration
- Use flow logs, posture checks and each provider's threat detection
- Correlate a multi-cloud incident and respond per cloud
Each lesson is tagged Junior, Mid or Expert, so you can start where you are. Finish with the lab and the quiz; a score of 4 out of 5 marks the course complete in this browser.
The lessons below are in English for now, because they quote technical names, commands and log fields. An Arabic version is planned.
Course map
Each module moves from fundamentals to applied work to an expert challenge. Exercises have worked solutions: try first, then open the solution. 10 modules · 25 exercises · ~4 hours
- 0Start here: what the SOC watches in the cloudJuniorMidExpert20 min · 2 exercises
- 1Log coverage: turn it on, keep it, protect itJuniorMidExpert25 min · 3 exercises
- 2Reading cloud logs and normalising themJuniorMidExpert25 min · 3 exercises
- 3Identity attacks: the usual way inJuniorMidExpert30 min · 3 exercises
- 4IAM: privilege escalation pathsJuniorMidExpert25 min · 3 exercises
- 5Defence evasion and data exfiltrationJuniorMidExpert25 min · 3 exercises
- 6Network and workload signalsJuniorMidExpert20 min · 2 exercises
- 7Posture and the providers' own detectionJuniorMidExpert25 min · 2 exercises
- 8Correlation and responseJuniorMidExpert25 min · 3 exercises
- 9Enterprise cloud SOC; cheat sheet and assessmentJuniorMidExpert20 min · 1 exercises
No prior experience is needed. Module 0 covers the architecture, installation and configuration, and sets up the project you extend in every module. Each command is labelled with its impact (read-only, changes files, changes the system, uses the network). Work on a computer or virtual machine you control.
Start here: what the SOC watches in the cloud
Goal: Understand shared responsibility, the control plane, the equivalent log sources in AWS, Azure and Google Cloud, and the course investigation.
Every action is an API call
In the cloud, creating a server, opening a firewall, reading a database export or granting a role is an API call to the provider's control plane, and the provider can log every one of them. Cloud security monitoring is therefore mostly about identities and API activity: who called what, from where, and whether it succeeded, plus network flows and the managed threat detection each provider offers.
The provider secures its hardware and services; you secure your identities, configuration and data (shared responsibility). Attackers know this: most cloud intrusions use stolen credentials or misconfigurations, not exploits of the provider. Organisations also rarely use one cloud: identities in Entra ID, workloads in AWS, analytics in Google Cloud. The SOC must see all three as one picture.
| What you need | AWS | Azure | Google Cloud |
|---|---|---|---|
| control-plane API activity | CloudTrail (management events) | Activity Log | Cloud Audit Logs: Admin Activity |
| data access (reads of objects, tables) | CloudTrail data events, S3 access logs | resource logs (Storage, Key Vault) | Cloud Audit Logs: Data Access |
| identity sign-ins | CloudTrail ConsoleLogin, IAM Identity Center | Entra ID sign-in and audit logs | Cloud Identity / Workspace login audit |
| network flows | VPC Flow Logs | VNet flow logs | VPC Flow Logs |
| DNS | Route 53 Resolver query logs | DNS security policy logs | Cloud DNS logging |
| managed threat detection | GuardDuty (Extended Threat Detection) | Defender for Cloud | Security Command Center (Event Threat Detection) |
| posture and findings hub | Security Hub (OCSF) | Defender for Cloud | Security Command Center |
| SIEM (native) | Security Lake + partners | Microsoft Sentinel (Defender portal) | Google SecOps |
The investigation in this course
On 1 December, Rimal is attacked across all three clouds. You will find out how, using real-format logs: AWS CloudTrail records, Entra ID sign-in logs, Azure Activity Log entries, Google Cloud Audit Logs and VPC flow logs. You will check log coverage, normalise the logs, write detections, analyse IAM escalation paths and posture, correlate everything into one incident and plan the response.
cloudmon/
├── inventory.json, coverage.py # module 1: are the logs on?
├── cloudtrail.json, entra_signins.json, azure_activity.json, gcp_audit.json
├── normalize.py → events.jsonl # module 2
├── detect.py → alerts.json # modules 3, 5
├── iam.json, iam_paths.py # module 4
├── flowlogs.txt, flows.py # module 6
├── config.json, posture.py # module 7
└── correlate.py, respond.py, metrics.py # modules 8, 9aws cloudtrail lookup-events --lookup-attributes AttributeKey=EventName,AttributeValue=StopLogging --max-results 20
az monitor activity-log list --offset 24h --query "[?operationName.value=='Microsoft.Authorization/roleAssignments/write']"
gcloud logging read 'protoPayload.methodName="google.iam.admin.v1.CreateServiceAccountKey"' --freshness=1dQuick check: An attacker logs in with a stolen access key and copies a database snapshot. Where is the evidence?
The API calls are logged in your account, if logging is on and kept.
Exercise 1Junior
Map each to its Azure and Google Cloud equivalent: CloudTrail management events, GuardDuty, VPC Flow Logs.
Worked solution
CloudTrail management events → Azure Activity Log, Google Cloud Admin Activity audit logs. GuardDuty → Microsoft Defender for Cloud, Security Command Center (Event Threat Detection). VPC Flow Logs → Azure VNet flow logs, Google Cloud VPC Flow Logs.
Exercise 2Mid
Why are identity sign-in logs (Entra ID) often the most important cloud source, even for AWS and Google Cloud?
Worked solution
Many companies federate AWS and Google Cloud access through Entra ID (SSO), and staff use the same identity for email and cloud consoles. A compromised Entra ID account is often the first step into every cloud, so its sign-ins show the attack before any cloud API is called, as in this course's incident.
Tools in this course
API logs, managed threat detection, findings hub (OCSF).
Use it for: AWS accounts and organisations
Integrates with: Security Lake, EventBridge, SIEMs
Identity sign-ins, Activity Log, workload protection.
Use it for: Azure and Microsoft 365
Integrates with: Microsoft Sentinel
Admin Activity and Data Access logs, threat detection, posture.
Use it for: Google Cloud organisations
Integrates with: Google SecOps
Cloud SIEM in the Defender portal (the Azure portal experience ends 31 March 2027).
Use it for: multi-cloud SIEM
Integrates with: AWS, GCP connectors, KQL
Set up the investigation
Goal: ~/cloudmon holds Rimal's inventory and the logs from 1 December in each provider's native format.
Log coverage: turn it on, keep it, protect it
Goal: Check every account, subscription and project for the logs that matter, central collection, retention and tamper protection.
Reading cloud logs and normalising them
Goal: Read a CloudTrail record, an Entra ID sign-in, an Azure Activity entry and a Cloud Audit Log entry, and map them all to one schema.
Identity attacks: the usual way in
Goal: Detect password spraying, impossible travel, sign-ins without MFA and credentials used from new places, including stolen instance credentials.
IAM: privilege escalation paths
Goal: Find permissions that let an identity make itself more powerful in AWS, Azure and Google Cloud, and detect their use.
Defence evasion and data exfiltration
Goal: Detect attempts to disable logging and detection, public exposure of data, sharing with external accounts and bulk downloads.
Network and workload signals
Goal: Read VPC flow logs, find internet-exposed services, crypto-mining and large uploads, and connect network signals to identities.
Posture and the providers' own detection
Goal: Check configuration against CIS benchmarks, and use GuardDuty, Security Hub, Defender for Cloud, Sentinel, Security Command Center and Google SecOps well.
Correlation and response
Goal: Join alerts from three clouds into one incident with a kill chain, then plan containment, eradication and recovery per cloud.
Enterprise cloud SOC; cheat sheet and assessment
Goal: Design multi-cloud monitoring at scale, manage detections as code, measure the SOC, and plan coverage for a new environment.
Quick reference (the cheat-sheet lessons and the PDF content)
Shared responsibility: what the SOC must watch
Whatever the model, identity and data are always yours. That is where most cloud breaches start.
Cloud log map
Send all of it to a separate, locked-down logging account or subscription that production admins cannot delete.
| Need | AWS | Azure | Google Cloud |
|---|---|---|---|
| Control-plane API calls | CloudTrail (org trail) | Activity Log | Cloud Audit Logs (Admin Activity) |
| Identity sign-ins | CloudTrail ConsoleLogin, IAM Identity Center | Entra ID sign-in + audit logs | Cloud Identity / Workspace logs |
| Data access | CloudTrail data events (S3, Lambda) | Storage / Key Vault diagnostic logs | Data Access audit logs (off by default) |
| Network | VPC Flow Logs, Route 53 resolver logs | VNet flow logs, Azure Firewall | VPC Flow Logs, Cloud DNS logs |
| Threat detection | GuardDuty | Defender for Cloud | Security Command Center |
| Posture and config | AWS Config, Security Hub | Azure Policy, Defender CSPM | Cloud Asset Inventory, SCC |
Cloud attack chain
Detections by provider (API / operation names)
| Use case | AWS (CloudTrail) | Azure (Activity / Entra) | GCP (Audit Logs) |
|---|---|---|---|
| Logging disabled | StopLogging, DeleteTrail, PutEventSelectors | Delete diagnostic setting | Delete or update a log sink |
| Threat detection off | DeleteDetector, UpdateDetector | Defender plan disabled | SCC settings changed |
| New access key | CreateAccessKey | Add credentials to app / service principal | CreateServiceAccountKey |
| Admin rights granted | AttachUserPolicy AdministratorAccess, PutRolePolicy | Add member to role (Global Administrator) | SetIamPolicy with roles/owner |
| Console login without MFA | ConsoleLogin with MFAUsed = No | Sign-in with single-factor auth | Login without 2-step verification |
| Storage made public | PutBucketPolicy, PutBucketAcl, DeletePublicAccessBlock | Blob container access level public | SetIamPolicy allUsers on a bucket |
| Snapshot shared out | ModifySnapshotAttribute, ModifyImageAttribute | Disk export / SAS URL generated | Image or snapshot IAM to external |
| Crypto-mining | RunInstances large GPU types in odd regions | New VMs or GPU quota requests | New GPU instances in unused regions |
| Illicit consent | n/a | Consent to application (high-privilege scopes) | OAuth grant to unverified app |
| Root / break-glass use | userIdentity.type = Root | Break-glass account sign-in | Super admin sign-in |
Junior: first questions on a cloud alert
- Which identity? Human, role, service principal or key?
- From where? IP, ASN, region, user agent
- Is this normal for that identity in the last 30 days?
- What else did it do in the same session?
Expert: high-value hunts
- Access keys used from two countries within an hour
- Roles assumed by identities that never did before
- API calls with
AccessDeniedbursts (permission probing) - Instance metadata credentials used outside the instance
Native findings to triage first (AWS GuardDuty examples)
Defender for Cloud and Security Command Center raise equivalent alerts with their own names.
| Finding type | Means |
|---|---|
UnauthorizedAccess:IAMUser/InstanceCredentialExfiltration.OutsideAWS | Instance role credentials stolen and used elsewhere |
Stealth:IAMUser/CloudTrailLoggingDisabled | Someone turned off the audit trail |
CryptoCurrency:EC2/BitcoinTool.B!DNS | An instance is talking to mining infrastructure |
Policy:S3/BucketBlockPublicAccessDisabled | Public-access block removed from a bucket |
Queries
Field names follow the native schemas. Adapt them if your SIEM normalizes cloud logs.
fields eventTime, eventName, userIdentity.arn,
sourceIPAddress, awsRegion
| filter eventName in ["StopLogging", "DeleteTrail",
"UpdateTrail", "PutEventSelectors", "DeleteDetector"]
| sort eventTime descSELECT eventtime, useridentity.arn, sourceipaddress
FROM cloudtrail_logs
WHERE eventname = 'ConsoleLogin'
AND json_extract_scalar(additionaleventdata,
'$.MFAUsed') = 'No'
ORDER BY eventtime DESC;protoPayload.methodName="SetIamPolicy"
protoPayload.serviceData.policyDelta.bindingDeltas.role="roles/owner"
protoPayload.serviceData.policyDelta.bindingDeltas.action="ADD"AuditLogs
| where OperationName == "Consent to application"
| extend User = tostring(
InitiatedBy.user.userPrincipalName)
| extend App = tostring(
TargetResources[0].displayName)
| project TimeGenerated, User, App, ResultAuditLogs
| where OperationName == "Add member to role"
| where TargetResources has "Global Administrator"
| extend Actor = tostring(
InitiatedBy.user.userPrincipalName)
| project TimeGenerated, Actor, TargetResourcesIdentity attacks in the cloud
| Attack | What you see | Response |
|---|---|---|
| MFA fatigue | Many MFA push denials, then one approval | Revoke sessions; switch to number matching or FIDO2 |
| Token theft (AiTM phishing) | Sign-in from a new IP reusing a session, no MFA prompt | Revoke refresh tokens; require compliant device |
| Illicit consent grant | New app with Mail.Read, Files.ReadWrite.All | Remove the app and its grants; block user consent |
| Password spray | Failures across many users from a few IPs | Block IPs; enforce MFA and smart lockout |
| Leaked access key | Key used from an unknown IP or region | Deactivate the key; review everything it did |
SaaS: Microsoft 365 / Google Workspace
- New inbox rules forwarding outside the company
- Mass file downloads from SharePoint, OneDrive or Drive
- eDiscovery or content searches by unusual admins
- External sharing links created in bulk
- Admin role granted to a new account
Cloud logging pitfalls
- Data-access logs (S3 data events, GCP Data Access) are off by default
- Trails enabled in one region only
- Logs stored in the same account an attacker controls
- Retention shorter than your detection time
- No alert when a log source goes silent
Landing-zone logging architecture
Logs flow one way, into an account production admins cannot touch. An attacker with admin in production still cannot erase the trail.
Cloud incident response
Contain the identity first, then the resource. A deleted VM cannot be investigated.
Containment by provider
| Provider | Fast containment |
|---|---|
| AWS | Deactivate access keys; attach a deny-all policy; revoke role sessions; isolate with a no-traffic security group; SCP deny at org level |
| Azure | Disable the user, revoke sessions (Revoke-MgUserSignInSession); remove role assignments; NSG deny-all; disable the service principal |
| GCP | Disable the service account and delete its keys; remove IAM bindings; VPC firewall deny; Organization Policy constraints |
Posture quick wins
Check monthly
- Org-wide CloudTrail / Activity Log / audit logs to a separate log account
- No root or global admin for daily work; FIDO2 on break-glass
- Block public storage at the account or org level
- IMDSv2 required on all AWS instances
- Workload identity instead of long-lived keys
- Guardrails: SCPs, Azure Policy, Org Policy
- Benchmark with CIS Foundations; for KSA, map to NCA CCC
Cloud severity guide
| Severity | Example |
|---|---|
| Critical | Logging disabled, root used, admin policy attached by an unknown identity |
| High | Bucket made public with sensitive data; access key used from a new country |
| Medium | New OAuth app with broad scopes; GPU instances in an unused region |
| Low | Single failed console login; config drift on a dev account |
Key terms
- Control plane
- The provider's management API; every change to cloud resources is a logged call to it.
- CloudTrail / Activity Log / Cloud Audit Logs
- The control-plane logs of AWS, Azure and Google Cloud.
- Log archive
- A separate, protected account that stores logs the workloads cannot change.
- OCSF
- Open Cybersecurity Schema Framework: a common schema for security events and findings.
- Privilege escalation path
- Permissions that let an identity give itself more permissions.
- CSPM
- Cloud security posture management: continuous checks of configuration against benchmarks.
Hands-on lab
Knowledge check
Answer all five questions, then check your answers. Each answer comes with a short explanation.
Further reading
- AWS CloudTrail docs.aws.amazon.com
- Amazon GuardDuty docs.aws.amazon.com
- Microsoft Sentinel in the Defender portal learn.microsoft.com
- Google Cloud Audit Logs cloud.google.com
- OCSF ocsf.io
- MITRE ATT&CK Cloud Matrix attack.mitre.org
- Sigma rules github.com
Put it into practice
Use these ThreatAI tools to apply what you learned to your own environment.