跳到正文
Skillpedia
安全35k · #7595

analyzing-active-directory-acl-abuse

它能做什么

这个工具用于检查你的 Active Directory 系统中存在的危险权限。它会查找错误配置,这些配置可能让没有高级权限的用户控制或修改重要信息。

适用场景

  • ✓在调查安全问题时使用。
  • ✓在编写攻击检测规则时使用。
  • ✓用于检查安全监控是否正常运行。

技能链接

https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/analyzing-active-directory-acl-abuse/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/analyzing-active-directory-acl-abuse/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“检查我的 Active Directory 中是否存在危险权限。”

每周 5 个新技能,1 分钟读完。

工作原理

这个工具会连接到你的 Active Directory 系统,分析每个对象的权限。它会查找被不当授予给普通用户的权限,例如“完全控制”或“修改权限”。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

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

{
  "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"
    }
  ]
}
常见问题

什么是 Active Directory?

它是企业用来管理网络中计算机、用户和权限的一套系统。

什么是 ACL?

ACL(访问控制列表)就像一组规则,定义了谁可以在系统上做什么操作。

什么是危险权限?

这些权限例如 `GenericAll`(完全控制)、`WriteDACL`(修改权限)和 `WriteOwner`(取得所有权),一旦被滥用就可能造成危害。

详情

作者的原始描述

Detect dangerous ACL misconfigurations in Active Directory using ldap3 to identify GenericAll, WriteDACL, and WriteOwner abuse paths

repo: mukul975/Anthropic-Cybersecurity-Skills

热度

GitHub 星标
35k
排名
#7595
许可证
Apache-2.0
更新时间
2026/8/31

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能