Skip to main content
skill CX Codex

analyzing-active-directory-acl-abuse: Claude Code skill

Reads Domain Controller DACLs over LDAP with ldap3, parses them into SDDL and reports ACEs where non-admin accounts hold GenericAll, WriteDACL or WriteOwner.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add mukul975/Anthropic-Cybersecurity-Skills --skill analyzing-active-directory-acl-abuse -a claude-code
Open on GitHub

What analyzing-active-directory-acl-abuse does

The skill opens an LDAP connection to a Domain Controller and pulls the nTSecurityDescriptor attribute off directory objects: users, groups, computers, OUs. It converts that binary descriptor into its SDDL string, walks the ACEs in the DACL and compares each access mask against the dangerous ones — GenericAll (0x10000000), WriteDACL (0x00040000), WriteOwner (0x00080000), GenericWrite (0x40000000). Trustee SIDs get resolved to account names so the output lists real principals instead of identifiers.

Expected admins are filtered out: Domain Admins, Enterprise Admins, SYSTEM, Administrators. What remains is the interesting part, where a low-privileged account holds a right it should not have. Each finding comes with the attack chain it opens, for instance password reset via GenericAll on a user or self-addition to a group via WriteDACL. The result is a JSON report with affected objects, trustees, attack paths and remediation advice.

Bring Python 3.9 with ldap3 installed, a domain account allowed to read AD objects, and network access to port 389 or 636. LDAPS is what the skill recommends for production. You also need a working grasp of the AD security model and SDDL, because the report is dense; plan to read it with the person who owns the domain. Nothing here writes back to the directory.

What it helps with

  • find ACEs where a non-admin group holds GenericAll on a sensitive object
  • audit a target OU for WriteDACL and WriteOwner held by regular accounts
  • parse nTSecurityDescriptor into SDDL without decoding the binary by hand
  • resolve SIDs from a DACL to domain user and group names
  • produce a JSON report of findings with attack paths and fixes

Example prompts for the agent

  • Scan the DACLs in corp.example.com and list ACEs where a non-admin trustee has GenericAll.
  • Check the target OU for WriteDACL and WriteOwner on low-privileged accounts.
  • Map the attack paths from those ACEs and tell me which permissions to fix first.

How to install analyzing-active-directory-acl-abuse

1Skills CLI (Vercel)

npx skills add mukul975/Anthropic-Cybersecurity-Skills --skill analyzing-active-directory-acl-abuse -a claude-code

2Manually: put the files in place

~/.claude/skills/analyzing-active-directory-acl-abuse/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/analyzing-active-directory-acl-abuse/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about analyzing-active-directory-acl-abuse

How do I install analyzing-active-directory-acl-abuse in Claude Code?

Run npx skills add mukul975/Anthropic-Cybersecurity-Skills --skill analyzing-active-directory-acl-abuse -a claude-code. The skill lands at ~/.claude/skills/analyzing-active-directory-acl-abuse/SKILL.md.

What does analyzing-active-directory-acl-abuse do?

It reads Active Directory DACLs and flags ACEs that give non-privileged principals rights like GenericAll or WriteDACL, then describes the attack path each one enables. Output is a JSON report.

What does the skill need to run?

Python 3.9 or later with the ldap3 library, domain credentials that can read AD objects, and connectivity to the Domain Controller on port 389 or 636.

Source text

SKILL.md · Apache-2.0
---
name: analyzing-active-directory-acl-abuse
description: Detect dangerous ACL misconfigurations in Active Directory using ldap3
  to identify GenericAll, WriteDACL, and WriteOwner abuse paths
domain: cybersecurity
subdomain: identity-security
tags:
- active-directory
- acl-abuse
- ldap
- privilege-escalation
version: '1.0'
author: mahipal
license: Apache-2.0
nist_csf:
- PR.AA-01
- PR.AA-05
- PR.AA-06
mitre_attack:
- T1098
- T1098.007
- T1484.001
- T1222.001
- T1078.002
---


# Analyzing Active Directory ACL Abuse

## Overview

Active Directory Access Control Lists (ACLs) define permissions on AD objects through Discretionary Access Control Lists (DACLs) containing Access Control Entries (ACEs). Misconfigured ACEs can grant non-privileged users dangerous permissions such as GenericAll (full control), WriteDACL (modify permissions), WriteOwner (take ownership), and GenericWrite (modify attributes) on sensitive objects like Domain Admins groups, domain controllers, or GPOs.

This skill uses the ldap3 Python library to connect to a Domain Controller, query objects with their nTSecurityDescriptor attribute, parse the binary security descriptor into SDDL (Security Descriptor Definition Language) format, and identify ACEs that grant dangerous permissions to non-administrative principals. These misconfigurations are the basis for ACL-based attack paths discovered by tools like BloodHound.


## When to Use

- When investigating security incidents that require analyzing active directory acl abuse
- When building detection rules or threat hunting queries for this domain
- When SOC analysts need structured procedures for this analysis type
- When validating security monitoring coverage for related attack techniques

## Prerequisites

- Python 3.9 or later with ldap3 library (`pip install ldap3`)
- Domain user credentials with read access to AD objects
- Network connectivity to Domain Controller on port 389 (LDAP) or 636 (LDAPS)
- Understanding of Active Directory security model and SDDL format

## Steps

1. **Connect to Domain Controller**: Establish an LDAP connection using ldap3 with NTLM or simple authentication. Use LDAPS (port 636) for encrypted connections in production.

2. **Query target objects**: Search the target OU or entire domain for objects including users, groups, computers, and OUs. Request the `nTSecurityDescriptor`, `distinguishedName`, `objectClass`, and `sAMAccountName` attributes.

3. **Parse security descriptors**: Convert the binary nTSecurityDescriptor into its SDDL string representation. Parse each ACE in the DACL to extract the trustee SID, access mask, and ACE type (allow/deny).

4. **Resolve SIDs to principals**: Map security identifiers (SIDs) to human-readable account names using LDAP lookups against the domain. Identify well-known SIDs for built-in groups.

5. **Check for dangerous permissions**: Compare each ACE's access mask against dangerous permission bitmasks: GenericAll (0x10000000), WriteDACL (0x00040000), WriteOwner (0x00080000), GenericWrite (0x40000000), and WriteProperty for specific extended rights.

6. **Filter non-admin trustees**: Exclude expected administrative trustees (Domain Admins, Enterprise Admins, SYSTEM, Administrators) and flag ACEs where non-privileged users or groups hold dangerous permissions.

7. **Map attack paths**: For each finding, document the potential attack chain (e.g., GenericAll on user allows password reset, WriteDACL on group allows adding self to group).

8. **Generate remediation report**: Output a JSON report with all dangerous ACEs, affected objects, non-admin trustees, and recommended remediation steps.

## Expected Output

```json
{
  "domain": "corp.example.com",
  "objects_scanned": 1247,
  "dangerous_aces_found": 8,
  "findings": [
    {
      "severity": "critical",
      "target_object": "CN=Domain Admins,CN=Users,DC=corp,DC=example,DC=com",
      "target_type": "group",
      "trustee": "CORP\\helpdesk-team",
      "permission": "GenericAll",
      "access_mask": "0x10000000",
      "ace_type": "ACCESS_ALLOWED",
      "attack_path": "GenericAll on Domain Admins group allows adding arbitrary members",
      "remediation": "Remove GenericAll ACE for helpdesk-team on Domain Admins"
    }
  ]
}
```

© mahipal · Apache-2.0 · mukul975/Anthropic-Cybersecurity-Skills

Similar skills

All skills for Security →

From the same set90

analyzing-cyber-kill-chain Maps intrusion activity to the Lockheed Martin Cyber Kill Chain and exposes defensive gaps. Use it for incident review and prevention-focused control planning. CX Codex +1 606installs analyzing-browser-forensics-with-hindsight Parses Chromium browser databases with Hindsight to reconstruct user web activity. Gathers history, cookies, and downloads into a unified timeline for forensic investigation. CX Codex +1 592installs analyzing-cloud-storage-access-patterns A Claude Code skill that reads CloudTrail Data Events, GCS audit logs and Azure Storage Analytics to flag after-hours bulk downloads, fresh source IPs and GetObject spikes. CX Codex +1 562installs analyzing-certificate-transparency-for-phishing Monitors Certificate Transparency logs to spot phishing lookalikes and certificate issuance affecting an organisation’s domains. CX Codex +1 547installs testing-api-for-broken-object-level-authorization Tests REST and GraphQL APIs for BOLA and IDOR flaws by swapping object identifiers across requests. Helps detect broken access controls between different user accounts. CX Codex +1 541installs testing-jwt-token-security A skill that walks an agent through JWT weaknesses: algorithm confusion, weak HMAC secrets, authorization bypass. Built for API and SSO pentests. CX Codex +1 536installs analyzing-apt-group-with-mitre-navigator Queries ATT&CK data for APT groups and builds MITRE ATT&CK Navigator layers to compare TTP coverage and spot detection gaps. CX Codex +1 531installs analyzing-network-traffic-with-wireshark A skill that walks your agent through packet capture and analysis with Wireshark and tshark: C2 traffic, leaks, protocol faults. CX Codex +1 533installs

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor