0%
BACK TO OVERVIEW

The Man Who Was Never There: Why Orphaned Access is the Most Dangerous Gap in Your Security Architecture

The Man Who Was Never There: Why Orphaned Access is the Most Dangerous Gap in Your Security Architecture

One Badge, Two Years Inactive—and it Still Works

The Red Team doesn't enter the building through the main entrance. They enter using the badge of Thomas K.—an employee who left the company 26 months ago. The badge was never deactivated. The AD account was never locked. The VPN credentials were never revoked. The mailbox is still running. And the access authorization to the server room, which Thomas received back then for a project, still exists—quiet, unnoticed, and fully valid.

This isn't a manufactured scenario. It's a summarized pattern from dozens of real engagements. In almost every company we audit, we find active credentials from individuals who have long ceased to be part of the organization: former employees, completed internships, terminated contractor agreements, finalized projects. The accounts live on—because in most companies, offboarding is not a process, but a hope.

Orphaned access points are the most frequently overlooked vulnerability in enterprise security architecture. They require no exploit, no social engineering expertise, and no technical brilliance. They only require the knowledge that they exist—and the credentials to match.

26 Mo.
Longest active badge life after departure (own audits)
~30%
Of all accounts in typical AD environments are orphaned (Industry avg)
0
Alarms when using inactive accounts without monitoring
7
Systems on avg with orphaned access per audit engagement

Why Offboarding Systematically Fails

Offboarding sounds like an HR topic. In practice, it's an interface problem—and interface problems always fail when no clear ownership is defined. When an employee leaves the company, between five and fifteen different systems are affected, depending on company size. Each has a different owner, a different interface, and a different process rhythm.

Responsibility
HR / People Ops
  • Termination contract
  • Payroll settlement
  • Employment references
  • Deactivate HRIS entry
  • Key return (physical)
Nobody
Badge Deactivation
AD Account Locking
Cloud SSO Revocation
VPN Credentials
SaaS Access
Shared Secrets
API Keys
Git Access
Responsibility
IT / Security
  • Collect laptop
  • Forward email
  • Remote wipe device
  • – if a ticket comes –
  • – if someone asks –

The leak lies in the middle. HR completes the labor law process and returns the device. IT waits for a ticket. Who creates the ticket? Often, nobody. Or someone—but too late, incompletely, without knowing all the systems. Especially dangerous: Systems that no one actively has in mind. The VPN access set up for a specific project. The AWS IAM user with admin rights that the developer created themselves. The badge access to the server room that was expanded for a temporary task and then simply left active.

The most dangerous orphaned account isn't the one that was forgotten. It's the one that only one person knew about—and they just left the company.

The Full Attack Surface: Where Orphaned Access Lurks

Orphaned access is not just a badge problem. It is a systemic issue that runs through all layers of corporate infrastructure—from the front door to the production database. Every level has its own risks, its own management systems, and its own blind spots.

Physical Badge / ACS
Access Control
An active badge allows physical entry to all assigned areas—server rooms, data centers, archives. No network connection required, no credentials. Card to the reader, door opens. In offline systems, deactivation only takes effect at the next sync—which can take hours or days.
Critical
Active Directory / Entra ID
Identity Provider
The AD account is the master key. As long as it's active, all dependent systems work: Windows login, file shares, internal web apps, Exchange/O365, printers, VPN with AD auth. An unlocked AD account bypasses all downstream access controls. Especially dangerous: privileged accounts (Domain Admin, Server Admin) that are not immediately locked upon termination.
Critical
Cloud SSO / IdP
Okta · Azure AD · Auth0
If SSO is not provisioned via AD or the IdP account exists independently, cloud access remains active even after AD locking. Every SaaS application authenticating directly against the IdP remains accessible: Salesforce, Jira, GitHub, AWS Console, GCP, Slack—the list is long and company-specific.
Critical
VPN Credentials
Remote Access
VPN access with locally stored certificates or pre-shared keys functions independently of the AD account. Particularly critical with service providers who have been granted permanent VPN access: maintenance firms, external developers, consultants. The end of a contract doesn't automatically mean the end of access.
High
API Keys & Service Accounts
Technical Identities
API keys in AWS IAM, GitHub, GitLab, CI/CD pipelines, or internal systems are often issued to a person but not tied to an IdP account. They are almost never captured during offboarding because no one has a complete overview of self-created technical credentials. Long-lived API keys without rotation are a permanent gateway.
High
SaaS without SSO Integration
Shadow IT / Direct Access
Tools that employees set up independently that don't run through SSO: Trello, Notion, Figma, personal GitHub orgs, external monitoring dashboards. These accounts are completely invisible to IT—and live on indefinitely after departure as long as the email address is valid.
High
Email Mailbox
Communication
Active mailboxes allow for password resets via "forgot password" flows in any system using that email as a recovery address. An active mailbox is a skeleton key for all associated accounts—regardless of whether the original access was blocked.
Medium

The Full Attack Chain: From Phantom Badge to Production System

In real-world engagements, orphaned access rarely leads to a single, isolated incident. It's the starting point of a chain—because every active identity opens further doors.

Step 01
Badge Access
Physical entry into the building or server room. No alarms, no log anomalies—after all, the badge is "valid."
Step 02
AD Login
Workstation login with known password or default credential. Access to file shares, internal systems, email.
Step 03
Password Reset
Using the active mailbox to reset access to SaaS tools that IT didn't have on their radar.
Step 04
Lateral Movement
API keys and service accounts of the former employee provide access to production systems, cloud environments, and repositories.
// AD Audit: Finding Orphaned Accounts – PowerShell Example
# Accounts not used for >90 days
$cutoff = (Get-Date).AddDays(-90)
Get-ADUser -Filter * -Properties LastLogonDate, Enabled |
  Where-Object { $_.Enabled -eq $true -and $_.LastLogonDate -lt $cutoff } |
  Select-Object Name, SamAccountName, LastLogonDate |
  Sort-Object LastLogonDate
→ Every hit is a potential phantom account

Why Orphaned Access is a Compliance Problem—Not Just a Security Issue

Identity Lifecycle Management is not a "best practice." For a growing number of companies, it is a legally binding obligation. Relevant frameworks address the topic explicitly—with different focuses, but a common consequence: failing to manage orphaned accounts is a violation of verifiable requirements.

Framework Requirement Relevance for Offboarding Status
NIS2 Access control and identity management as explicit security measures (Art. 21) Orphaned accounts are a direct violation of the minimum security level Mandatory
ISO 27001 A.9.2.6: Removal of access rights upon termination of employment Explicit control requirement—auditable and certification-relevant Mandatory
GDPR Restrict data access to the necessary minimum (Data minimization, Art. 5) Active access of former personnel to personal data is a GDPR violation Mandatory
SOC 2 CC6.2: Logical access provisioning and deprovisioning Missing deprovisioning evidence leads to audit findings and endangers certification Audit-Relevant
CER Directive Physical and logical access control for critical entities Orphaned physical badges in critical infrastructure are a direct compliance violation Mandatory

Identity Lifecycle Management: What a Functional Offboarding Process Must Deliver

The goal isn't just a better "Offboarding Checklist" document. The goal is an automated, cross-system deprovisioning process that requires no manual intervention—and verifiably documents what was revoked and when.

  • HR System as Single Source of Truth: An employee's departure must be recorded in the HRIS and automatically trigger a deprovisioning workflow. No ticket, no manual step—the process starts itself. Tools like Workday, BambooHR, or SAP SuccessFactors offer such integrations.
  • Identity Provider as the Central Lever: All systems must be provisioned via a single IdP (Entra ID, Okta, JumpCloud). A single deactivation in the IdP revokes all downstream access simultaneously—AD, SSO apps, VPN with AD auth. What doesn't run through SSO is a risk.
  • ACS Integration into the Offboarding Workflow: Badge deactivation must not depend on a separate IT ticket. The Access Control System should be integrated into the offboarding workflow directly or via the IdP. For offline locks: define and monitor maximum sync intervals.
  • Maintain API Key and Service Account Inventory: Every technical credential must be assigned to an owner—and that owner must be addressed in the offboarding process. Tools like HashiCorp Vault, AWS Secrets Manager, or GitHub Enterprise enable owner-based credential management.
  • SaaS Discovery for Shadow IT: Tools like Nudge Security, Grip Security, or BetterCloud scan OAuth grants and SaaS access, making visible which services an employee had access to. Without this overview, full offboarding is impossible.
  • Regular Access Reviews: Offboarding doesn't close gaps created by temporary access expansions. Quarterly access reviews of all privileged accounts—AD, Cloud IAM, ACS—uncover accounts that were never officially deactivated. The PowerShell query above is a good starting point.
  • Monitoring for Inactive Account Usage: Any authentication with an account that hasn't been used for more than 30 days should trigger an alert. In SIEM systems (Splunk, Microsoft Sentinel, Elastic), this is a simple correlation rule—and one of the most effective.
  • Physical Pentest with Phantom Badge Test: A structured audit that specifically attempts to gain access using the credentials of former employees provides empirical evidence of the actual state of the offboarding process. We perform this test as part of every Physical Security engagement.

A complete offboarding process revokes all access—physical and digital—within a maximum of 24 hours after contract end and verifiably documents every revocation. Anything longer or manual is a gap.

Conclusion: The Most Dangerous Attacker is the One You Fired Long Ago

Thomas K. left the company 26 months ago. He has no ill intentions; he isn't the attacker. But his badge, his AD account, and his API key still exist—and an attacker who knows or finds these credentials is Thomas K. to all affected systems.

Orphaned access points are not a side issue or a niche problem. They are the most likely source of successful access in almost every company that doesn't operate an automated Identity Lifecycle process. They are quiet, persistent, and entirely avoidable.

The question isn't "Do we have orphaned accounts?" The question is "How many—and who knows it besides us?"

How Many Active Access Points Does Your Company Still Have for People Long Gone?

We test phantom badges, orphaned AD accounts, and forgotten API keys—providing a complete breakdown of your Identity Lifecycle gaps.

Request Identity & Access Audit →
Tags // #PhysicalPentest #RedTeam #IdentityLifecycle #Offboarding #ActiveDirectory #NIS2 #KRITIS

© AccessGranted X GmbH