
gpoParser is a tool designed to extract and analyze configurations applied through Group Policy Objects (GPOs) in an Active Directory environment.
gpoParser एक उपकरण है जिसे Active Directory वातावरण में Group Policy Objects (GPOs) के माध्यम से लागू किए गए कॉन्फ़िगरेशन को निकालने और उनका विश्लेषण करने के लिए डिज़ाइन किया गया है। चूँकि इन सेटिंग्स की सूची बनाना थकाऊ और समय लेने वाला हो सकता है, यह उपकरण लागू नीतियों की स्पष्ट समझ प्रदान करता है और खतरनाक कॉन्फ़िगरेशन की पहचान करने में मदद करता है जो पार्श्व गति (lateral movement) या विशेषाधिकार वृद्धि (privilege escalation) को सक्षम कर सकते हैं। इसे 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
ऑनलाइन: GPO से संबंधित जानकारी और उनकी विशेषताओं (flags, gPLink, gPOptions, और अधिक) को एकत्र करने के लिए LDAP निर्देशिका से जुड़ता है। यह GPO कॉन्फ़िगरेशन फ़ाइलों को एकत्र करने के लिए SYSVOL शेयर से भी जुड़ता है।
$ 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
यह मोड GPOs द्वारा लागू किए गए सभी कॉन्फ़िगरेशन परिवर्तनों को प्रदर्शित करता है, जो समर्थित प्रारूपों और पार्स किए गए डेटा तक सीमित है। आप परिणामों को 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
यह दृश्य GPOs और कंप्यूटरों के बीच संबंध दिखाता है। उदाहरण के लिए, आप देख सकते हैं कि कोई 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 जैसे अतिरिक्त edges बनाता है, जो पार्श्व गति के अवसरों की पहचान करता है जिन्हें BloodHound मूल रूप से पहचान नहीं पाता। Edges को 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 अपने विकास के जारी रहने के साथ इन सभी पैरामीटरों को धीरे-धीरे ध्यान में रखेगा। उपकरणों के विकसित होने के साथ अतिरिक्त डेटा कलेक्टर पेश किए जाएँगे।