
gpoParser は、Active Directory 環境でグループポリシーオブジェクト (GPO) を通じて適用される構成を抽出・分析するために設計されたツールです。
gpoParser は、Active Directory 環境でグループポリシーオブジェクト (GPO) を通じて適用される構成を抽出・分析するために設計されたツールです。 これらの設定の列挙は退屈で時間がかかる可能性があるため、このツールは適用されたポリシーをより明確に理解し、横移動や権限昇格を可能にする危険な構成を特定するのに役立ちます。 これは 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 がどのコンピューターに適用されるか、または 1 台以上のコンピューターにどのような変更が適用されるかを確認できます。
$ 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 フィルター、項目レベルターゲットなどのパラメーターは、既存のツール (BloodHound、PowerView、GPOHound) では常に収集または解釈されるとは限りません。 gpoParser は開発の継続に伴い、これらすべてのパラメーターを段階的に考慮する予定です。 ツールの進化に伴い、追加のデータコレクターが導入される予定です。