Communitygithub.com

Active Directory ACL 오남용 분석

ldap3를 사용하여 Active Directory에서 위험한 ACL 오구성을 탐지합니다.

Active Directory ACL 오남용 분석란 무엇인가요?

이 스킬은 Active Directory의 Access Control List(ACL) 오남용을 분석하여 공격 경로로 이어질 수 있는 위험한 오구성을 식별합니다. ldap3 Python 라이브러리를 사용하여 도메인 컨트롤러에 연결하고, nTSecurityDescriptor 속성을 쿼리하며, 이진 보안 설명자를 SDDL 형식으로 파싱합니다. 그런 다음 각 ACE의 액세스 마스크를 검사하여 GenericAll(전체 제어), WriteDACL(권한 수정), WriteOwner(소유권 변경), GenericWrite(속성 수정)와 같은 위험한 권한을 부여하는 항목을 찾아냅니다. 관리 계정이 아닌 보안 주체가 민감한 개체(예: Domain Admins 그룹, 도메인 컨트롤러, GPO)에 대해 이러한 권한을 가지고 있는 경우 오구성으로 플래그 지정됩니다. 이 스킬은 BloodHound와 같은 도구가 사용하는 ACL 기반 공격 경로를 이해하고 탐지 규칙을 구축하며 위협 헌팅을 수행하는 데 유용하며, 최종적으로 위험한 ACE의 JSON 보고서와 권장 수정 단계를 생성합니다.

지원 대상~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/mukul975/Anthropic-Cybersecurity-Skills/tree/main/skills/analyzing-active-directory-acl-abuse

즐겨 사용하는 AI에게 물어보기

이 에이전트 스킬이 미리 로드된 새 채팅을 엽니다.

문서

Active Directory ACL 오남용 분석은(는) 무엇을 하나요?

개요

Active Directory Access Control List(ACL)는 DACL(Discretionary Access Control List)을 통해 AD 개체에 대한 권한을 정의하며, DACL은 ACE(Access Control Entry)로 구성됩니다. 잘못 구성된 ACE는 권한이 없는 사용자에게 Domain Admins 그룹, 도메인 컨트롤러, GPO와 같은 중요한 개체에 대해 GenericAll(전체 제어), WriteDACL(권한 수정), WriteOwner(소유권 변경), GenericWrite(속성 수정)와 같은 위험한 권한을 부여할 수 있습니다.

이 스킬은 ldap3 Python 라이브러리를 사용하여 도메인 컨트롤러에 연결하고, nTSecurityDescriptor 속성이 있는 개체를 쿼리하고, 이진 보안 설명자를 SDDL(Security Descriptor Definition Language) 형식으로 파싱하여, 관리자가 아닌 보안 주체에게 위험한 권한을 부여하는 ACE를 식별합니다. 이러한 오구성은 BloodHound와 같은 도구가 발견하는 ACL 기반 공격 경로의 기초가 됩니다.

사용 시기

  • Active Directory ACL 오남용 분석이 필요한 보안 사고를 조사할 때
  • 이 도메인에 대한 탐지 규칙 또는 위협 헌팅 쿼리를 구축할 때
  • SOC 분석가가 이 분석 유형에 대한 구조화된 절차가 필요할 때
  • 관련 공격 기술에 대한 보안 모니터링 범위를 검증할 때

사전 요구 사항

  • Python 3.9 이상 및 ldap3 라이브러리 (pip install ldap3)
  • AD 개체에 대한 읽기 권한이 있는 도메인 사용자 자격 증명
  • 포트 389(LDAP) 또는 636(LDAPS)에서 도메인 컨트롤러에 대한 네트워크 연결
  • Active Directory 보안 모델 및 SDDL 형식에 대한 이해

단계

  1. 도메인 컨트롤러에 연결: ldap3를 사용하여 NTLM 또는 단순 인증으로 LDAP 연결을 설정합니다. 프로덕션 환경에서는 암호화된 연결을 위해 LDAPS(포트 636)를 사용하세요.

  2. 대상 개체 쿼리: 대상 OU 또는 전체 도메인에서 사용자, 그룹, 컴퓨터, OU를 포함한 개체를 검색합니다. nTSecurityDescriptor, distinguishedName, objectClass, sAMAccountName 속성을 요청합니다.

  3. 보안 설명자 파싱: 이진 nTSecurityDescriptor를 SDDL 문자열 표현으로 변환합니다. DACL의 각 ACE를 파싱하여 트러스티 SID, 액세스 마스크, ACE 유형(허용/거부)을 추출합니다.

  4. SID를 보안 주체로 해석: 보안 식별자(SID)를 LDAP 조회를 통해 사람이 읽을 수 있는 계정 이름으로 매핑합니다. 기본 제공 그룹의 잘 알려진 SID를 식별합니다.

  5. 위험한 권한 확인: 각 ACE의 액세스 마스크를 위험한 권한 비트마스크(GenericAll: 0x10000000, WriteDACL: 0x00040000, WriteOwner: 0x00080000, GenericWrite: 0x40000000, 특정 확장 권한에 대한 WriteProperty)와 비교합니다.

  6. 관리자가 아닌 트러스티 필터링: 예상되는 관리 트러스티(Domain Admins, Enterprise Admins, SYSTEM, Administrators)를 제외하고, 권한이 없는 사용자나 그룹이 위험한 권한을 보유한 ACE에 플래그를 지정합니다.

  7. 공격 경로 매핑: 각 발견 사항에 대해 잠재적인 공격 체인을 문서화합니다(예: 사용자에 대한 GenericAll은 암호 재설정 허용, 그룹에 대한 WriteDACL은 자신을 그룹에 추가할 수 있음).

  8. 수정 보고서 생성: 모든 위험한 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": "Domain Admins 그룹에 대한 GenericAll은 임의 멤버 추가를 허용합니다",
      "remediation": "Domain Admins에 대한 helpdesk-team의 GenericAll ACE 제거"
    }
  ]
}

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

abusing-dpapi-for-credential-access

Extract and decrypt Windows DPAPI-protected secrets (Credential Manager, browser logins/cookies, Wi-Fi credentials, KeePass keys) online or offline using SharpDPAPI, SharpChrome, Mimikatz, or Impacket

abusing-shadow-credentials-for-privesc

Take over Active Directory accounts by writing attacker-controlled public keys to msDS-KeyCredentialLink (Shadow Credentials) with pyWhisker, Whisker, or Certipy, then authenticate via PKINIT to recover the target

achieving-cmmc-level-2-compliance

>-

acquiring-disk-image-with-dd-and-dcfldd

Create forensically sound bit-for-bit disk images with dd or dcfldd on a Linux forensic workstation, preserving evidence integrity through hash verification (MD5/SHA) during acquisition. Use when imaging a suspect drive, USB device, or memory card for investigation, preserving volatile disk evidence during incident response, or producing a verified copy for legal or law-enforcement proceedings before any destructive analysis.

analyzing-android-malware-with-apktool

Perform static analysis of Android APK malware using apktool for resource decompilation, jadx for Java source recovery, and androguard for manifest inspection, dangerous permission-combination detection, and identification of obfuscated code, dynamic code loading, and reflection-based API calls. Use to statically triage a suspicious APK without executing it or to build mobile malware detection rules.

analyzing-api-gateway-access-logs

Parses API Gateway access logs (AWS API Gateway, Kong, Nginx) to detect

analyzing-apt-group-with-mitre-navigator

Query ATT&CK data with attackcti, mitreattack-python, and stix2, then build MITRE ATT&CK Navigator layers and multi-layer heatmap overlays mapping one or more APT groups

analyzing-azure-activity-logs-for-threats

Queries Azure Monitor activity logs and sign-in logs via azure-monitor-query

analyzing-bootkit-and-rootkit-samples

Analyzes bootkit and advanced rootkit malware infecting the Master

analyzing-browser-forensics-with-hindsight

Parse Chromium-based browser databases with Hindsight to extract and correlate browsing history, downloads, cookies, cached content, autofill data, saved passwords, and extensions from Chrome, Edge, Brave, Opera, and Vivaldi into a unified timeline (XLSX, JSON, or SQLite output). Use during incident response, insider-threat investigations, or criminal cases when you need to reconstruct a user

analyzing-campaign-attribution-evidence

Systematically evaluate cyber-campaign evidence to attribute an operation to a threat actor, using the Diamond Model and Analysis of Competing Hypotheses (ACH) to weigh infrastructure overlaps, TTP consistency, malware code similarity, and timing/language artifacts into confidence-weighted attribution assessments. Use when an incident investigation needs a defensible attribution confidence level.

analyzing-certificate-transparency-for-phishing

Monitor Certificate Transparency logs using crt.sh and Certstream to

analyzing-cloud-storage-access-patterns

Detect abnormal access in AWS S3, GCS, and Azure Blob Storage by analyzing CloudTrail Data Events, GCS audit logs, and Azure Storage Analytics for after-hours bulk downloads, new-IP access, and API-call spikes (e.g. GetObject) via statistical baselines and time-series anomaly detection. Use when investigating suspected cloud data exfiltration or building related detection rules.

analyzing-cobalt-strike-beacon-configuration

Extract and analyze Cobalt Strike beacon configuration from PE files

analyzing-cobaltstrike-malleable-c2-profiles

Parse and analyze Cobalt Strike Malleable C2 profiles with dissect.cobaltstrike (profiles and beacon-payload configs) and pyMalleableC2 (AST parsing) to extract HTTP/DNS transforms, URIs, headers, sleep/jitter, and injection behavior, then generate network detection signatures. Use when reverse-engineering a captured malleable profile or building detections against Cobalt Strike Beacon traffic.

analyzing-command-and-control-communication

Analyzes malware C2 communication over HTTP, HTTPS, DNS, and custom

analyzing-cyber-kill-chain

Analyzes intrusion activity against the Lockheed Martin Cyber Kill Chain

analyzing-disk-image-with-autopsy

Perform comprehensive forensic analysis of raw (dd), E01, or AFF disk images with Autopsy and The Sleuth Kit, recovering deleted files, examining metadata and embedded artifacts, keyword searching, and building investigation timelines with visual reports. Use for structured analysis of a forensic disk image or when stakeholders need visual reports from evidence.

analyzing-dns-logs-for-exfiltration

Analyzes DNS query logs to detect data exfiltration via DNS tunneling,

analyzing-docker-container-forensics

Investigate compromised Docker containers by analyzing images, layers,

관련 스킬