CyberKit

Cloud Identity Case: answer key

Every question with its answer and the reasoning. Work the drill first, or the key only tells you what, not how.

Stages: CloudTrail, Identity.

CloudTrail

  1. This is the only ConsoleLogin record for this identity in the last 90 days. What is the most important thing about it?

    {
      "eventTime": "2026-03-02T02:14:51Z",
      "eventSource": "signin.amazonaws.com",
      "eventName": "ConsoleLogin",
      "awsRegion": "us-east-1",
      "sourceIPAddress": "198.51.100.23",
      "userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64)",
      "userIdentity.type": "IAMUser",
      "userIdentity.arn": "arn:aws:iam::123456789012:user/svc-backup",
      "responseElements.ConsoleLogin": "Success",
      "additionalEventData.MFAUsed": "No"
    }

    Answer: A service account signed in to the console interactively, and MFA was not used

    Two facts compound. `svc-backup` is a service identity. Those authenticate with keys via the API and have no business in the console at all, so an interactive sign-in is already out of character. `additionalEventData.MFAUsed: "No"` then removes the one control that would have stopped a stolen credential. The source IP is worth noting but proves nothing on its own, the browser user agent is a consequence of the console sign-in rather than a separate finding, and us-east-1 is simply where AWS records global sign-in events for every account.

    Read more: CloudTrail event reference: ConsoleLogin

  2. Pull the four fields you would put in a timeline row for this record.

    {
      "eventVersion": "1.09",
      "eventTime": "2026-03-02T02:31:44Z",
      "eventSource": "iam.amazonaws.com",
      "eventName": "CreateAccessKey",
      "awsRegion": "us-east-1",
      "sourceIPAddress": "198.51.100.23",
      "userAgent": "aws-cli/2.15.30 Python/3.11.8 Linux/6.5.0",
      "userIdentity.arn": "arn:aws:iam::123456789012:user/svc-backup",
      "requestParameters.userName": "admin-breakglass",
      "readOnly": "false"
    }

    Answer: eventName: CreateAccessKey · eventTime (UTC): 2026-03-02T02:31:44Z · Who made the call (userIdentity.arn): arn:aws:iam::123456789012:user/svc-backup · Which user got the new key (requestParameters.userName): admin-breakglass

    The caller and the target are different identities, and that difference is the whole finding: `svc-backup` minted a long-term access key for `admin-breakglass`. A key created for yourself is unremarkable; a key created for a more privileged account is persistence and escalation in one call, and it will outlive the session, the password reset, and usually the incident.

    Read more: CloudTrail event reference: CreateAccessKey

  3. One identity produced 34 records in four minutes. Thirty-one carry errorCode "AccessDenied", across 20 different eventName values. What is this?

    Answer: An identity mapping the edges of its own permissions: enumeration by trial and error

    The breadth is what separates the two readings. A broken application fails the SAME call repeatedly; an attacker with credentials of unknown scope fails MANY DIFFERENT calls once each, learning where the boundary is. CloudTrail records denied attempts in full, which is why this is often the clearest signal in a trail. It exists precisely because the attempts did not work. Throttling appears as its own error code, not AccessDenied.

    Read more: CloudTrail event reference: reading errorCode

  4. Sort each CloudTrail event into the stage of an intrusion it most directly represents.

    Answer: GetAccountAuthorizationDetails → Discovery · AttachUserPolicy → Privilege escalation · CreateAccessKey → Persistence · StopLogging → Defense evasion · ModifySnapshotAttribute → Data access · UpdateAssumeRolePolicy → Privilege escalation · DeleteFlowLogs → Defense evasion · ListSecrets → Discovery

    Two are worth arguing about, and the argument is the point. `CreateAccessKey` escalates nothing by itself. Its value to an attacker is that the credential survives, which makes it persistence. `UpdateAssumeRolePolicy` looks like configuration, but rewriting who may assume a role is how a stranger's account gains your permissions. That makes it escalation, and a cross-account backdoor at the same time.

    Read more: CloudTrail event reference: by stage

  5. These five events all came from one identity inside eleven minutes. Put them in the order that reconstructs the intrusion.

    Answer: GetCallerIdentity: "which identity are these keys?" GetAccountAuthorizationDetails: full dump of users, roles and policies AttachUserPolicy: AdministratorAccess attached to svc-backup CreateAccessKey: new long-term key for admin-breakglass StopLogging: trail "org-trail" stopped

    The order is orient, map, escalate, persist, then blind. You cannot escalate before you know what to escalate to, which puts the authorization dump ahead of the policy attach; and persistence has to be established while you still have the privilege to establish it, which puts the key creation before the logging is cut. StopLogging is last for the obvious reason. It is the only step whose whole purpose is that nothing after it gets recorded.

    Read more: CloudTrail event reference: sequences worth recognizing

  6. A bucket held customer data. You have the full CloudTrail export for the incident window and there is not a single GetObject record. What can you conclude?

    Answer: Nothing about whether the data was read, because S3 object-level events are not recorded unless data events were enabled

    This is the CloudTrail gotcha that produces the most confidently wrong incident reports. Management events (who changed the bucket policy) are recorded by default; data events (who read an object) are NOT, and they cost extra, so most trails never enable them. Absence of GetObject is absence of logging, not absence of access. Check the trail's event selectors before writing a word about what was or was not read.

    Read more: CloudTrail event reference: data events are off by default

  7. The compromised workload runs entirely in eu-west-1. You pull CloudTrail for eu-west-1 only and see no IAM activity at all. Why is that not reassuring?

    Answer: IAM, STS and CloudFront are global services and record their events in us-east-1 regardless of caller location

    Pulling only the region where the incident "happened" is the most common way to miss the entire identity half of an intrusion. Every CreateUser, AttachUserPolicy, CreateAccessKey and AssumeRole lands in us-east-1 no matter where the caller sat. If your export does not include us-east-1, you have not looked at IAM yet.

    Read more: CloudTrail event reference: global services log to us-east-1

  8. You need to follow what this session did next. Pull the three fields that let you pivot from this record to the rest of the activity.

    {
      "eventTime": "2026-03-02T02:12:03Z",
      "eventSource": "sts.amazonaws.com",
      "eventName": "AssumeRole",
      "awsRegion": "us-east-1",
      "sourceIPAddress": "198.51.100.23",
      "userIdentity.arn": "arn:aws:iam::123456789012:user/svc-backup",
      "requestParameters.roleArn": "arn:aws:iam::123456789012:role/OrgAdminRole",
      "requestParameters.roleSessionName": "ops-maintenance",
      "responseElements.assumedRoleUser.assumedRoleId": "AROAEXAMPLEID:ops-maintenance"
    }

    Answer: Role that was assumed: arn:aws:iam::123456789012:role/OrgAdminRole · Session name the caller chose: ops-maintenance · Assumed role ID to pivot on: AROAEXAMPLEID:ops-maintenance

    AssumeRole is the hinge of nearly every AWS timeline: everything the attacker does afterwards is attributed to the ROLE, not to the original user, so a search for `svc-backup` stops dead right here. `assumedRoleId` is what stitches the two halves together. The session name is attacker-chosen. "ops-maintenance" is camouflage, and because it is free text it is often the most distinctive string in the entire trail.

    Read more: CloudTrail event reference: AssumeRole

  9. What has happened here, and why does it matter after you rotate every credential in the account?

    {
      "eventTime": "2026-03-02T02:44:10Z",
      "eventSource": "iam.amazonaws.com",
      "eventName": "UpdateAssumeRolePolicy",
      "userIdentity.arn": "arn:aws:iam::123456789012:user/svc-backup",
      "requestParameters.roleName": "OrgAdminRole",
      "requestParameters.policyDocument": "{\"Statement\":[{\"Effect\":\"Allow\",\"Principal\":{\"AWS\":\"arn:aws:iam::210987654321:root\"},\"Action\":\"sts:AssumeRole\"}]}"
    }

    Answer: An outside AWS account can now assume an admin role here, and rotating credentials does not revoke that

    Account 210987654321 is not yours. The role keeps its name and its permissions and simply becomes assumable by a stranger, so there is no suspicious new user, no new key, and nothing for a credential rotation to invalidate. This is why trust-policy changes belong on the short list of events you review by hand: the containment step everyone reaches for first does not touch it.

    Read more: CloudTrail event reference: UpdateAssumeRolePolicy

  10. StopLogging appears at 02:51:07Z and the trail resumes at 06:20:00Z when an engineer notices. What is the correct reading of the gap?

    Answer: The gap is itself evidence, and other sources may still cover it: a second trail, an Organization trail, or already-delivered S3 objects

    StopLogging is recorded before it takes effect, which is what fixes the exact moment visibility ended and identifies who ended it. Beyond that, treat the blackout as a hypothesis rather than a wall: Organization trails frequently keep running when an account-level trail is stopped, records already delivered to S3 survive regardless, and the surrounding services, GuardDuty, Config, VPC flow logs, the IdP, have their own clocks. Establish what the trail actually covered before concluding anything was lost.

    Read more: CloudTrail event reference: StopLogging

  11. Order the events of an EBS snapshot exfiltration, from reconnaissance to the data leaving your control.

    Answer: DescribeInstances: find hosts and their attached volumes DescribeSnapshots: list existing snapshots CreateSnapshot: new snapshot of vol-0a1b2c3d ModifySnapshotAttribute: snapshot shared with account 210987654321

    Find the hosts, see what copies already exist, make your own copy, hand it to an account you control. The reason this pattern deserves recognition on sight is that the final step moves an entire volume out of your account without a single byte crossing your network. There is no egress spike, no flow-log evidence, nothing for a DLP product to inspect. The control plane is the only place it is visible at all.

    Read more: CloudTrail event reference: snapshot exfiltration

  12. A quarterly access review confirmed that no new policies were attached to any identity. Two weeks earlier, CreatePolicyVersion ran with setAsDefault=true on a policy already attached to a service role. Why did the review miss the escalation?

    Answer: The attachment never changed; only the policy's contents did, and the review checked attachments rather than current permissions

    This escalation survives an access review. The principal keeps the same policy ARN attached the whole time, so every "which policies are attached to whom" report is unchanged and correct, while what that policy GRANTS has been rewritten underneath. `setAsDefault=true` makes the new version live immediately. The lesson generalizes: review effective permissions, not attachment relationships, and treat CreatePolicyVersion and SetDefaultPolicyVersion as permission changes in their own right.

    Read more: CloudTrail event reference: CreatePolicyVersion

Identity

  1. Twelve minutes of sign-in failures from one source address. What is this, and what does it tell you to do next?

    09:02:11  alice@example.com    AADSTS50126  198.51.100.77
    09:02:14  bob@example.com      AADSTS50126  198.51.100.77
    09:02:18  carol@example.com    AADSTS50034  198.51.100.77
    09:02:22  dan@example.com      AADSTS50126  198.51.100.77
    09:02:26  erin@example.com     AADSTS50057  198.51.100.77
    09:02:31  frank@example.com    AADSTS50126  198.51.100.77
       … 340 more, 331 distinct user principal names, 1-2 attempts each

    Answer: Password spray: one or two guesses against many accounts, so look for the successes rather than the failures

    The distinguishing feature is breadth, not volume: 331 distinct accounts at one or two attempts each is deliberately under the lockout threshold, which is what makes a spray a spray. Brute force is the opposite shape: one account, many attempts. The failures are how you find the successes. The next step is to search the same window and source for any AADSTS50055, 50074 or a success, all three of which mean a password was actually correct.

    Read more: Entra sign-in reference: AADSTS50126

  2. What happened to this account, and what does the last line mean?

    23:41:02  dan@example.com  AADSTS500121  MFA  203.0.113.14
    23:41:39  dan@example.com  AADSTS500121  MFA  203.0.113.14
    23:42:15  dan@example.com  AADSTS500121  MFA  203.0.113.14
    23:42:50  dan@example.com  AADSTS500121  MFA  203.0.113.14
    23:43:31  dan@example.com  AADSTS500121  MFA  203.0.113.14
    23:44:08  dan@example.com  Success       MFA  203.0.113.14

    Answer: MFA fatigue. The attacker already had the password, and the user eventually approved a prompt

    AADSTS500121 is a failure of the STRONG AUTHENTICATION step, which means the password had already been accepted every single time. Five separate MFA prompts were pushed at a real person at midnight until one was approved. The success at 23:44:08 is the compromise. Password failures would be AADSTS50126, and a genuine network fault would not produce a clean success from the same address moments later.

    Read more: Entra sign-in reference: AADSTS500121

  3. Match each finding to the containment action that actually resolves it. Getting these wrong is how an incident continues after it is declared closed.

    Answer: Password spray produced one successful sign-in → Reset password · "Anomalous token" risk detection; activity continued after a reset → Revoke sessions / tokens · Consent to application granted Mail.Read and offline_access → Revoke the OAuth grant · New-InboxRule moving replies to RSS Feeds → Remove the mailbox rule · Attacker still reading mail hours after the password was changed → Revoke sessions / tokens · Third-party app reading mail without any failed sign-in → Revoke the OAuth grant

    A password reset is the reflex here, and it resolves exactly one of these. A stolen refresh token keeps working until sessions are explicitly revoked, which is why activity continues after a reset. An OAuth grant is not a credential at all: the attacker never learned the password, MFA was satisfied by the real user, and the grant refreshes indefinitely, so it must be revoked as a grant. And an inbox rule is a persistent artifact that survives every credential action; it keeps hiding replies until someone deletes it.

    Read more: M365 audit log reference: consent grants

  4. Pull the four fields that decide how urgent this successful sign-in is.

    Date (UTC)                 : 2026-03-02 04:12:56
    User                       : erin@example.com
    Status                     : Success
    IP address                 : 203.0.113.14
    Location                   : Lagos, NG
    Client app                 : IMAP4
    Authentication requirement : singleFactorAuthentication
    Conditional Access         : Not applied
    Risk state                 : At risk
    Risk detection             : Unfamiliar sign-in properties

    Answer: Status: Success · Client app: IMAP4 · Authentication requirement: singleFactorAuthentication · Risk detection: Unfamiliar sign-in properties

    Every one of these compounds the others. It succeeded. It used IMAP4, a legacy protocol that cannot present an interactive MFA challenge, which is why Conditional Access reads "Not applied" and why the authentication requirement is single-factor. And Identity Protection flagged it anyway. This is the exact combination that a filter for FAILED sign-ins would never surface, which is why the reference page says to filter on risk before filtering on status.

    Read more: Entra sign-in reference: fields worth reading

  5. A user reports a suspicious "document share" email. There are no failed sign-ins for that account and no password has changed, but the audit log has this entry. What happened?

    Operation : Consent to application
    User      : frank@example.com
    App       : "Secure Docs Viewer" (third-party)
    Scopes    : Mail.Read, Mail.Send, Files.Read.All, offline_access
    Result    : Success

    Answer: An illicit consent grant. The attacker holds a refreshing token and never needed the password at all

    This is why consent phishing is so effective: nothing about it looks like an attack in the sign-in log. The user authenticated legitimately to a real Microsoft consent page and satisfied MFA themselves; the attacker simply received delegated permission to read and send their mail. `offline_access` is the scope that makes it durable, because it grants a refresh token that keeps working indefinitely. The user approving it does not make it routine; it makes it invisible.

    Read more: M365 audit log reference: Consent to application

  6. Put this business email compromise in the order it happened.

    Answer: Successful sign-in from an unfamiliar location, IMAP4, single-factor New-InboxRule: messages containing "invoice" moved to RSS Feeds and marked read Send: invoice with altered bank details, to a customer contact Add-MailboxPermission: FullAccess granted to a second compromised account HardDelete: the original phishing message purged from Recoverable Items

    Access, conceal, act, persist, clean up. The rule comes second and not later for a reason that is easy to miss: it has to be in place BEFORE the fraudulent mail goes out, or the victim sees the replies and the whole scheme ends within the hour. Persistence is established while the access still works, and the cleanup is last because it destroys the evidence of everything before it.

    Read more: M365 audit log reference: what a BEC looks like

  7. Before the spray in question 1, the same source produced 900 sign-in attempts of which 780 returned AADSTS50034. What was that phase, and what did the attacker gain?

    Answer: User enumeration. The 120 accounts that did NOT return 50034 are the real ones, and became the spray target list

    AADSTS50034 means the account does not exist, so the response itself distinguishes real accounts from guesses. The attacker learns your valid usernames without ever trying a password. The 120 that came back with a different code are the confirmed list, which is exactly the population that shows up in the spray afterwards. This is why enumerate-then-spray produces a much higher hit rate than spraying a guessed list.

    Read more: Entra sign-in reference: AADSTS50034

  8. A sign-in from an unrecognized country returned AADSTS50074. MFA was required and not satisfied. The account is safe. What, if anything, still needs to happen?

    Answer: Reset the password. It was accepted before MFA was challenged, so it is known to the attacker

    It comes down to the order of operations. MFA is only challenged after the first factor succeeds, so AADSTS50074 is proof that the password was correct. The control did its job and the account was not accessed, but the secret is burned, and leaving it in place means the next attempt only has to defeat MFA. "MFA blocked it, so we are fine" is one of the most common triage mistakes in identity incidents.

    Read more: Entra sign-in reference: AADSTS50074

  9. What is the concern here, given that no user account was involved?

    Operation : Add service principal credentials
    Actor     : gina@example.com (Application Administrator)
    Target    : "Contoso Reporting Connector" (existing app, created 2023)
    Change    : new client secret added, expires in 24 months

    Answer: An already-trusted, already-permissioned application can now be authenticated as by whoever holds the new secret

    Nothing about the application changes: same name, same owner, same permissions, same age. Every inventory and every access review still shows exactly what it showed yesterday. Only who can authenticate as it has changed. Service principals are typically exempt from MFA and Conditional Access by nature and are rarely covered by joiner/leaver review, which makes this one of the most durable persistence mechanisms in a Microsoft tenant. The correct check is whether a deployment or rotation actually justified it.

    Read more: M365 audit log reference: Add service principal credentials

  10. A mailbox compromise is confirmed. Leadership asks which messages were read so they can scope notification. The tenant is licensed E3. What is the honest answer?

    Answer: It cannot be determined from the audit log. MailItemsAccessed requires Purview Audit (Premium), so the record does not exist

    This is the same trap as CloudTrail data events, and it has the same consequence: reporting "no evidence of access" when what you actually have is no logging of access. MailItemsAccessed is the only operation that answers the question and it is not present at E3. Saying so plainly is the correct answer. It is also the argument that gets the licensing changed before the next incident. Scope from what you can prove (sign-in windows, rules, sends, forwarding) and state the limitation explicitly.

    Read more: M365 audit log reference: MailItemsAccessed

Back to the drill