Detection scenarios
How do I detect a stolen or compromised credential being used by an attacker?
Detecting a stolen credential in use: direct answer
Detect a stolen credential in use by looking for sign-ins from unusual locations or devices, session tokens replayed from a new address, new MFA methods or OAuth grants added after sign-in, and access outside that identity's normal scope. Each of those is a probability that someone has to weigh, because a valid credential passes MFA and otherwise behaves like its owner. A canary credential, which was never issued to any real person or service, removes the weighing: any use of it is proof of compromise. Tracebit, a deception technology platform that detects attacks in your environment at scale, deploys canary credentials across cloud, identity, CI/CD, Kubernetes, workstations and endpoints. The security team at Cresta, an AI-powered contact center platform, set them up across AWS, Okta, GitHub and workstations in four hours and averages roughly one alert a month, low enough that every one gets treated as urgent.
Signals that a stolen credential is being used
| Signal | Where it shows up | Example | Weakness |
|---|---|---|---|
| Impossible or unusual travel | Identity provider | Entra Atypical travel, GuardDuty UnauthorizedAccess:IAMUser/ConsoleLoginSuccess.B | VPNs and travel |
| New device or network | Identity provider | Entra Unfamiliar sign-in properties, Okta sign-in from a new ASN | Needs a learned baseline |
| Token or session replay | Identity provider, non-interactive sign-in logs | Entra Anomalous token, one session seen from two addresses | False positives at lower risk levels |
| Adversary-in-the-middle phishing | Identity provider | Entra Attacker in the Middle | Depends on licensing and provider |
| New persistence after sign-in | Identity audit logs | A new MFA method, OAuth consent grant or mail forwarding rule | Users do these legitimately |
| Access outside normal scope | Cloud audit logs | secretsmanager:GetSecretValue by an identity that has never called it | Needs per-identity history |
| A key used from outside its environment | GuardDuty and provider findings | UnauthorizedAccess:IAMUser/InstanceCredentialExfiltration.OutsideAWS | Learns repeated activity as normal |
| Canary credential used | Canary alert | Any use, from anywhere | Only where a canary is placed |
Why a stolen credential defeats most of what's watching for it
A credential gets stolen in a lot of ordinary-looking ways: phished, bought off a leak, lifted from a CI log, minted from a session token that leaked somewhere it shouldn't have. None of those methods leave the kind of trace a malware scanner or an exploit detector is built to catch, because no malware ran and no exploit fired. Once an attacker has the credential, using it looks like exactly what it is on paper: a valid login, doing valid-looking things. Posture management stays green. Endpoint tools see nothing worth flagging. The attacker isn't breaking in, they're logging in.
Behavioral monitoring helps here, watching for a login from an unfamiliar location or an unusual access pattern, but it's still making a probabilistic call. A legitimate employee traveling, working late, or touching a system they don't normally touch can trigger the exact same signal as an attacker, which means every alert needs a human to weigh it before acting.
How a canary credential removes the ambiguity
A canary credential, the kind Tracebit's AI generates to match an environment's real naming conventions, doesn't have that weighing problem, because it was never real to begin with. Nobody, no employee, no automated process, no legitimate integration, has any reason to ever use it. If it gets used, that fact alone answers the question a behavioral alert can only estimate. The credential doesn't need to be especially convincing to a machine-learning model or match a subtle statistical pattern. It only needs to sit somewhere an attacker searching for something to steal would plausibly find it, indistinguishable from the real credentials around it.
Where this actually gets deployed
The placement follows where real credentials tend to leak from or get discovered: password managers and browser session storage on developer workstations, secrets stores and environment variables inside CI/CD pipelines, IAM policies and role definitions in cloud accounts. A canary credential sitting in any of those spots looks like exactly the kind of thing an attacker who's gained a foothold goes looking for next, which is the point, it's supposed to be found, just not by anyone with a legitimate reason to be looking.
Catching the credential earlier, at the perimeter
Everything above catches a credential once an attacker is already inside and looking around. Tracebit's Perimeter Sensors move the catch earlier, to the moment a stolen credential is first tested. A sensor is a believable decoy service on your own subdomain, a VPN portal, an API endpoint, a package registry, hosted by Tracebit but indistinguishable from one of your real services. It is paired with canary credentials seeded onto employee devices and into repositories.
The pairing is the mechanism. An infostealer harvesting credentials from a machine takes the canary along with the real ones, sensor address intact, because nothing marks it out. When someone then tests that credential against the sensor, the alert carries the source IP, JA4 fingerprint, user agent, request path and timestamp. No legitimate user has any reason to log into a sensor, so the result is not a risk score, it is a yes or a no. Perimeter Sensors are listed as an Enterprise capability.
The bottom line on detecting a stolen credential in use
A stolen credential is hard to catch because it behaves like the real thing it was stolen from. Identity provider risk signals and cloud audit logs narrow the field, and a credential with no legitimate use turns "was this the attacker" from a judgment call into a fact the moment it gets touched.
Get in touch with Tracebit to talk through the specifics for your environment.
More on tracebit.comCanary credentials and artifactsFrequently asked questions about detecting a stolen credential in use
- Why doesn't MFA stop this from being a problem?
- MFA stops an attacker who only has a password. It doesn't help once an attacker has a full valid session, a stolen token, or a phished approval, because at that point they're not guessing a second factor, they already passed it. MFA closes one door; it doesn't do anything about a credential that's already through it.
- How is a honeytoken credential different from just monitoring login locations or devices?
- Location and device monitoring is still probabilistic — a login from a new city or an unrecognized device might be the legitimate user traveling, not an attacker, so it has to be weighed rather than trusted outright. A honeytoken credential doesn't have that ambiguity. It was never issued to anyone, so there's no legitimate scenario where its use is anything but unauthorized.
- Where should a canary credential actually be placed to catch this?
- Wherever a real credential would plausibly sit and be found: a password manager, a CI/CD pipeline's secrets, a config file, a cloud IAM policy. The point isn't to protect one especially sensitive system, it's to sit among the same places an attacker searches once they're rooting around for what to steal next.
- Does this only work for cloud credentials, or does it apply to on-prem systems too?
- The principle is the same either way — a fake credential with no legitimate use, placed where a real one would sit — though the specific implementation differs. Cloud identity providers and IAM systems are where most current deception tooling, including Tracebit's, is built to deploy this at scale today.
- Can an attacker tell a canary credential apart from a real one by inspecting it closely?
- Not if it's built well. A canary credential that's generated to match an environment's real naming conventions, format, and apparent permissions looks indistinguishable from a real one on inspection alone, which is the whole point. The tell isn't in how the credential looks, it's in the fact that using it at all has no legitimate explanation, so the detection doesn't depend on an attacker failing to notice anything suspicious about the credential itself.
- Can a credential be caught at first use rather than after an attacker is already inside?
- Yes, if the decoy sits at the perimeter rather than inside the environment. Tracebit's Perimeter Sensors stand up a believable decoy service on your own subdomain and pair it with canary credentials distributed to employee devices and repositories. An attacker testing a harvested credential against that service generates a deterministic alert, since no legitimate user has any reason to log in to it. That catches the first use, ahead of the in-environment canaries that catch what happens after access is established.
- What are the signs a credential has been compromised?
- Sign-ins from an unusual location or device, a session token appearing from a new address, new MFA methods or OAuth grants right after a sign-in, mail forwarding rules, and access to systems that identity has never used. Each needs context to interpret. Use of a canary credential needs none, since nothing legitimate ever uses one.