Agent skill
detecting-identity-sprawl
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/other/detecting-identity-sprawl
SKILL.md
name: detecting-identity-sprawl description: >- Identify and remediate identity sprawl — uncontrolled proliferation of accounts, service accounts, and entitlements that increases attack surface. domain: cybersecurity subdomain: identity-security tags:
- identity-sprawl
- account-proliferation
- shadow-identity
- attack-surface
- identity-hygiene version: "1.0" author: defconxt license: AGPL-3.0 metadata: mitre-attack: ["T1078"]
Detecting Identity Sprawl
Overview
Identity sprawl occurs when identities proliferate across systems without centralized visibility or governance. Orphaned accounts, unused service principals, and dormant entitlements create attack surface that adversaries exploit.
Prerequisites
| Requirement | Install |
|---|---|
| Multi-cloud visibility | Access to identity providers |
| CMDB / asset inventory | Known identity sources |
| IGA platform | Entitlement analytics |
| Python 3.10+ | For agent tooling |
Key Concepts
Sprawl Indicators
- Orphaned accounts — Active accounts for terminated employees
- Dormant accounts — No login activity for 90+ days
- Duplicate identities — Same person with multiple accounts
- Unused entitlements — Permissions never exercised
- Shadow identities — Accounts outside governance
- Service account sprawl — Ungoverned service principals
Detection Methods
| Method | Target | Signal |
|---|---|---|
| Last login analysis | Dormant accounts | No sign-in > 90 days |
| HR correlation | Orphaned accounts | Active account, no HR record |
| Entitlement analytics | Unused permissions | Access never exercised |
| Cross-system correlation | Duplicates | Same email across providers |
| App registration audit | Shadow identities | Unmanaged OAuth apps |
Remediation Approach
- Identify — Discover sprawl through automated analysis
- Classify — Categorize by sprawl type and risk
- Notify — Alert account owners or managers
- Grace period — Allow time for justification
- Disable — Deactivate unjustified accounts
- Delete — Remove after retention period
- Prevent — Enforce governance for new creation
Workflow
- Inventory all identity sources — catalog identity providers
- Correlate with HR data — identify orphaned accounts
- Analyze login activity — flag accounts with no sign-in for 90+ days
- Audit entitlements — identify permissions never exercised
- Detect shadow identities — find accounts outside governance
- Calculate sprawl metrics — quantify identity attack surface
- Remediate and govern — disable orphaned accounts, establish controls
Quick Reference
# Run the agent
node scripts/agent.js analyze --target <scope>
node scripts/agent.js report --target <scope>
Detection
title: Identity Sprawl Detection
id: 56b5d7c8-82d1-4cfa-93c5-6f3c52fe9ce5
status: experimental
description: Detects suspicious activity related to detecting identity sprawl techniques in identity security context
logsource:
category: authentication
product: windows
detection:
selection:
EventType: authentication
Status: failure
condition: selection
level: high
tags:
- attack.t1078
- attack.credential_access
falsepositives:
- Service account authentication during scheduled batch processing
Verification
| Check | Method |
|---|---|
| Sources inventoried | All identity providers cataloged |
| Orphans detected | Terminated employee accounts identified |
| Dormant flagged | Accounts with 90+ days inactivity listed |
| Sprawl quantified | Identity attack surface metrics calculated |
| Remediation started | Orphaned and dormant accounts disabled |
References
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?