Contained isn’t clean, Part 3: containment and the gap

Contained isn't clean - Part 3 - Containment and the gap

Part 3 of 4 - Containment, and what it leaves behind

In the previous part: The attacker has planted four footholds - a rogue MFA method and an inbox rule on the victim, and a directory role and an app secret through an over-privileged helpdesk account.

Stage 3 - Containment

Attack disruption may fire on the identity activity on its own; in a lab it often will not, because it needs a high-confidence correlated pattern. Either way the response is the same. If disruption fired, the user is already disabled with sessions revoked. If not, take the same actions by hand from the user page in the Defender or Entra portal: revoke sessions, then block sign-in. Do the same for the helpdesk account.

In this lab run, attack disruption did not fire on the identity activity and the DisruptionAndResponseEvents table stayed empty, which is the common lab outcome. The point stands either way, because the manual containment takes exactly the actions disruption would.

Both accounts showing Account status: Disabled after revoke-sessions and block-sign-in.
Both accounts showing Account status: Disabled after revoke-sessions and block-sign-in.

Stage 4 - The door left open

Here is the heart of it. With the accounts contained, look at the victim’s registered authentication methods. The account is disabled and its sessions are revoked, yet both methods are still there: the legitimate Microsoft Authenticator and the attacker’s own method, untouched.

The victim's authentication methods while the account is disabled - the attacker's method is still registered alongside the legitimate one.
The victim’s authentication methods while the account is disabled - the attacker’s method is still registered alongside the legitimate one.

Containment did exactly what it is meant to - it killed the sessions and blocked sign-in. And it did nothing to the footholds. The attacker’s MFA method is intact, the added role is still assigned, the app secret still works, and the inbox rule is still running. The moment the service desk re-enables the account to close the incident, the attacker walks straight back in.

Reinforcing the hunting approach: the Entra authentication methods page itself warns that hidden and temporary methods are not shown, and to use the Graph API to see them all. That is exactly why the hunt in Part 4 reads methods through Graph rather than trusting the portal view.

The lesson so far

  • Containment buys time. It does not make the account safe.
  • Every account in the incident matters, not just the first one. The helpdesk account did more damage than the phished user.
  • Re-enabling a contained account before removing the footholds hands the attacker their access back.

Next in the series: Part 4 hunts the footholds and eradicates them precisely, then restores the account safely.

2 thoughts on “Contained isn’t clean, Part 3: containment and the gap”

  1. Pingback: Contained isn’t clean, Part 2: staging the attack | Cloud-Secure.ai

  2. Pingback: Contained isn’t clean, Part 4: hunt and eradicate | Cloud-Secure.ai

Leave a Reply