How attackers stay in
Between 09:20 and 09:40 on Day 1, the attacker in Riley's account added three ways back in, none of which needs Riley's password. This lesson looks at those footholds and the others like them: added sign-in methods, app grants that outlive the sessionThe ongoing connection between later requests and an earlier sign-in, so you are not asked for your password on every click. It is often tracked with a cookie holding an unpredictable session identifier., credentials added to applications and quiet configuration changes, and how to make each one visible when it is added.
Changing the password was not enough
Suppose Cedar resets Riley's password after the alert and stops there. The captured password stops working, and the attacker loses very little. By then they had registered their own authenticator appSomething a person controls and uses to prove control of an account, such as a memorized password, an app that generates one-time codes, or a security key. It counts only after it has been registered to that account. on Riley's account at 09:20, approved a third-party app called Invoice Sync with permission to read and send Riley's mail at 09:31, and added a mail rule at 09:40 that forwards messages containing "invoice". None of these depends on Riley's password. The authenticator is a sign-in method in its own right, Invoice Sync holds its own grant, and the mail rule runs on the mail server without anyone signing in.
Keeping access after the original way in has been closed is persistence, and each means of keeping it is a foothold. Attackers add footholds early, while the stolen session still works, because they expect the first way in to be found. Whether a password reset also ends sessions and app grants varies from one provider to another, so after a compromise each foothold is checked rather than assumed. The figure compares Riley's account after a password reset alone with the same account after every foothold has been inspected.
Password reset alone
- Captured password
- No longer works
- 09:20 authenticator app
- Still enrolled
- 09:31 Invoice Sync grant
- Depends on the provider
- 09:40 forwarding rule
- Still forwarding
The attacker keeps a way back
Every foothold inspected
- Captured password
- No longer works
- 09:20 authenticator app
- Removed
- 09:31 Invoice Sync grant
- Revoked with its refresh tokens
- 09:40 forwarding rule
- Deleted
Every way back closed and verified
Whether a password reset also ends sessions and app grants varies from one provider to another.
A second way back in
The most direct foothold is another sign-in method. An authenticator the attacker enrolls belongs to them, and depending on the service it can satisfy the second step whenever they learn the next password, prove identity in a self-service password reset, or complete a sign-in on its own. A passkeyA credential that your phone, computer or password manager creates for one website and keeps for you, unlocked with a fingerprint, face or PIN. Nothing you could type is sent, and it works only for the site it was made for, which helps it resist phishing. the attacker registers needs no password at all.
Adding a method is supposed to need proof that the person adding it controls the account now, as Enrollment, replacement, and recovery describes. At Cedar, that proof was a recent sign-in, which a stolen session passes easily: at 09:20 the attacker's session was six minutes old.
Recovery contacts give the same result one step removed. If an attacker replaces the recovery email address or phone number, the next "forgot password" request goes to them, and they can reset the password again after the owner does. This is why changing a recovery contact notifies the old one.
App passwords are separate passwords that some services issue for older mail and calendar programs that cannot complete MFASigning in with more than one type of factor, such as a password plus a code from an enrolled authenticator app. Two passwords are still one factor type, however many screens they appear on.. They skip the second factor by design. Some services cancel them when the main password changes, while others keep them until someone deletes them, so a defender has to check rather than assume.
Access that outlives the session
Sessions end and access tokens expire, but some access is built to last. When the attacker approved Invoice Sync at 09:31, Cedar's identity providerA service that authenticates users and tells other applications about the sign-in, so those applications never handle the users' passwords. In OpenID Connect it is called an OpenID Provider. recorded a grant and gave the app a refresh tokenA longer-lived credential that a client sends to the authorization server, never to an API, to get new access tokens without asking the person again., which it can exchange for new access tokens without anyone signing in, as Giving another application limited access explains. The grant connects the app to Riley's account. It does not depend on Riley's password or on the session that approved it.
For honest apps that is the point: a calendar sync should not break every time someone changes their password. It also means that a grant an attacker approved keeps working after the owner recovers the account, until the grant is revoked along with the refresh tokens issued under it. Some providers end refresh tokens when a password changes, but a defender cannot rely on that without checking how their provider behaves. At 11:30, two hours after the approval, Invoice Sync used its access to read a vendor email that held an APIAn application programming interface: a defined way for software to interact with a service. A web API offers endpoints where other programs send HTTP requests. key.
The same is true of a mail or chat app signed in on the attacker's own device. It holds a refresh tokenA piece of data issued by a trusted service that a client presents as a credential, for example to call an API or to report a sign-in. Some tokens carry readable claims; others are random strings that only the issuer can interpret. of its own and can keep fetching new mail long after the session in the browser has ended. Revoking access and sharing security events showed how each of these kinds of access is ended.
Credentials added to applications
Applications have credentials too. An integration that archives every mailbox, or that creates accounts when the HR system hires someone, signs in with its own client secretA shared secret that a confidential client uses to prove itself to the authorization server, much like a password for an application. It belongs on a backend, never in code sent to browsers or phones. or key, using a flow such as the client credentials grant. Most platforms let an application hold more than one credential at once, so that a new one can be added before the old one is removed.
An attacker with the right to manage an application can add a credential of their own. From then on, they can act as that application, with whatever permissions it already holds, from anywhere. Resetting a person's password, removing their methods or even disabling their account does nothing to it, because no person signs in. The change also looks like routine maintenance, since adding a new secret is exactly what a planned rotation does.
Riley's finance account had no right to manage applications. An administrator's account usually does, which is why administrators draw attempts like the refused call to Cedar's help desk. The record to watch for is a credential added to an application by someone who does not normally maintain it, followed by the application signing in from a network it has never used. Rotating client credentials showed what a planned change looks like, which makes an unplanned one easier to spot.
Quiet configuration changes
Some footholds are not credentials at all. The rule the attacker added to Riley's mailbox at 09:40 forwards every message containing "invoice" to an address outside Cedar. It needs no session, no token and no password. It runs on the mail server each time a matching message arrives, and it keeps running after every credential on the account has changed. Rules that move or delete messages work the same way, and can hide a security notification from the person it was meant for.
With administrative access, configuration changes reach further. An attacker can create an account for themselves, assign a role to an account they control, leave one account out of the MFA policy, or add a trusted identity provider that can assert anyone's identity, as Abusing federation and account linking described. Each looks like ordinary administration in the records, and each keeps working long after the attacker's original access is gone.
Making new footholds visible
Footholds are added through ordinary features, so preventing them means guarding the moments when those features are used. Adding a sign-in method, changing a recovery contact, approving an app and adding an application credential should each count a recent sign-in only if it used a phishing-resistantA property of an authentication method that binds sign-in to the real service, so evidence entered on a look-alike site cannot be passed on and used. Passkeys have it; passwords and one-time codes do not. method, and otherwise ask for one at that moment. Riley's 09:14 sign-in used a password and a code, so under that rule the attacker would have met a passkey prompt at 09:20 that the relay could not answer.
Notifications let the owner notice what prevention missed. A message to Riley, through a channel that existed before the change, saying that a new authenticator was added or a new app approved, with a clear way to report "this was not me", turns the owner into a detector. The channel matters: a notice sent only to a recovery address the attacker just added reaches the attacker.
Monitoring watches for the patterns. On Day 2, Cedar's alert fired on exactly this kind of foothold: a sign-in from a hosting provider, then a new authenticator added minutes later from a network Riley had never used. Forwarding rules that send mail outside the organization, credentials added to applications and changes to trust configuration deserve the same attention, as Detecting identity attacks explains.
When one foothold turns up, inspect the account's methods, recovery contacts, sessions, grants and rules, together with resources it created or changed. Remove unauthorized access and verify the result: a revoked grant whose next refresh is refused, a method list with nothing unexplained in it. In the exercise, assume only the reset behavior stated in each case; otherwise answer that survival depends on the provider. Containing and recovering follows the full response.
What survives the reset?
Simulation. These cases model a fictional password-only reset that leaves enrolled methods, recovery contacts, app grants, forwarding and application secrets unchanged. Session invalidation is a separate choice. Use that stated behavior for the answers; real providers can combine different actions, which you must verify. Answers stay in your browser.
Check your understanding
Try these questions before moving on. If an answer isn't right, use the feedback and try again.
Try it in the Lab
- Find which foothold survives a password changeGive an account an application that can refresh its tokens and an extra authenticator, change the password, then find which one is gone and remove the one that stayed.