Skip to content

IAM least privilege practice

Free IAM least privilege practice on a live multi-statement JSON policy editor. Strip wildcard permissions, scope resource ARNs, verify federated session-tag MFA and audit cloud credentials.

Scope the cloud IAM policy

Principal 1 · incident-db-auditor · clean audits 0/0 · attempts left 3/3

SOC-8253 · incident-db-auditorIAM AUDIT
Service Health100% ONLINE
Production workloads normal
Attack ProgressionMONITORING
AccessExecPrivLateralExfil

Live SIEM Alert Stream (select observed indicators below)

  • 2026-12-01T13:02:11Zcspm.iam_analyzer
    finding=OVERPRIVILEGED_POLICY principal=incident-db-auditor arn=arn:aws:iam::111122223333:role/incident-db-auditor wildcardResource="*"
  • 2026-12-01T13:02:14Zcspm.iam_analyzer
    principal=incident-db-auditor workloadType=operator credentialType=FederatedSAML_STS owner=s.takahashi

SIEM Pivot Search

Edit multi-statement AWS JSON

Workload Brief · incident-db-auditor
arn:aws:iam::111122223333:role/incident-db-auditor

Human SAML federated auditor role (AssumeRoleWithSAML, STS ASIA credentials). The AWS_SAML_Federation IdP app does not enforce MFA at sign-on; it sends SAML attribute https://aws.amazon.com/SAML/Attributes/PrincipalTag:MfaVerified ("true" when on-call staff complete FIDO2 MFA, "false" on password-only login), and the role trust policy allows sts:TagSession. Reads compliance baselines from harborline-config-baselines and runs CloudWatch Logs queries on /siem/auth. Strictly read-only; never alters IAM trust policies.

{ "Version": "2012-10-17", "Statement": [
"Sid": "WorkloadPrimary" · "Effect": "Allow"
"Action": [
]
"Resource": [
]
"Condition":
"Sid": "LegacyBroadAccess" · "Effect": "Allow"
"Action": [
]
"Resource": [
]
"Condition":
] }
View serialized AWS IAM JSON
{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Sid": "WorkloadPrimary",
      "Effect": "Allow",
      "Action": [
        "s3:*",
        "logs:*"
      ],
      "Resource": [
        "*"
      ]
    },
    {
      "Sid": "LegacyBroadAccess",
      "Effect": "Allow",
      "Action": [
        "iam:UpdateAssumeRolePolicy",
        "logs:*"
      ],
      "Resource": [
        "*"
      ]
    }
  ]
}

Play the Cloud IAM shift

An independent learning simulator with fictional hosts, domains (.example), and RFC 5737 / RFC 1918 test IPs. Real incident response follows your organization's playbooks and authorization.

Use it on a real shift

Cybersecurity SOC Analyst simulator: Work a Tier-1 SOC analyst simulator console: click indicators to pivot raw SIEM logs, write multi-statement AWS IAM least-privilege JSON, and contain breaches without breaking uptime.

Clock in

Applying least privilege without breaking production

Four steps in every cloud IAM audit

  1. Select observed indicators to pivot in Cloud & SaaS Audit (and Auth / Entra / Okta for federated SAML roles) to correlate sts:AssumeRoleWithSAML session tags, baseline API calls, and any unauthorized external calls.
  2. Remove unrestricted wildcards ("*", s3:*) and separate buckets whenever actions differ across buckets, keeping unique Sid values.
  3. Match Amazon S3 ARN granularity: CloudTrail ListObjects maps to IAM s3:ListBucket on arn:aws:s3:::bucket, while s3:GetObject and s3:PutObject apply to arn:aws:s3:::bucket/*.
  4. Never require aws:MultiFactorAuthPresent on long-term access keys or federated SAML sessions (AWS docs note the key is absent for both, causing 403). Inspect CloudTrail sts:AssumeRoleWithSAML (requestParameters.principalTags), Okta MFA events, and CMDB metadata to match any Condition block strictly to what legitimate requests carry.

Posture finding vs active compromise

An over-privileged policy with zero external calls is a cloud security posture finding, not an intrusion: tighten the policy while keeping healthy keys and operator sessions online.

When CloudTrail proves active abuse, match the credential type: disable leaked long-term AKIA keys (coordinating standby key cutover), or for temporary STS ASIA credentials attach AWSRevokeOlderSessions to the role, lock the user in the IdP, and force a password reset before unlocking when the attacker logged in with the user's password. Undo every attacker change — DeleteAccessKey, DetachRolePolicy, UpdateAssumeRolePolicy, RotateSecret (plus Tier-2 IR/Legal escalation), and for KMS UUID keys both CancelKeyDeletion and EnableKey.

This drill uses authentic AWS IAM JSON syntax (Version: "2012-10-17", Statement array, real arn:aws:... ARNs, and SAML session tag conditions) aligned with AWS, Azure RBAC, and Google Cloud least-privilege guidance. All principals, buckets, keys, and UUIDs are fictional.

Questions people ask

Why does aws:MultiFactorAuthPresent fail on federated SSO roles?

AWS IAM global condition key documentation notes that aws:MultiFactorAuthPresent is not present in request context for federated identities or long-term access keys. Instead, an IdP sends a SAML PrincipalTag attribute (accepted when the role trust policy allows sts:TagSession), and IAM policies match the aws:PrincipalTag/<key> condition observed in CloudTrail sts:AssumeRoleWithSAML logs.

How do you contain a compromised STS ASIA temporary session vs a long-term AKIA key?

Long-term AKIA user keys can be disabled directly, whereas temporary STS ASIA credentials cannot be disabled with UpdateAccessKey. Attach AWSRevokeOlderSessions to the IAM role to invalidate active sessions, suspend/lock the user in the IdP, and force a password reset before unlocking if the attacker used the user's password.

What else is required after canceling AWS KMS key deletion?

Per AWS KMS documentation, CancelKeyDeletion leaves the key in the Disabled state rather than Enabled. You must also run EnableKey on the KMS key UUID before production workloads can decrypt again, alongside undoing any other CloudTrail persistence.

More cybersecurity SOC analyst practice