Agent skill

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

Stars 0
Forks 0

Install this agent skill to your Project

npx add-skill https://github.com/autohandai/community-skills/tree/main/performing-service-account-audit

SKILL.md

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.

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?

Implementation Steps

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

Expand your agent's capabilities with these related and highly-rated skills.

autohandai/community-skills

mapping-mitre-attack-techniques

Maps observed adversary behaviors, security alerts, and detection rules to MITRE ATT&CK techniques and sub-techniques to quantify detection coverage and guide control prioritization. Use when building an ATT&CK-based coverage heatmap, tagging SIEM alerts with technique IDs, aligning security controls to adversary playbooks, or reporting threat exposure to executives. Activates for requests involving ATT&CK Navigator, Sigma rules, MITRE D3FEND, or coverage gap analysis.

0 0
Explore
autohandai/community-skills

hunting-for-spearphishing-indicators

Hunt for spearphishing campaign indicators across email logs, endpoint telemetry, and network data to detect targeted email attacks.

0 0
Explore
autohandai/community-skills

analyzing-malicious-url-with-urlscan

URLScan.io is a free service for scanning and analyzing suspicious URLs. It captures screenshots, DOM content, HTTP transactions, JavaScript behavior, and network connections of web pages in an isolat

0 0
Explore
autohandai/community-skills

implementing-zero-standing-privilege-with-cyberark

Deploy CyberArk Secure Cloud Access to eliminate standing privileges in hybrid and multi-cloud environments using just-in-time access with time, entitlement, and approval controls.

0 0
Explore
autohandai/community-skills

implementing-pam-for-database-access

Deploy privileged access management for database systems including Oracle, SQL Server, PostgreSQL, and MySQL. Covers session proxy configuration, credential vaulting, query auditing, dynamic credentia

0 0
Explore
autohandai/community-skills

detecting-t1003-credential-dumping-with-edr

Detect OS credential dumping techniques targeting LSASS memory, SAM database, NTDS.dit, and cached credentials using EDR telemetry, Sysmon process access monitoring, and Windows security event correlation.

0 0
Explore

Didn't find tool you were looking for?

Be as detailed as possible for better results