Case study · Incident response
Responding to a password spray against our remote access
Tracing a distributed password spray through three internet-facing paths, containing it within the morning, and turning it into a detection.
- 216Lockouts in 24 hours
- 14Attacking networks blocked
- 3Entry paths traced
What happened
On a Tuesday morning, people across our locations, IT administrators included, started getting locked out of their Active Directory accounts. Over 24 hours there were 216 lockouts across 74 accounts, six of them administrator accounts. Microsoft 365 sign-ins weren't locking, which was the first clue: whatever was guessing passwords was reaching on-premises AD directly, not going through the cloud.
Working the incident
- Find every door. I grouped the domain controllers' failed logons by where they entered the network. Three internet-facing paths were feeding AD: the Citrix Gateway (by far the largest, about 3,300 failed logons against 87 accounts on one DC, and roughly 28,800 failed Gateway logins in the Gateway's own log), an older remote-access appliance that IT didn't manage, and Microsoft 365's pass-through authentication.
- Separate the attack from the noise. I counted attempts against user names that don't exist, which is the signature of an attacker working from a guessed list. The Gateway and the unmanaged appliance carried dozens of made-up names each. A few hundred other failures came from internal devices with stale saved passwords, which were real but not the attack.
- Contain the largest path. The attempts came from at least 14 hosting-provider networks. I blocked those networks and added a login limit on the Gateway itself. In the 15 minutes after that, there were no new lockouts.
- Close the side door. The unmanaged appliance and the Gateway shared one service account for their directory lookups, set up years earlier, so it couldn't be disabled without breaking remote access for everyone. I gave the Gateway its own account, then disabled the shared one, which cut the appliance off from AD entirely.
- Prove the negative, honestly. I found no successful attacker logon in any of the logs, and wrote down exactly what that claim rests on: the domain controller's security log only reached back about 19 hours under that load, and the Gateway's about two.
- Escalate. I briefed our managed security provider, the vendor responsible for the appliance, and our Microsoft 365 administrator, and wrote the incident report with root cause, timeline and recommendations.
What I found after the dust settled
Reviewing the Gateway afterwards turned up a set of older blocking rules from a previous response, some with well over 100,000 hits. This hadn't been a one-day event. The same campaign had been rotating through hosting ranges for a long time, which is why blocking addresses is containment rather than a fix. The review also surfaced a Gateway firmware update for a recently published vulnerability, which I flagged for patching.
What I'd tell someone starting
- Count distinct accounts per source, not failures per account. A spray is built to stay under lockout thresholds, so the signal is one source failing against many names. I've since written that detection up as part of detection-lab, with a safe simulation that proves it fires.
- One service account per device. A shared bind account turned a five-minute containment step into a two-step change.
- Know every internet-facing login. An appliance nobody was watching was quietly taking guesses against the directory.
- Log retention decides what you can prove. Size the domain controller security logs and ship edge-device logs off the box, so the next investigation can reach back to the start.
- MFA on every internet-facing sign-in is the control that holds no matter which range the next spray comes from.