
OAuth Token Theft and Cloud Account Takeover
September 27, 2026
Machine Identity Security
September 27, 2026A threat actor spent eleven months inside a Fortune 500 financial institution’s network before anyone noticed. The initial foothold wasn’t a phishing email or a zero-day exploit—it was a service account with a five-year-old password, domain admin privileges, and zero monitoring. The account had been created for a legacy payroll integration that was decommissioned in 2021. Nobody deleted it. Nobody was watching it. It just sat there, fully credentialed, waiting to be discovered by someone who wasn’t supposed to find it.
Service accounts are the ghost fleet of enterprise identity. They authenticate silently, operate continuously, and accumulate privilege over time like sediment on a riverbed. Unlike human identities, they don’t trigger HR offboarding workflows. Unlike endpoints, they don’t show up in vulnerability scanners. They exist in a category that too many security programs treat as infrastructure rather than identity—and attackers have taken notice.
What Service Accounts Actually Are (And Why They’re Dangerous)
A service account is a non-human identity used by applications, scripts, scheduled tasks, middleware, and automated processes to authenticate against other systems and resources. They’re ubiquitous: a mid-sized enterprise with 2,000 employees typically has between 3x and 5x more service accounts than human accounts. In highly automated environments—DevOps pipelines, cloud-native architectures, and heavily scripted IT operations—that ratio can reach 10:1 or higher.
According to CyberArk’s 2025 Identity Security Threat Landscape Report, 62% of organizations admit they cannot fully account for all machine identities, including service accounts, across their environments. What you can’t see, you cannot protect.
The Privilege Creep Problem
Service accounts are most dangerous when they accumulate privileges beyond their original purpose. This happens for legitimate operational reasons: a developer needs a service account to access one additional database table, so they grant broader read access. An integration breaks in production at 2 AM, so an on-call engineer grants temporary domain admin privileges that never get revoked. Over months and years, a service account that was originally scoped to a single function ends up with lateral movement potential across the entire directory.
The 2023 Mandiant M-Trends Report documented that in 40% of intrusions involving Active Directory compromise, attackers leveraged at least one service account to escalate privileges or move laterally. Service accounts, by design, are trusted. That trust is what makes them invaluable to operations—and equally invaluable to adversaries who can obtain their credentials.
Static Credentials as a Structural Vulnerability
Human accounts benefit from forced password rotation policies, MFA enrollment, and behavioral monitoring tied to login patterns. Service accounts often receive none of this. Many service account passwords are set once during deployment and never rotated—not because administrators are negligent, but because rotating them risks breaking dependent applications that have the credential hardcoded. The operational fear of disruption creates a security paralysis that leaves credentials static for years.
Credential stuffing tools and credential marketplaces on dark web forums specifically filter for non-expiring, high-privilege credentials. A service account password that hasn’t changed since 2019 is precisely the kind of target these operations prioritize.
Discovery and Inventory: You Cannot Secure What You Haven’t Found
The first step in service account security is deceptively simple: know what you have. In practice, this is one of the hardest problems in enterprise identity governance. Service accounts proliferate through shadow IT, developer self-service, vendor deployments, and legacy integrations. They exist in Active Directory, Azure AD (Entra ID), LDAP directories, local Windows SAM databases, Linux /etc/passwd files, Kubernetes service accounts, AWS IAM service roles, and dozens of SaaS platform configurations.
A comprehensive service account inventory requires correlating data from multiple sources: directory services, endpoint configuration management databases (CMDBs), privileged access management (PAM) platforms, cloud IAM APIs, and network authentication logs. No single tool provides complete visibility without integration effort.
Building a Living Service Account Registry
An inventory is only as useful as its freshness. Static spreadsheets and quarterly audits are insufficient for environments where accounts can be created and abandoned within a single sprint cycle. Security teams should implement automated discovery that continuously interrogates:
- Active Directory and Entra ID for accounts with service principal names (SPNs), accounts with “Password never expires” flags, and accounts outside standard user OUs
- Cloud IAM platforms (AWS, Azure, GCP) for service principals, managed identities, and IAM users with programmatic access keys
- Kubernetes clusters for service account objects and their RBAC role bindings
- PAM vault exports to identify what’s being managed versus what’s been self-provisioned outside governance
- SIEM authentication logs to detect accounts that are authenticating but don’t appear in any managed inventory—a strong indicator of shadow or orphaned accounts
Each discovered account should be documented with its owning application, responsible team, last authentication timestamp, privilege scope, and password age. This registry becomes the foundation for every subsequent security control.
Access Control and Least Privilege Enforcement
Once service accounts are inventoried, the next challenge is right-sizing their privileges. Least privilege is a well-understood principle that is routinely violated in practice. The operational pressure to provision broadly and restrict later is real, but the security debt it creates compounds faster than most teams recognize.
Microsoft’s internal research, shared at Ignite 2024, found that service accounts in enterprise Active Directory environments hold, on average, 3.7x more permissions than they actively use. That gap between granted and used permissions represents attack surface that provides no operational value whatsoever.
Tiered Service Account Architecture
A practical framework for access control is to classify service accounts into privilege tiers aligned with Microsoft’s Active Directory tier model or NIST’s enterprise access management guidelines:
| Tier | Scope | Examples | Controls |
|---|---|---|---|
| Tier 0 | Control plane / domain-level | Backup agents with DC access, directory sync accounts | PAM vaulting, session recording, just-in-time access |
| Tier 1 | Server and application-level | Database service accounts, middleware auth accounts | PAM vaulting, automated rotation, access reviews |
| Tier 2 | Workstation and limited-scope | Local scheduled task accounts, single-app API keys | Secret manager integration, 90-day rotation policy |
Assigning accounts to tiers enables proportional control investment. A Tier 0 account warrants full PAM vault integration, session recording, and just-in-time access provisioning. A Tier 2 account may be adequately secured through a secrets manager with automated rotation and anomaly alerting.
Credential Management: Rotation, Vaulting, and Secrets Hygiene
The static credential problem is solvable, but it requires coordinated effort between security, identity, and application teams. The core solution is removing long-lived credentials wherever possible and automating rotation where they must persist.
In 2024, the Okta breach post-mortem revealed that compromised service account credentials—specifically a service account with access to Okta’s support case management system—were obtained from an employee’s personal Google account where they’d been saved. The credentials had not been rotated. This incident resulted in data exposure affecting hundreds of Okta customers and illustrated that credential management failures at the service account layer have cascading downstream consequences.
Managed Identities and Secretless Authentication
The most secure credential is one that doesn’t exist as a static string. Cloud-native and modern application architectures increasingly support managed identities—authentication mechanisms where the platform itself handles credential lifecycle without developers or operators ever seeing or storing a password.
- Azure Managed Identities: Allow Azure resources (VMs, App Services, Functions) to authenticate to other Azure services using platform-managed certificates that rotate automatically
- AWS IAM Roles for EC2/Lambda: Provide temporary, rotated credentials via the instance metadata service without static access keys
- Kubernetes Workload Identity: Binds Kubernetes service accounts to cloud IAM roles using projected service account tokens with short expiration windows
- HashiCorp Vault dynamic secrets: Generates short-lived, scoped credentials on demand for databases, cloud platforms, and PKI, eliminating the need for long-lived stored credentials entirely
For legacy systems that cannot support managed identities, PAM vaults with automated password rotation remain the standard. The rotation interval should be risk-proportional: Tier 0 accounts should rotate every 24–48 hours where application compatibility allows; Tier 1 accounts every 30–90 days; Tier 2 accounts at a minimum every 90 days.
Monitoring and Behavioral Detection for Non-Human Identities
Service accounts that are being abused rarely announce themselves through obvious indicators. Attackers using a compromised service account will often mirror the account’s legitimate authentication patterns—using the same source systems, targeting the same resources, operating during the same time windows. Catching this requires behavioral baselining, not just signature-based detection.
The Verizon 2025 Data Breach Investigations Report noted that median dwell time for intrusions involving non-human identity abuse was 127 days—nearly twice the overall median—because standard user behavior analytics tools are typically tuned for human account patterns and miss the subtler deviations in machine identity behavior.
Behavioral Indicators That Should Trigger Alerts
Security operations teams should implement specific detection logic for service account anomalies. The following behavioral patterns warrant immediate investigation:
- Authentication from a source IP or hostname outside the account’s established baseline (e.g., a database service account authenticating from a workstation)
- Interactive logon events (Event ID 4624, Logon Type 2 or 10) for accounts designated as non-interactive service accounts
- Kerberos TGT or service ticket requests for services the account has never previously accessed
- Sudden spike in authentication volume—often an indicator of automated credential stuffing or lateral movement scripting
- Authentication events outside established operational hours for accounts with predictable schedules (e.g., a nightly batch job account authenticating at 2 PM)
- Password change events for accounts enrolled in automated rotation that occur outside the rotation schedule
- SPN additions to an account—a common indicator of Kerberoasting setup by an attacker who has already compromised the account
These detections should be implemented at the SIEM level with tuned thresholds per account class, fed by Active Directory audit logs, Entra ID sign-in logs, and cloud IAM CloudTrail or equivalent audit streams.
Governance, Lifecycle Management, and Ownership Accountability
The deepest root cause of service account risk isn’t technical—it’s organizational. Service accounts are created by developers, operations teams, and vendors without formal identity governance processes. They’re not assigned human owners who persist through organizational changes. When the team that created them is reorganized or the application is deprecated, the accounts become orphaned with no one accountable for their fate.
According to a 2025 Gartner survey on identity governance, organizations with formal service account ownership policies experienced 58% fewer privilege-related security incidents compared to those without defined ownership frameworks. Governance isn’t bureaucracy for its own sake—it has a measurable security return.
Implementing a Service Account Lifecycle Policy
A functional service account lifecycle policy should address five stages:
- Provisioning: Every service account request requires a named human owner, an associated application or system, a documented business justification, a privilege scope aligned to least privilege, and an intended lifespan or review date
- Active management: Accounts are enrolled in PAM or secrets management on day one; credentials are rotated per tier policy; owner is notified of anomalies
- Periodic access reviews: Quarterly reviews (or automated continuous review for high-tier accounts) where owners certify continued need and verify privilege appropriateness
- Change management: Application changes that affect service account scope trigger a formal re-evaluation of required permissions
- Deprovisioning: When an application is retired or an integration is sunset, the associated service account is disabled and scheduled for deletion on a defined timeline (typically 30–90 days post-disable to allow rollback confirmation)
Connecting service account provisioning to your ITSM platform (ServiceNow, Jira Service Management) and your PAM solution creates an auditable chain of custody from creation to decommission—the kind of evidence your compliance team needs for SOX, PCI DSS, and ISO 27001 audits.
Key Takeaways
- Service accounts outnumber human accounts in most enterprises and represent a disproportionately high share of privilege-related breach vectors—yet they receive a fraction of the identity security investment directed at human users
- Complete, continuously-updated inventory is the non-negotiable foundation: you cannot govern, monitor, or remediate accounts you don’t know exist; automated discovery across AD, cloud IAM, and Kubernetes is essential
- Static, long-lived credentials are the single highest-impact risk factor: prioritize managed identities and dynamic secrets for new deployments, and implement PAM-driven automated rotation for legacy systems
- Behavioral detection must be specifically tuned for machine identities: standard UEBA tools calibrated for human behavior will miss the subtle deviations that indicate service account compromise; build dedicated detection logic for non-human identity patterns
- Governance without ownership is theater: every service account must have a named human owner who is accountable through provisioning, access reviews, and deprovisioning—embed this in your ITSM workflow rather than relying on periodic manual audits
Conclusion: Stop Treating Service Accounts as Infrastructure
The attackers who dwell longest and cause the most damage in enterprise environments are the ones who find a trusted, unmonitored identity and move slowly through it. Service accounts—permanently authenticated, overprivileged, and largely ungoverned—are the ideal vehicle for exactly that kind of intrusion. The financial institution in this post’s opening paragraph spent more on the breach investigation than it would have cost to run a mature service account governance program for a decade.
The path forward is not complicated, but it requires organizational will and cross-functional coordination. Start this week with three concrete actions: run an automated discovery query against your Active Directory for accounts with “Password never expires” and no last logon within 90 days; pull a report from your PAM platform of all service accounts without an assigned owner; and schedule a review with your application and DevOps leads to identify which workloads could migrate to managed identities within the next quarter. These three actions alone will surface more risk than most organizations’ last three penetration tests combined—and they cost nothing except attention.
Service account security is not a niche concern for identity specialists. It is a foundational enterprise risk management issue that belongs in your next CISO board briefing, your next architecture review, and your next incident response tabletop exercise. The identity attack surface has never been larger. The organizations that close this gap first are the ones that won’t be writing breach post-mortems about ghost accounts nobody was watching.
{
“
💡 Enjoyed this article?
Subscribe for more expert insights delivered to your inbox.
Follow us or subscribe below xe2x80x94 free, no spam.





