Beta

Create a tenant

A new tenant starts with its own users, OAuth settings, audit history and logs. You are its first Tenant Admin.

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 session, 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 app 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.

Riley's account after a password reset alone, and after each foothold added between 09:20 and 09:40 has been inspected and removed.

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 passkey 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 MFA. 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 provider recorded a grant and gave the app a refresh token, 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 API key.

The same is true of a mail or chat app signed in on the attacker's own device. It holds a refresh token 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 secret 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-resistant 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.

The attacker still holds the cookie for session s-7a91. What does a password reset do to it? 1 of 6
Day 1 09:14:06  sign_in.succeeded
  account:  usr_4182 ([email protected])
  methods:  password, authenticator code
  network:  203.0.113.24 (hosting provider)
  session:  s-7a91 (browser cookie)

Enable JavaScript to check an answer here, or open the explanation below.

Show the answer and why

It ends the session if the reset also invalidates that session. A password change can trigger session invalidation, but the cookie does not carry the password. Verify the provider's reset choice and the result of a real session request.

The attacker enrolled this authenticator. What does a password reset do to it? 2 of 6
Day 1 09:20:41  authenticator.added
  actor:    usr_4182 ([email protected])
  method:   authenticator app
  session:  s-7a91
  network:  203.0.113.57
  check:    recent sign-in, 6 minutes ago, passed

Enable JavaScript to check an answer here, or open the explanation below.

Show the answer and why

It stays enrolled and can still answer requests for a code. In this stated reset policy, the authenticator remains enrolled. It can supply a second factor or any recovery proof the service accepts, but it does not necessarily authenticate alone or reveal the new password.

Invoice Sync received a refresh token with this grant. What does a password reset do to it? 3 of 6
Day 1 09:31:02  consent.granted
  actor:    usr_4182 ([email protected])
  app:      Invoice Sync
  scopes:   mail.read mail.send offline_access
  session:  s-7a91
  network:  203.0.113.57
Show the answer and why

It remains usable under this policy until the grant and tokens are revoked. The stated reset preserves grants and refresh tokens. Other reset operations may revoke them. Test actual grant/token behavior and revoke unauthorized access explicitly.

What does a password reset do to this mail rule? 4 of 6
Day 1 09:40:17  mailbox.rule.created
  actor:      usr_4182 ([email protected])
  condition:  message contains "invoice"
  action:     forward to [email protected]
  network:    203.0.113.57

Enable JavaScript to check an answer here, or open the explanation below.

Show the answer and why

It survives, because the rule runs on the mail server by itself. Nothing about the rule depends on a credential or a session, so it keeps forwarding until someone deletes it.

Someone using a photo application customer's session changed the account's recovery email. What does a password reset do to that change? 5 of 6
account.recovery_email.changed
  account:  photos.example customer 88213
  old:      m***@example.test
  new:      k***@example.test
  network:  192.0.2.0/24
  session:  created 3 minutes earlier on a new device

Enable JavaScript to check an answer here, or open the explanation below.

Show the answer and why

It survives, so the next reset request goes to the new address. This modeled reset leaves the address changed, so an accepted email recovery goes to it. Verify and restore an independently trusted contact before returning the account.

An attacker using an administrator's account added this secret. What does resetting that administrator's password do to it? 6 of 6
app.credential.added
  application:  hr-directory-sync
  credential:   client secret, expires in 2 years
  actor:        administrator account usr_0107
  note:         application holds User administrator

Enable JavaScript to check an answer here, or open the explanation below.

Show the answer and why

It survives, because the application has its own credentials. The application has an independent credential and this reset does not revoke it. Find the unauthorized secret, revoke it and inspect the application's actual permissions and use.

Check your understanding

Try these questions before moving on. If an answer isn't right, use the feedback and try again.

Cedar changes a compromised account's password and invalidates its sessions, but its reset leaves enrolled passkeys in place. Which remaining foothold could let the attacker start a new sign-in? 1 of 4

Choose one answer.

Why should a service ask for fresh proof of control before someone adds an authenticator to an account? 2 of 4

Choose one answer.

Cedar resets Riley's password and ends every session, yet mail containing "invoice" still reaches an outside address. What is still doing it? 3 of 4

Choose one answer.

With an administrator's session, an attacker adds a new client secret to Cedar's mailbox archiving integration. Cedar then resets that administrator's password and removes their methods. What still works? 4 of 4

Choose one answer.

Try it in the Lab

We value your privacy

We use cookies and similar technologies to enhance your browsing experience, and analytics to understand our traffic. By clicking "Allow all", you consent to optional analytics. Cookie Policy

Learn identity