Machine Identity Incident Response: Building Playbooks for Stolen Tokens

Nov 05, 2026 506 views

When a machine credential is compromised, a familiar security playbook can leave analysts waiting for answers that don’t exist. There’s no employee to contact about a suspicious sign-in, and disabling a service account can interrupt a payment flow or customer-facing system. The response depends on knowing what the identity does, who owns it and who can approve containment before an incident starts.

That gap matters at scale. CyberArk research estimates there are roughly 82 machine identities for every human identity. Many lack multifactor authentication and have more access than their intended role requires. Their activity can also blend into routine system traffic, making a stolen token harder to distinguish from normal integration work.

Why human account playbooks fall short

A standard account response often starts with a simple question: was the user responsible for a sign-in from an unfamiliar location? That works when an account maps to a person. It fails for a service account, an API key embedded in a build pipeline or an OAuth token granted to a SaaS application years ago.

Finding an owner can consume valuable time. A directory entry may identify a team, but its description could be blank or obsolete. The trail may lead to a contractor who has since left. Even when analysts identify the right team, they still need to understand what depends on the credential before revoking it.

That creates a difficult containment decision. Disabling a compromised employee account has a clear operational cost. Revoking a credential used by a payments integration could take down a service. If the playbook doesn’t name who can accept that impact, an analyst may spend the first part of an incident seeking approval while an attacker retains access.

Detection has its own complications. An attacker using a valid token can make authenticated requests to the same endpoints as the legitimate integration. They may follow the application’s usual schedule, too. Rules designed to catch a person signing in from two distant locations won’t help much when the identity belongs to software.

Ashish Mishra

Breaches expose the cost of forgotten credentials

Recent incidents show how credentials issued for a specific purpose can outlast the work they were meant to support. In its account of the Thanksgiving 2023 incident, Cloudflare described attackers using one access token and three service account credentials stolen during an earlier Okta support breach. Cloudflare had rotated thousands of credentials after the Okta incident, but those four were missed because the company believed they were unused.

The alert came more than a week after the attackers first signed in. It fired when they added one of the service accounts to an administrator group. The delay underlines a practical problem: a credential that appears dormant may still be usable, and its first visible sign of misuse may come well after access has been established.

Microsoft’s guidance on the Midnight Blizzard attack describes a different route through neglected infrastructure. Attackers used password spraying against a legacy test tenant account without multifactor authentication. An old test OAuth application in that tenant still had elevated access to the corporate environment, giving the attackers a path to corporate email accounts.

In August 2025, attackers obtained OAuth tokens used by Salesloft’s Drift chatbot to connect with Salesforce. For roughly ten days, they accessed records in one customer’s Salesforce instance after another. Google’s threat intelligence team tracked the campaign and concluded that the attackers were mainly seeking credentials. They searched stolen data for AWS access keys and passwords that could help them reach other organizations.

My read is that these incidents point to a shared operational weakness: machine access can remain active long after its original purpose has ended. A playbook built around human accounts won’t resolve that problem. Inventory and ownership have to come first.

Build the inventory around impact and ownership

A useful inventory needs more than account names. For each high-privilege machine identity, record the team responsible and a short explanation of what would stop working if the identity were removed. Getting that detail means asking application owners in advance. Without it, analysts may be trying to trace dependencies in the middle of the night while an attacker is active.

Rank identities by the damage their compromise could enable. A read-only reporting token should follow a different response path from a cloud administrator service principal. For the highest-risk tier, name the person or role authorized to approve immediate revocation, including when production disruption is possible. That decision belongs with an executive who understands the business impact; leaving it to whoever is on shift invites delay.

The inventory should also help responders answer machine-specific questions. Which locations or environments does this identity usually access? Which permissions has it actually used in recent months? Are there powerful scopes that have sat idle? Cloud Audit Logs and workload identity platforms can supply useful evidence when logging has been enabled.

Persistence deserves a separate check. Someone with access to a privileged service principal may create additional secrets or register another application. Revoking the credential that first triggered an alert won’t remove those new access paths. The response plan should include a search for changes made by the compromised identity.

Make containment a prepared decision

State the conditions for credential rotation and full revocation separately. Rotation may fit a situation where there’s no evidence of escalation and the business can’t tolerate an abrupt outage. Evidence of active misuse calls for revocation. Clear criteria help analysts act without reopening the same debate during every incident.

Replacement credentials can reduce the operational cost. Application owners should rehearse generating a new credential and storing it in the approved secrets system during a low-traffic period. If the procedure works, revocation might mean about ten minutes of downtime rather than a day-long disruption. The exercise can also reveal outdated vault references or missing access before responders depend on them.

Scope the incident, then remove the underlying weakness

Investigate the credential’s full history, not only activity after the first alert. A compromised machine identity may evade detection for months, so the first unusual event a team notices may not be the attacker’s first action. Review where the identity had access, what it touched and whether anyone added credentials or other persistence along the way. Each exposed secret may need its own rotation.

Recovery should address how the credential was exposed and why it remained useful. If a static secret was stolen, assess whether the workload can use short-lived tokens through Workload Identity Federation, or request Just-In-Time credentials that expire automatically. Those changes take engineering work and funding, but they reduce the time a stolen credential can remain valuable.

Finally, run a tabletop exercise with the SOC and application owners. Choose the organization’s highest-privilege integration and walk through a stolen-token alert, containment and recovery. Track how long it takes to identify the revocation approver and determine the service impact. That rehearsal turns an abstract playbook into a set of decisions people have already practiced—and gives the organization a concrete list of gaps to close.

Source: Michael Jones · www.csoonline.com

Comments

Sign in to comment.
No comments yet. Be the first to comment.

Related Articles

Building incident playbooks for machine identity breaches