performing-service-account-audit
Audit service accounts across enterprise infrastructure to identify orphaned, over-privileged, and non-compliant accounts. This skill covers discovery of service accounts in Active Directory, cloud pl
What this skill does
# Performing Service Account Audit ## Overview Audit service accounts across enterprise infrastructure to identify orphaned, over-privileged, and non-compliant accounts. This skill covers discovery of service accounts in Active Directory, cloud platforms, databases, and applications, assessing privilege levels, identifying missing owners, and enforcing lifecycle policies. ## When to Use - When conducting security assessments that involve performing service account audit - When following incident response procedures for related security events - When performing scheduled security testing or auditing activities - When validating security controls through hands-on testing ## Prerequisites - Familiarity with identity access management concepts and tools - Access to a test or lab environment for safe execution - Python 3.8+ with required dependencies installed - Appropriate authorization for any testing activities ## Objectives - Discover all service accounts across AD, cloud, databases, and applications - Identify orphaned accounts with no valid owner or associated application - Assess privilege levels and flag over-privileged service accounts - Check for non-rotating passwords and weak authentication - Map service account dependencies for safe remediation - Generate compliance reports for SOX, PCI DSS, and HIPAA audits ## Key Concepts ### Service Account Types 1. **AD Service Accounts**: Windows services, scheduled tasks, IIS app pools 2. **Managed Service Accounts (gMSA)**: AD-managed automatic password rotation 3. **Cloud IAM Service Accounts**: AWS IAM roles/users, Azure service principals, GCP service accounts 4. **Database Service Accounts**: Application connection accounts, replication accounts 5. **Application Service Accounts**: API keys, bot accounts, integration accounts ### Audit Dimensions - **Ownership**: Who is responsible for this account? - **Purpose**: What application/service uses this account? - **Privileges**: What permissions does this account have? - **Authentication**: How does this account authenticate (password, key, certificate)? - **Rotation**: When was the credential last changed? - **Activity**: When was this account last used? ## Workflow ### Step 1: Discovery - Active Directory 1. Query AD for all service accounts (filter by description, OU, naming convention) 2. Identify accounts with `ServicePrincipalName` set 3. List accounts in privileged groups (Domain Admins, Enterprise Admins) 4. Check for gMSA vs traditional service accounts 5. Identify accounts with `PasswordNeverExpires` flag ### Step 2: Discovery - Cloud Platforms - **AWS**: List IAM users with access keys, check last used date, identify unused roles - **Azure**: Enumerate service principals, app registrations, managed identities - **GCP**: List service accounts, check key age, identify unused permissions ### Step 3: Assessment - Flag accounts with admin/privileged group membership - Check password age against rotation policy (90 days max) - Identify accounts with no login activity in 90+ days - Verify account ownership against CMDB/asset inventory - Check for shared credentials (same password hash across accounts) ### Step 4: Risk Classification - **Critical**: Domain/cloud admin privileges, no password rotation - **High**: Access to sensitive data, no identified owner - **Medium**: Standard service permissions, password older than 90 days - **Low**: Read-only access, managed credentials (gMSA, managed identity) ### Step 5: Remediation - Disable orphaned accounts after validation with application teams - Convert traditional service accounts to gMSA where possible - Rotate credentials older than policy threshold - Reduce privileges to minimum required - Assign owners and document dependencies ## Security Controls | Control | NIST 800-53 | Description | |---------|-------------|-------------| | Account Management | AC-2 | Service account lifecycle | | Account Review | AC-2(3) | Periodic review of accounts | | Least Privilege | AC-6 | Minimum service account permissions | | Authenticator Management | IA-5 | Service credential rotation | | Audit Review | AU-6 | Review service account activity | ## Common Pitfalls - Disabling service accounts without verifying application dependencies first - Not discovering service accounts outside of Active Directory - Missing cloud service principals and managed identities - Not checking for interactive logon rights on service accounts - Failing to document dependencies before remediation ## Verification - [ ] Service accounts inventoried across all platforms - [ ] Each account has assigned owner - [ ] Privileged service accounts documented with justification - [ ] Password rotation compliance checked - [ ] Orphaned accounts flagged for remediation - [ ] gMSA migration candidates identified - [ ] Compliance report generated
Related in Cloud & DevOps
appbuilder-action-scaffolder
IncludedCreate, implement, deploy, and debug Adobe Runtime actions with consistent layout, validation, and error handling. Use this skill whenever the user needs to add actions to an App Builder project, understand action structure (params, response format, web/raw actions), configure actions in the manifest, use App Builder SDKs (State, Files, Events, database), deploy and invoke actions via CLI, debug action issues, or implement patterns such as webhook receivers, custom event providers, journaling consumers, large payload redirects, action sequence pipelines, and Asset Compute workers. Also trigger when users mention serverless functions in Adobe context, action logging, IMS authentication for actions, or cron-style scheduled actions.
orchestrating-datacloud
IncludedSalesforce Data Cloud product orchestrator for connect→prepare→harmonize→segment→act workflows. Use this skill when the user needs a multi-step Data Cloud pipeline, cross-phase troubleshooting, or data space and data kit management. TRIGGER when: user needs a multi-step Data Cloud pipeline, asks to set up or troubleshoot Data Cloud across phases, manages data spaces or data kits, or wants a cross-phase sf data360 workflow. DO NOT TRIGGER when: work is isolated to a single phase (use the matching phase-specific skill), the task is STDM/session tracing/parquet telemetry (use observing-agentforce), standard CRM SOQL (use querying-soql), or Apex implementation (use generating-apex).
github-project-automation
IncludedAutomate GitHub repository setup with CI/CD workflows, issue templates, Dependabot, and CodeQL security scanning. Includes 12 production-tested workflows and prevents 18 errors: YAML syntax, action pinning, and configuration. Use when: setting up GitHub Actions CI/CD, creating issue/PR templates, enabling Dependabot or CodeQL scanning, deploying to Cloudflare Workers, implementing matrix testing, or troubleshooting YAML indentation, action version pinning, secrets syntax, runner versions, or CodeQL configuration. Keywords: github actions, github workflow, ci/cd, issue templates, pull request templates, dependabot, codeql, security scanning, yaml syntax, github automation, repository setup, workflow templates, github actions matrix, secrets management, branch protection, codeowners, github projects, continuous integration, continuous deployment, workflow syntax error, action version pinning, runner version, github context, yaml indentation error
sf-datacloud
IncludedSalesforce Data Cloud product orchestrator for connect→prepare→harmonize→segment→act workflows. TRIGGER when: user needs a multi-step Data Cloud pipeline, asks to set up or troubleshoot Data Cloud across phases, manages data spaces or data kits, or wants a cross-phase `sf data360` workflow. DO NOT TRIGGER when: work is isolated to a single phase (use the matching sf-datacloud-* skill), the task is STDM/session tracing/parquet telemetry (use sf-ai-agentforce-observability), standard CRM SOQL (use sf-soql), or Apex implementation (use sf-apex).
fabric-cli
IncludedUse this skill for Fabric.so CLI workflows with the `fabric` terminal command: diagnose/install/login, search or browse a Fabric library, save notes/links/files, create folders, ask the Fabric AI assistant, manage tasks/workspaces, generate shell completion, check subscription usage, produce JSON output, and use Fabric as persistent agent memory. Do not use for Microsoft Fabric/Azure/Power BI `fab`, Daniel Miessler's Fabric framework, Python Fabric SSH, Fabric.js, or textile/fashion fabric.
lark
IncludedLark/Feishu CLI skills: lark-cli operations for docs, markdown, sheets, base, calendar, im, mail, task, okr, drive, wiki, slides, whiteboard, apps, approval, attendance, contact, vc, minutes, event. Use when the user needs to operate Lark/Feishu resources via lark-cli, send messages, manage documents, spreadsheets, calendars, tasks, OKRs, deploy web pages, or any Feishu/Lark workspace operations.