Machine Identity Incident Response: Building Playbooks for Stolen Tokens

| 5 min read

Machine credentials need a different response clock

A compromised employee account gives a security operations center a person to contact. A stolen service credential gives analysts a log trail and a harder question: what will break if they revoke it? That difference can leave attackers active while responders search for an owner or wait for approval.

The gap matters because machine identities greatly outnumber human ones. CyberArk research puts the ratio at roughly 82 machine identities for every human identity. Many lack multifactor authentication, hold broader access than their task requires, and generate routine traffic that monitoring systems may treat as background noise. A response plan built around asking a user to confirm a sign-in won't fit a service account, an API key in a build pipeline or an old OAuth token.

For machine identity incidents, the first minutes depend on information prepared before an alert: who owns the credential, what relies on it, how much access it has and who can approve revocation. Without those answers, the incident process can stall at precisely the point when speed matters.

Why familiar response steps stall

Ownership is often unclear. A service account may be listed in Active Directory, but its description can be blank or outdated. The application team that created it may have changed, or the trail may lead to a contractor who left the company. Analysts then spend valuable time identifying the people who can explain its purpose.

Containment brings a separate operational risk. Disabling a user's account usually affects one employee. Revoking a credential used by a payment integration could interrupt a customer-facing service. If no one has agreed in advance who can accept that disruption, an analyst may seek senior approval while the credential remains active.

Detection is also less straightforward than a familiar impossible-travel alert. An attacker using a valid token can make authenticated requests to the same endpoints as the legitimate integration, perhaps during its normal operating hours. Rules designed to catch a person signing in from an unexpected country may have little to say about that activity.

Ashish Mishra

Breaches reveal the cost of forgotten access

Three incidents show how credentials can outlive the work that justified them. In Cloudflare’s account of its Thanksgiving 2023 security incident, attackers used one access token and three service account credentials taken during an earlier Okta support breach. Cloudflare had rotated thousands of credentials after that breach, but these four were missed because the team believed nothing depended on them. The alert came more than a week after the attackers first logged in, when they added one service account to an administrator group. Cloudflare’s incident write-up makes the inventory problem concrete: a credential thought to be unused can still provide a route in.

Microsoft’s response guidance on the Midnight Blizzard attack describes a different path. The attackers password-sprayed a legacy account in a test tenant that had no MFA. An old test OAuth application in that tenant still had elevated access to the corporate environment, and attackers used it to reach corporate email accounts. The lesson is that test infrastructure and its permissions need an owner and an end date, just like production access. Microsoft’s guidance for responders details the case.

In August 2025, attackers obtained the OAuth tokens used by Salesloft’s Drift chatbot to connect to Salesforce. For roughly ten days, they took records from one customer’s Salesforce instance after another. Google’s threat intelligence team tracked the campaign and concluded that the attackers were primarily seeking credentials. They searched the stolen data for AWS access keys, passwords and other material that could help them reach additional companies. Google’s campaign analysis shows how data accessed through one integration can become a route to other systems.

Across these cases, access remained useful after its original purpose had faded. The response implication is direct: security teams need to know what a machine credential can reach and what still depends on it before an incident forces them to find out.

Make the inventory useful during an incident

A list of service accounts is a starting point, not an incident plan. For each high-privilege non-human identity, record the responsible team and a short explanation of what would fail if the identity were removed. Getting that explanation may require asking the application team, but doing so before an incident avoids making the analyst hunt for an answer at 3 a.m. while an attacker is active.

Then rank identities by potential impact. A read-only reporting token should not follow the same response path as a cloud administrator service principal. For the highest-risk tier, name the person or role that can authorize an immediate revoke, including when the action may interrupt production. Executives should own that trade-off; leaving the decision to whoever happens to be on shift invites delay.

For organizations subject to the Australian SOCI framework, the source notes that a 12-hour window to report a significant cyber incident to ASD may be running while responders wait for approval. That makes clear ownership and decision rights part of incident readiness, alongside the technical steps.

Use logs to triage what a person cannot confirm

Machine identity triage should replace the question “Was this you?” with checks that can be answered from system records. Compare the credential’s usual sign-in locations with current activity. Cloud Audit Logs and workload identity platforms can provide useful evidence when logging has been enabled and retained.

Next, compare granted permissions with the scopes the identity has actually used over recent months. A credential may hold high-risk permissions that have sat idle, making them attractive to an attacker. Review changes that could preserve access, too: someone with a privileged service principal may create new secrets or register another application. Revoking the original token won't remove those additions.

Plan containment and recovery together

Define in advance when to rotate a credential and when to revoke it. Rotation may suit a case where investigators have no evidence of escalation and the business cannot readily lose the integration. Evidence of an active attack should trigger revocation, with the threshold written clearly enough that responders don't have to negotiate it at midnight.

Replacement credentials can reduce the cost of decisive containment. Application teams should practice creating a new credential and storing it in the approved secrets system during a low-traffic period. If that process is already tested, revocation may mean about ten minutes of downtime instead of a day-long disruption. The exercise should also confirm that the runbook points to a current vault location.

Scoping must cover the credential’s full lifetime, not just the period after the alert. A machine identity can remain compromised for months before anyone notices, so the first suspicious event found may not be the first one that occurred. Review every place the identity could reach and every secret added to it; each additional secret may require its own rotation.

Recovery should address why the credential was exposed. Where a workload relies on a static secret, assess whether it can use short-lived tokens through Workload Identity Federation or request a Just-In-Time token that expires automatically. These changes take application work and funding, so they need support beyond the SOC.

Finally, run a tabletop with the SOC and application owners using the highest-privilege integration as the scenario. Start with a stolen token and continue through containment and recovery. Pay close attention to how long it takes to identify who can approve a production-disrupting revocation. That delay is a measurable gap—and one the next incident shouldn't have to discover.

Source: Robert Miller · www.csoonline.com