
gpoParser is a tool designed to extract and analyze configurations applied through Group Policy Objects (GPOs) in an Active Directory environment.
gpoParser는 Active Directory 환경에서 GPO(Group Policy Objects)를 통해 적용된 구성을 추출하고 분석하도록 설계된 도구입니다. 이러한 설정을 열거하는 작업은 지루하고 시간이 많이 걸릴 수 있으므로, 이 도구는 적용된 정책에 대한 더 명확한 이해를 제공하고 측면 이동 또는 권한 상승으로 이어질 수 있는 위험한 구성을 식별하는 데 도움을 줍니다. 이 도구는 leHack 2025와 DEFCON 33에서 발표되었습니다.
참고: gssapi 패키지에는 libkrb5-dev 의존성이 필요합니다. sudo apt install libkrb5-dev를 통해 설치하세요(또는 해당 패키지 관리자를 이용하세요).
pipx install git+https://github.com/synacktiv/gpoParser
$ gpoParser -h
usage: gpoParser [-h] {local,remote,display,query,enrich} ...
GPO Analysis Tool
positional arguments:
{local,remote,display,query,enrich}
Choose mode
local Parse GPOs locally
remote Parse GPOs via remote LDAP/SYSVOL
display Display parsed GPO contents
query Query GPO parser results in order to display affected computers
enrich Enrich BloodHound with new edges
options:
-h, --help show this help message and exit
온라인: LDAP 디렉터리에 연결하여 GPO 관련 정보와 해당 속성(플래그, gPLink, gPOptions 등)을 수집합니다. 또한 SYSVOL 공유에 연결하여 GPO 구성 파일을 수집합니다.
$ gpoParser remote -h
usage: gpoParser remote [-h] [-s SERVER] [-d DOMAIN] [-u USER] [-p PASSWORD] [-H HASH] [-k] [-o OUTPUT]
options:
-h, --help show this help message and exit
-s, --server SERVER LDAP server IP or FQDN (ex: ldap://192.168.57.5 or ldaps://dc.corp.local)
-d, --domain DOMAIN Domain name tied to the user
-u, --user USER Username
-p, --password PASSWORD
Password
-H, --hash HASH NTLM authentication, format is [LM:]NT
-k, --kerberos Use Kerberos authentication
-o, --output OUTPUT Output filename and location (default ./cache_gpoParser_<timestamp>.json)
$ gpoParser remote -u bob -p password -d corp -s 192.168.57.5
Retrieving \CORP.LOCAL\Policies\{008B0634-C0B9-443A-A06A-E2BAD875E27F}\Machine/Microsoft/Windows NT/SecEdit/GptTmpl.inf
Retrieving \CORP.LOCAL\Policies\{008B0634-C0B9-443A-A06A-E2BAD875E27F}\Machine/Preferences/Groups/Groups.xml
Retrieving \CORP.LOCAL\Policies\{008B0634-C0B9-443A-A06A-E2BAD875E27F}\Machine/Preferences/Registry/Registry.xml
[...]
Information saved to cache, now use display / query features
오프라인: LDAP 디렉터리의 (일부) 복사본과 SYSVOL 공유의 Policies 폴더 콘텐츠가 필요합니다. 현재 LDAP 디렉터리 수집은 다음에 의존합니다:
Objects 출력 형식 (NDJSON)$ gpoParser local -h
usage: gpoParser local [-h] [-f {ldeep,adexplorer}] [-o OUTPUT] sysvol_folder ldap_folder
positional arguments:
sysvol_folder SYSVOL folder containing the policies
ldap_folder Folder with LDAP dump in ldeep format
options:
-h, --help show this help message and exit
-f {ldeep,adexplorer}, --format {ldeep,adexplorer}
JSON files input format (default ldeep)
-o OUTPUT, --output OUTPUT
Output filename and location (default ./cache_gpoParser_<timestamp>.json)
$ mkdir sysvol && cd sysvol && echo -e 'prompt\nrecurse\nmget *' | smbclient -W CORP -U bob%password //192.168.57.5/SYSVOL
$ mkdir ldap && ldeep ldap -u bob -p password -d corp.local -s 192.168.57.5 all ldap/corp
$ gpoParser local sysvol/ ldap/
Information saved to cache, now use display / query features
이 모드는 지원되는 형식과 파싱된 데이터로 제한하여 GPO에 의해 적용된 모든 구성 변경 사항을 표시합니다. GPO 이름 또는 GUID로 결과를 필터링할 수 있습니다.
$ gpoParser display -h
usage: gpoParser display [-h] [-g GPO] [-c CACHE]
options:
-h, --help show this help message and exit
-g GPO, --gpo GPO Filter by GPO name or GUID
-c CACHE, --cache CACHE
Cache file location (default: ./cache_gpoParser_<timestamp>.json)
$ gpoParser display
Cache file found, using it
{6F3821B3-89B2-496D-82A5-58092D3EA588}: AddAdmin
Computer configuration
Groups
The following principals are added to BUILTIN\Administrators
CORP\admin
{ADC96BD4-86D3-4516-BCF2-F7BDD5A76366}: AddRDP
Computer configuration
Groups
The following principals are added to BUILTIN\Remote Desktop Users
CORP\bob
[...]
$ gpoParser display -g work
Cache file found, using it
{474D47E2-2B77-4E37-9744-A3CF6AB04449}: Workstation admins
Computer configuration
Groups
The following principals are added to BUILTIN\Administrators
CORP\Admin - All Workstations
이 뷰는 GPO와 컴퓨터 간의 관계를 보여줍니다. 예를 들어, 특정 GPO가 적용되는 컴퓨터 또는 하나 이상의 컴퓨터에 적용되는 변경 사항을 확인할 수 있습니다.
$ gpoParser query -h
usage: gpoParser query [-h] [-g GPO] [-C COMPUTER] [-c CACHE]
options:
-h, --help show this help message and exit
-g GPO, --gpo GPO Filter by GPO name or GUID
-C COMPUTER, --computer COMPUTER
Computer name or distinguishedName to filter on
-c CACHE, --cache CACHE
Cache file location (default: ./cache_gpoParser_<timestamp>.json)
$ gpoParser query
Cache file found, using it
{6F3821B3-89B2-496D-82A5-58092D3EA588}: AddAdmin
This GPO affects the following computers:
CN=SRV55,OU=PROD,OU=Servers,DC=CORP,DC=LOCAL
CN=SRV54,OU=PROD,OU=Servers,DC=CORP,DC=LOCAL
CN=SRV53,OU=PROD,OU=Servers,DC=CORP,DC=LOCAL
CN=SRV52,OU=PROD,OU=Servers,DC=CORP,DC=LOCAL
{6AC1786C-016F-11D2-945F-00C04FB984F9}: Default Domain Controllers Policy
This GPO affects the following computers:
CN=DC01,OU=Domain Controllers,DC=CORP,DC=LOCAL
{31B2F340-016D-11D2-945F-00C04FB984F9}: Default Domain Policy
This GPO affects the following computers:
CN=SRV51,OU=SUBSUB,OU=SUB,DC=CORP,DC=LOCAL
CN=SRV49,OU=SUB,DC=CORP,DC=LOCAL
CN=SRV50,OU=SUB,DC=CORP,DC=LOCAL
CN=SRV55,OU=PROD,OU=Servers,DC=CORP,DC=LOCAL
[...]
$ gpoParser query -C wks
Cache file found, using it
CN=WKS01,OU=ADMIN,OU=WORKSTATIONS,DC=CORP,DC=LOCAL
{31B2F340-016D-11D2-945F-00C04FB984F9}: Default Domain Policy
Computer configuration
Registry
The following registry key changes have been made
Action: Create
Path: MACHINE\System\CurrentControlSet\Control\Lsa\NoLMHash
Value: 4,1
The following registry key changes have been made
Action: Update
Hive: HKEY_LOCAL_MACHINE
Path: SYSTEM\CurrentControlSet\Services\Dnscache\Parameters
Name: EnableMDNS
Value: 00000000
GPO 정보를 파싱하여 AdminTo, CanRDP, CanPSRemote와 같은 추가 엣지를 생성하고, BloodHound가 기본적으로 탐지하지 못할 수 있는 측면 이동 기회를 식별합니다. 엣지는 Neo4j 데이터베이스에 직접 연결하여 추가됩니다.
$ gpoParser enrich -h
usage: gpoParser enrich [-h] [-u USER] [-p PASSWORD] [-s SERVER] [-c CACHE]
options:
-h, --help show this help message and exit
-u USER, --user USER Username for neo4j authentication (default: neo4j)
-p PASSWORD, --password PASSWORD
Password for neo4j authentication (default: bloodhoundcommunityedition)
-s SERVER, --server SERVER
Neo4j server URI (default: bolt://localhost:7687)
-c CACHE, --cache CACHE
Cache file location (default: ./cache_gpoParser_<timestamp>.json)
오프라인 데이터 수집은 특정 제한 사항을 수반합니다. 상속 상태, 사용자/컴퓨터 구성 상태, 보안 필터, WMI 필터, 항목 수준 대상 지정(item-level targeting)과 같은 매개변수는 기존 도구(BloodHound, PowerView, GPOHound)에서 항상 수집되거나 해석되지 않을 수 있습니다. gpoParser는 개발이 계속됨에 따라 이러한 모든 매개변수를 점진적으로 고려할 것입니다. 도구가 발전함에 따라 추가 데이터 수집기가 도입될 예정입니다.