/cybersecurity-skills-zh:analyzing-active-directory-acl-abusefrom cybersecurity-skills-zh
Detects dangerous Active Directory ACL misconfigurations (GenericAll, WriteDACL, WriteOwner) using ldap3 to identify privilege escalation paths.
Ships in cybersecurity-skills-zh. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
活动目录(Active Directory)访问控制列表(ACL)通过包含访问控制条目(ACE)的自主访问控制列表(DACL)来定义 AD 对象的权限。配置错误的 ACE 可能赋予非特权用户对敏感对象(如 Domain Admins 组、域控制器或 GPO)的危险权限,包括 GenericAll(完全控制)、WriteDACL(修改权限)、WriteOwner(获取所有权)和 GenericWrite(修改属性)。
本技能使用 ldap3 Python 库连接到域控制器,查询包含 nTSecurityDescriptor 属性的对象,将二进制安全描述符解析为 SDDL(安全描述符定义语言)格式,并识别向非管理员主体授予危险权限的 ACE。这些配置错误正是 BloodHound 等工具发现的基于 ACL 的攻击路径的基础。
pip install ldap3)连接域控制器:使用 ldap3 通过 NTLM 或简单身份验证建立 LDAP 连接。在生产环境中使用 LDAPS(端口 636)进行加密连接。
查询目标对象:搜索目标 OU 或整个域,获取包括用户、组、计算机和 OU 在内的对象。请求 nTSecurityDescriptor、distinguishedName、objectClass 和 sAMAccountName 属性。
解析安全描述符:将二进制 nTSecurityDescriptor 转换为 SDDL 字符串表示。解析 DACL 中的每个 ACE,提取受托人 SID、访问掩码和 ACE 类型(允许/拒绝)。
将 SID 解析为主体:通过对域的 LDAP 查询,将安全标识符(SID)映射为可读的账户名。识别内置组的已知 SID。
检查危险权限:将每个 ACE 的访问掩码与危险权限位掩码进行比较:GenericAll(0x10000000)、WriteDACL(0x00040000)、WriteOwner(0x00080000)、GenericWrite(0x40000000),以及针对特定扩展权限的 WriteProperty。
过滤非管理员受托人:排除预期的管理员受托人(Domain Admins、Enterprise Admins、SYSTEM、Administrators),并标记非特权用户或组持有危险权限的 ACE。
映射攻击路径:对于每个发现,记录潜在的攻击链(例如,对用户的 GenericAll 允许重置密码,对组的 WriteDACL 允许将自身添加到组中)。
生成修复报告:输出包含所有危险 ACE、受影响对象、非管理员受托人及建议修复步骤的 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"
}
]
}
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
active-directory, acl-abuse, ldap, privilege-escalation, security-audit
npx claudepluginhub killvxk/cybersecurity-skills-zh --plugin cybersecurity-skills-zh735 skills in this plugin
/acquiring-disk-image-with-dd-and-dcfldd使用 dd 和 dcfldd 创建取证级逐位磁盘镜像,通过哈希验证保持证据完整性。/analyzing-android-malware-with-apktool使用 apktool 进行反编译、jadx 恢复 Java 源码、androguard 进行权限分析,对 Android APK 恶意软件样本执行静态分析,包括清单检查和可疑 API 调用检测。/analyzing-api-gateway-access-logs解析 API 网关访问日志(AWS API Gateway、Kong、Nginx),检测 BOLA/IDOR 攻击、速率限制绕过、凭据扫描和注入尝试。使用 pandas 进行请求模式的统计分析和异常检测。适用于调查 API 滥用或构建 API 专项威胁检测规则。
Other plugins' skills for the same job