Why attackers go after identity
Most account takeovers break no software at all. This lesson follows one at Cedar Inc., a fictional company, to show why attackers sign in rather than break in, what each stolen piece of identity is worth, how one sign-in grows into more access, and why the weakest path into an account decides how strong it is.
A sign-in that wasn't Riley's
At 08:50 one morning, an alert reaches Quinn on Cedar's security team. It combines three signals from the day before, each weak on its own. Riley's account signed in from an address at a hosting provider, a company that rents servers to anyone who pays. Six minutes later, a new 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. was added to the account. And the app was added from yet another hosting address that Riley had never used. Riley works in Cedar's finance team and signs in from the office network, whose addresses all begin with 198.51.100. Quinn pulls the 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.'s records for Riley's account, whose user ID is usr_4182:
Day 1 event actor session source
09:14:06 sign_in.succeeded usr_4182 s-7a91 203.0.113.24
09:20:41 authenticator.added usr_4182 s-7a91 203.0.113.57Each line is one event. The actor is the account the identity provider believed was acting, the session is the browser 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. the event belonged to, and the source is the IP address the request came from. Both events share session s-7a91, so whoever signed in at 09:14 is whoever added the app at 09:20.
There is no sign of a break-in. No server was compromised and no flaw in Cedar's software was used. At 09:02 Riley had opened an email about a shared invoice and followed its link to a page that looked like Cedar's sign-in page. That page passed Riley's password and authenticator code to the real identity provider as Riley typed them, and kept the session the identity provider issued in return. This is phishing: a message designed to trick someone into handing over the evidence that opens their account. From that moment, Cedar's systems treated the attacker as Riley, because by every check they ran, the attacker was Riley.
That is why attackers go after identity. Breaking into software means finding a flaw its builders missed. A sign-in page exists to let the right people in, and as Proving control of an account explained, authenticationChecking evidence that someone, or some application, controls an account, such as a password or a passkey. It establishes which account is being used, not what that account may do. establishes that someone presented the right evidence, not who they are. An attacker who presents Riley's evidence inherits everything Riley's account can do, and their activity looks like Riley's ordinary work.
What an identity is worth
Riley's password sounds like the prize, but it is only one of several things that let someone act as Riley, and each is checked at a different moment. A password is checked when someone signs in, so a stolen password allows new sign-ins. A session is checked on every request after the sign-in, and as Staying signed in showed, whoever presents the session identifier is treated as signed in. A stolen session skips the sign-in altogether, second factor included, because the identity provider already accepted it. That is what the relay page kept at 09:14.
The same reasoning extends to everything else an account touches:
| What is taken | What it gives the attacker | What limits it |
|---|---|---|
| Credential, such as a password | New sign-ins from anywhere, until it is changed or removed | Sign-in methods that resist phishing, refusing passwords known to be leaked |
| Session | Access with no sign-in check, until the session ends | Shorter lifetimes, sessions tied to one device |
| Access token | Calls to an API within the access the token grants, until it expires | Narrow scopes, short lifetimes, revocation |
| Signing key | Tokens for any account, with no sign-in at all | Keys that cannot be exported, watching every use |
| Administrative role | Changes to other people's accounts, policies and settings | Few administrators, stronger sign-in for each |
| Trust relationship | Access through an identity provider or application the organization already trusts | Limits on who may add or approve one |
Read down the middle column and the rows stop looking alike. Each item lasts a different time and ends in a different way, so each needs its own protection, and fixing one leaves the others alone. Changing Riley's password ends the value of the stolen password. It does not end session s-7a91 unless Cedar's identity provider ends sessions when a password changes, and it does nothing to the authenticator app added at 09:20, which the attacker can use to answer the next sign-in's second step.
A signing key sits at the far end. Every application that trusts Cedar's identity provider accepts the tokens its key signs, and no sign-in record exists for a 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. made with a stolen key, because no sign-in happened. As Digital signatures explained, a valid signatureA value made with a private key that lets anyone holding the matching public key check that a message came from the key's holder and has not been changed. It proves origin and integrity; it does not hide the message. shows which key signed, not who was holding it. A trust relationship is similar in reach: an application Cedar has approved, or another organization's identity provider Cedar accepts, is believed because of who it is, so whoever controls it inherits that belief.
Getting in, staying in, gaining more
Attacks on identity rarely stop at the first sign-in. It helps to name the stages. Getting in is the first access to an account. Staying in, often called persistence, is arranging ways back that keep working after the owner changes a password or signs out. Gaining more, or escalation, turns one account into more access: other accounts, administrative roles or other systems. Then the attacker acts: reads data, moves money, or sends messages that people trust because of whose account they come from.
Here is the whole Cedar incident, with the stage each step served. Like every example in these lessons, it is fictional.
Day 0
From three addresses, a few common passwords are tried against hundreds of Cedar accounts over one morning. Cedar's limits on failed sign-ins slow the guessing, and nothing succeeds.
Getting in, attempted
Day 1, 09:02
Riley receives the email about a shared invoice. Its link leads to a relay page at a look-alike address,
login-cedar.example, instead of Cedar's reallogin.cedar.example.Getting in
Day 1, 09:14
Riley types a password and an authenticator code. The relay passes both to Cedar's identity provider and keeps session
s-7a91. Riley sees an ordinary-looking page, never the invoice.Getting in, succeeded
Day 1, 09:20
Using the stolen session, the attacker adds their own authenticator app. Cedar asks for a fresh sign-in before that change only when a session is more than fifteen minutes old, and this one is six minutes old, so the change goes through.
Staying in
Day 1, 09:31
Still signed in as Riley, the attacker approves an application called Invoice Sync to read and send Riley's mail, the same kind of approval that Giving another application limited access described, where a person lets an application use a service on their behalf.
Staying in
Day 1, 09:40
A new rule in Riley's mailbox forwards every message containing "invoice" to
[email protected].Staying in
Day 1, 10:05
Posing as an IT contractor, the attacker phones Rowan at the help desk and asks for the second step on an administrator's account to be reset. Rowan calls back the number in Cedar's directory instead, and the request is refused and recorded.
Gaining more, refused
Day 1, 11:30
Through the access approved at 09:31, Invoice Sync reads a vendor's email that contains 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 for Cedar's payments vendor.
Gaining more
Day 2, 08:50
The alert fires, and Quinn investigates.
Detected
Day 2, later
Cedar shuts the attacker out, gives Riley the account back and has the payments vendor replace its API key.
Response
The guessing on Day 0 and the relay on Day 1 were both attempts to get in, and only the relay worked. The authenticator app, the Invoice Sync approval and the mail rule are three separate ways to stay in, and each survives a password change: the app answers the second step, Invoice Sync holds its own tokens, and the rule runs inside the mailbox whoever is signed in. The help desk call and the vendor key were attempts to gain more, one refused and one successful. Everything pointed toward acting. Invoice Sync could send mail as Riley, and the forwarding rule was collecting exactly the conversations a convincing fake payment request would need.
Each stage also gave Cedar a chance. Sign-in limits blunted the guessing, Rowan's callback stopped the help desk request, and the records of the sign-in and the new authenticator raised the alert. A response that changed only Riley's password would have left all three staying-in steps working. Investigating an account compromise rebuilds this timeline from Quinn's records.
Customers and employees
The attacker chose Riley. The email was about an invoice because Riley works in finance, and the help desk call named an administrator because that account could change everyone else's. This is a targeted attack: the attacker picks the organization, often the person, and puts effort into making each step convincing.
Customers of a consumer service, such as the photo service whose albums Cedar's staff share, are mostly attacked at scale instead. Someone holding millions of email and password pairs leaked from other services tries them all against the photo service, knowing a small fraction will work because people reuse passwords. This is credential stuffing, and nobody chooses the customers it catches. Each account is worth little on its own, so the attacker relies on volume and on making each attempt as cheap as possible.
The difference shapes the defenses. Cedar can require particular sign-in methods for its staff, manage the laptops they use and train its help desk. The photo service cannot choose its customers' devices, and it must let a customer who has lost everything recover their account without a help desk that knows them. Its strongest tools work across the whole service, such as limits that notice one password being tried against thousands of accounts.
The line between the two is not sharp. Automated guessing reached Cedar on Day 0, and a well-known customer of the photo service can be targeted personally. Both face the same paths into an account.
The weakest path wins
After the incident, Cedar gives Riley 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.. As Security keys, passkeys, and biometrics explained, a passkey cannot be guessed, reused from someone else's breach or used on a look-alike page, so the relay that worked on Day 1 would fail. Suppose, though, that Cedar's sign-in page still offers "Lost your passkey?", which sends a code by text message to the phone number in Riley's profile. A phone number can be moved to another SIM card by someone who persuades the mobile carrier. An attacker simply ignores the passkey and chooses the text message. An account is only as strong as the weakest path into it, not the method its owner uses every day.
The passkey can have a path behind it too. Most passkeys today are synced: Riley's phone and laptop share them through an account at the phone platform's provider, so a new device receives every passkey once it signs in to that account. Someone who takes over the sync account, perhaps through that provider's own recovery, can restore the passkeys onto a device of their own without ever touching Cedar. A synced passkey still cannot be phished, but it inherits the security of the account that syncs it, which is why Authenticator assurance levels treated syncable authenticators separately from keys that never leave one device.
Counting those paths is where defending an account starts. Sign-in methods and their fallbacks are one path. Recovery is another, and so is the help desk. Sessions already issued, applications already granted access and the signing key behind every token are each a separate way to end up acting as the account. Here are those paths for Riley's account on Day 1:
On Day 1, Riley's password and code passed straight through the relay. The help desk path held when it was tried against an administrator's account, because Rowan called back the number in Cedar's directory instead of trusting the caller, and the same callback protects Riley's. Paths outside the sign-in page are often run by people and older systems, and are sometimes protected by little more than a few personal details that can be found or guessed.
The map also runs the other way. What lies beyond an account decides how much each path into it is worth defending. Riley holds no administrative role, yet Riley's mailbox held a key to Cedar's payments vendor, and an administrator's account would have opened every other account at Cedar. That is why the attacker spent effort on the help desk call: the same few minutes of persuasion aimed at an administrator would have been worth far more than another finance account.
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
- Count the paths into one accountSign one person in, look at the account from both sides, try a wrong password, and list every path into it as getting in, staying in or gaining more.