PyADRecon-ADWS 0.3.7__tar.gz → 0.3.8__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {pyadrecon_adws-0.3.7 → pyadrecon_adws-0.3.8}/CHANGELOG.md +7 -7
- {pyadrecon_adws-0.3.7 → pyadrecon_adws-0.3.8}/PKG-INFO +1 -1
- {pyadrecon_adws-0.3.7 → pyadrecon_adws-0.3.8}/PyADRecon_ADWS.egg-info/PKG-INFO +1 -1
- pyadrecon_adws-0.3.8/package.json +3 -0
- {pyadrecon_adws-0.3.7 → pyadrecon_adws-0.3.8}/pyadrecon_adws.py +98 -10
- pyadrecon_adws-0.3.7/package.json +0 -3
- {pyadrecon_adws-0.3.7 → pyadrecon_adws-0.3.8}/.dockerignore +0 -0
- {pyadrecon_adws-0.3.7 → pyadrecon_adws-0.3.8}/.github/FUNDING.yml +0 -0
- {pyadrecon_adws-0.3.7 → pyadrecon_adws-0.3.8}/.github/ISSUE_TEMPLATE/bug_report.md +0 -0
- {pyadrecon_adws-0.3.7 → pyadrecon_adws-0.3.8}/.github/ISSUE_TEMPLATE/feature_request.md +0 -0
- {pyadrecon_adws-0.3.7 → pyadrecon_adws-0.3.8}/.github/pyadrecon.png +0 -0
- {pyadrecon_adws-0.3.7 → pyadrecon_adws-0.3.8}/.github/workflows/conventional-commits.yml +0 -0
- {pyadrecon_adws-0.3.7 → pyadrecon_adws-0.3.8}/.github/workflows/pypi.yml +0 -0
- {pyadrecon_adws-0.3.7 → pyadrecon_adws-0.3.8}/.gitignore +0 -0
- {pyadrecon_adws-0.3.7 → pyadrecon_adws-0.3.8}/Dockerfile +0 -0
- {pyadrecon_adws-0.3.7 → pyadrecon_adws-0.3.8}/LICENSE +0 -0
- {pyadrecon_adws-0.3.7 → pyadrecon_adws-0.3.8}/PyADRecon_ADWS.egg-info/SOURCES.txt +0 -0
- {pyadrecon_adws-0.3.7 → pyadrecon_adws-0.3.8}/PyADRecon_ADWS.egg-info/dependency_links.txt +0 -0
- {pyadrecon_adws-0.3.7 → pyadrecon_adws-0.3.8}/PyADRecon_ADWS.egg-info/entry_points.txt +0 -0
- {pyadrecon_adws-0.3.7 → pyadrecon_adws-0.3.8}/PyADRecon_ADWS.egg-info/requires.txt +0 -0
- {pyadrecon_adws-0.3.7 → pyadrecon_adws-0.3.8}/PyADRecon_ADWS.egg-info/top_level.txt +0 -0
- {pyadrecon_adws-0.3.7 → pyadrecon_adws-0.3.8}/README.md +0 -0
- {pyadrecon_adws-0.3.7 → pyadrecon_adws-0.3.8}/helpers/__init__.py +0 -0
- {pyadrecon_adws-0.3.7 → pyadrecon_adws-0.3.8}/helpers/adws/__init__.py +0 -0
- {pyadrecon_adws-0.3.7 → pyadrecon_adws-0.3.8}/helpers/adws/adws.py +0 -0
- {pyadrecon_adws-0.3.7 → pyadrecon_adws-0.3.8}/helpers/adws/encoder/__init__.py +0 -0
- {pyadrecon_adws-0.3.7 → pyadrecon_adws-0.3.8}/helpers/adws/encoder/encoder.py +0 -0
- {pyadrecon_adws-0.3.7 → pyadrecon_adws-0.3.8}/helpers/adws/encoder/records/__init__.py +0 -0
- {pyadrecon_adws-0.3.7 → pyadrecon_adws-0.3.8}/helpers/adws/encoder/records/attributes.py +0 -0
- {pyadrecon_adws-0.3.7 → pyadrecon_adws-0.3.8}/helpers/adws/encoder/records/constants.py +0 -0
- {pyadrecon_adws-0.3.7 → pyadrecon_adws-0.3.8}/helpers/adws/encoder/records/datatypes.py +0 -0
- {pyadrecon_adws-0.3.7 → pyadrecon_adws-0.3.8}/helpers/adws/encoder/records/elements.py +0 -0
- {pyadrecon_adws-0.3.7 → pyadrecon_adws-0.3.8}/helpers/adws/encoder/records/record.py +0 -0
- {pyadrecon_adws-0.3.7 → pyadrecon_adws-0.3.8}/helpers/adws/encoder/records/text.py +0 -0
- {pyadrecon_adws-0.3.7 → pyadrecon_adws-0.3.8}/helpers/adws/encoder/records/utils.py +0 -0
- {pyadrecon_adws-0.3.7 → pyadrecon_adws-0.3.8}/helpers/adws/encoder/xml_parser.py +0 -0
- {pyadrecon_adws-0.3.7 → pyadrecon_adws-0.3.8}/helpers/adws/ms_nmf.py +0 -0
- {pyadrecon_adws-0.3.7 → pyadrecon_adws-0.3.8}/helpers/adws/ms_nns.py +0 -0
- {pyadrecon_adws-0.3.7 → pyadrecon_adws-0.3.8}/helpers/adws/soap_templates.py +0 -0
- {pyadrecon_adws-0.3.7 → pyadrecon_adws-0.3.8}/helpers/adws_wrapper.py +0 -0
- {pyadrecon_adws-0.3.7 → pyadrecon_adws-0.3.8}/pyproject.toml +0 -0
- {pyadrecon_adws-0.3.7 → pyadrecon_adws-0.3.8}/requirements.txt +0 -0
- {pyadrecon_adws-0.3.7 → pyadrecon_adws-0.3.8}/setup.cfg +0 -0
- {pyadrecon_adws-0.3.7 → pyadrecon_adws-0.3.8}/windows/README.md +0 -0
- {pyadrecon_adws-0.3.7 → pyadrecon_adws-0.3.8}/windows/pyadrecon_adws.exe +0 -0
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
## [0.3.8](https://github.com/l4rm4nd/PyADRecon-ADWS/compare/v0.3.7...v0.3.8) (2026-02-19)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* support forest-child enumerations with proper sid resolving ([15aff39](https://github.com/l4rm4nd/PyADRecon-ADWS/commit/15aff39c015a5d017e8c6c9cb7a3dd4763af6d0b))
|
|
7
|
+
|
|
1
8
|
## [0.3.7](https://github.com/l4rm4nd/PyADRecon-ADWS/compare/v0.3.6...v0.3.7) (2026-02-19)
|
|
2
9
|
|
|
3
10
|
|
|
@@ -26,10 +33,3 @@
|
|
|
26
33
|
|
|
27
34
|
* adcs ca parsing ([bde2e18](https://github.com/l4rm4nd/PyADRecon-ADWS/commit/bde2e18b938e7be809ef4183294e0a025d2e1e26))
|
|
28
35
|
|
|
29
|
-
## [0.3.3](https://github.com/l4rm4nd/PyADRecon-ADWS/compare/v0.3.2...v0.3.3) (2026-02-19)
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
### Bug Fixes
|
|
33
|
-
|
|
34
|
-
* cell coloring; remove requirement for dns lookups and just lookup dumped dns records ([46d3d2a](https://github.com/l4rm4nd/PyADRecon-ADWS/commit/46d3d2afc2b3980df396d5bccc1f5114b9033a61))
|
|
35
|
-
|
|
@@ -69,7 +69,7 @@ except ImportError:
|
|
|
69
69
|
print("[*] openpyxl not available - Excel export disabled")
|
|
70
70
|
|
|
71
71
|
# Constants
|
|
72
|
-
VERSION = "v0.3.
|
|
72
|
+
VERSION = "v0.3.8" # Automatically updated by CI/CD pipeline during release
|
|
73
73
|
BANNER = f"""
|
|
74
74
|
╔═══════════════════════════════════════════════════════════════════
|
|
75
75
|
║ PyADRecon-ADWS {VERSION} - Python AD Reconnaissance Tool (ADWS)
|
|
@@ -878,7 +878,8 @@ class PyADRecon:
|
|
|
878
878
|
return []
|
|
879
879
|
|
|
880
880
|
def _resolve_sid_to_name(self, sid: str) -> str:
|
|
881
|
-
"""Resolve a SID to a readable name (user/group) with caching.
|
|
881
|
+
"""Resolve a SID to a readable name (user/group) with caching.
|
|
882
|
+
Handles cross-domain SIDs in forest environments."""
|
|
882
883
|
# Check cache first
|
|
883
884
|
if sid in self._sid_cache:
|
|
884
885
|
return self._sid_cache[sid]
|
|
@@ -904,7 +905,51 @@ class PyADRecon:
|
|
|
904
905
|
self._sid_cache[sid] = result
|
|
905
906
|
return result
|
|
906
907
|
|
|
907
|
-
#
|
|
908
|
+
# Well-known RIDs (work with any domain SID)
|
|
909
|
+
well_known_rids = {
|
|
910
|
+
'498': 'Enterprise Read-only Domain Controllers',
|
|
911
|
+
'500': 'Administrator',
|
|
912
|
+
'501': 'Guest',
|
|
913
|
+
'502': 'KRBTGT',
|
|
914
|
+
'512': 'Domain Admins',
|
|
915
|
+
'513': 'Domain Users',
|
|
916
|
+
'514': 'Domain Guests',
|
|
917
|
+
'515': 'Domain Computers',
|
|
918
|
+
'516': 'Domain Controllers',
|
|
919
|
+
'517': 'Cert Publishers',
|
|
920
|
+
'518': 'Schema Admins',
|
|
921
|
+
'519': 'Enterprise Admins',
|
|
922
|
+
'520': 'Group Policy Creator Owners',
|
|
923
|
+
'521': 'Read-only Domain Controllers',
|
|
924
|
+
'522': 'Cloneable Domain Controllers',
|
|
925
|
+
'525': 'Protected Users',
|
|
926
|
+
'526': 'Key Admins',
|
|
927
|
+
'527': 'Enterprise Key Admins',
|
|
928
|
+
'553': 'RAS and IAS Servers',
|
|
929
|
+
'571': 'Allowed RODC Password Replication Group',
|
|
930
|
+
'572': 'Denied RODC Password Replication Group',
|
|
931
|
+
}
|
|
932
|
+
|
|
933
|
+
# Check if this is a domain SID with a well-known RID
|
|
934
|
+
if sid.startswith('S-1-5-21-'):
|
|
935
|
+
parts = sid.split('-')
|
|
936
|
+
if len(parts) >= 8:
|
|
937
|
+
rid = parts[-1]
|
|
938
|
+
if rid in well_known_rids:
|
|
939
|
+
# Check if it's from a different domain
|
|
940
|
+
sid_domain = '-'.join(parts[:7]) # S-1-5-21-xxxxxxxxxx-xxxxxxxxxx-xxxxxxxxxx
|
|
941
|
+
current_domain = self.domain_sid if hasattr(self, 'domain_sid') and self.domain_sid else None
|
|
942
|
+
|
|
943
|
+
if current_domain and sid_domain != current_domain:
|
|
944
|
+
# Cross-domain SID - mark it as from another domain
|
|
945
|
+
result = f"[Foreign Domain] {well_known_rids[rid]}"
|
|
946
|
+
else:
|
|
947
|
+
result = well_known_rids[rid]
|
|
948
|
+
|
|
949
|
+
self._sid_cache[sid] = result
|
|
950
|
+
return result
|
|
951
|
+
|
|
952
|
+
# Try to resolve from current domain
|
|
908
953
|
try:
|
|
909
954
|
# Search for the object by objectSid
|
|
910
955
|
entries = self.search(
|
|
@@ -932,7 +977,36 @@ class PyADRecon:
|
|
|
932
977
|
self._sid_cache[sid] = result
|
|
933
978
|
return result
|
|
934
979
|
except Exception as e:
|
|
935
|
-
logger.debug(f"Could not resolve SID {sid}: {e}")
|
|
980
|
+
logger.debug(f"Could not resolve SID {sid} in current domain: {e}")
|
|
981
|
+
|
|
982
|
+
# If not found in current domain and we're in a child domain, try forest root
|
|
983
|
+
if hasattr(self, 'forest_root_dn') and self.forest_root_dn != self.base_dn:
|
|
984
|
+
try:
|
|
985
|
+
entries = self.search(
|
|
986
|
+
self.forest_root_dn,
|
|
987
|
+
f"(objectSid={sid})",
|
|
988
|
+
['sAMAccountName', 'cn', 'distinguishedName', 'objectClass']
|
|
989
|
+
)
|
|
990
|
+
|
|
991
|
+
if entries:
|
|
992
|
+
entry = entries[0]
|
|
993
|
+
sam_name = get_attr(entry, 'sAMAccountName', '')
|
|
994
|
+
cn_name = get_attr(entry, 'cn', '')
|
|
995
|
+
obj_classes = get_attr_list(entry, 'objectClass')
|
|
996
|
+
|
|
997
|
+
if 'computer' in obj_classes:
|
|
998
|
+
result = f"[Computer] {sam_name or cn_name}"
|
|
999
|
+
elif 'group' in obj_classes:
|
|
1000
|
+
result = f"[Group] {sam_name or cn_name}"
|
|
1001
|
+
elif 'user' in obj_classes:
|
|
1002
|
+
result = f"[User] {sam_name or cn_name}"
|
|
1003
|
+
else:
|
|
1004
|
+
result = sam_name or cn_name
|
|
1005
|
+
|
|
1006
|
+
self._sid_cache[sid] = result
|
|
1007
|
+
return result
|
|
1008
|
+
except Exception as e:
|
|
1009
|
+
logger.debug(f"Could not resolve SID {sid} in forest root: {e}")
|
|
936
1010
|
|
|
937
1011
|
# Return SID if resolution failed
|
|
938
1012
|
result = f"[SID] {sid}"
|
|
@@ -1531,7 +1605,8 @@ class PyADRecon:
|
|
|
1531
1605
|
attributes=['msDS-Behavior-Version', 'fSMORoleOwner', 'msDS-EnabledFeature', 'distinguishedName']
|
|
1532
1606
|
)
|
|
1533
1607
|
|
|
1534
|
-
|
|
1608
|
+
# Use forest root DN (not current domain's base_dn) for forest name
|
|
1609
|
+
forest_name = dn_to_fqdn(self.forest_root_dn if hasattr(self, 'forest_root_dn') else self.base_dn)
|
|
1535
1610
|
forest_fl = 0
|
|
1536
1611
|
|
|
1537
1612
|
if entries:
|
|
@@ -1553,11 +1628,18 @@ class PyADRecon:
|
|
|
1553
1628
|
if naming_entries:
|
|
1554
1629
|
naming_owner = get_attr(naming_entries[0], 'fSMORoleOwner', '')
|
|
1555
1630
|
if naming_owner:
|
|
1556
|
-
# Extract DC
|
|
1631
|
+
# Extract DC FQDN from DN: CN=NTDS Settings,CN=DC1,CN=Servers,CN=Site,... -> DC1.domain.local
|
|
1632
|
+
# The DN contains domain components that tell us the actual domain
|
|
1557
1633
|
parts = str(naming_owner).split(',')
|
|
1558
1634
|
if len(parts) > 1:
|
|
1559
|
-
dc_name = parts[1].replace('CN=', '')
|
|
1560
|
-
|
|
1635
|
+
dc_name = parts[1].replace('CN=', '').strip()
|
|
1636
|
+
# Extract domain DN from the rest of the path
|
|
1637
|
+
domain_dn_parts = [p for p in parts if p.strip().upper().startswith('DC=')]
|
|
1638
|
+
if domain_dn_parts:
|
|
1639
|
+
domain_fqdn = dn_to_fqdn(','.join(domain_dn_parts))
|
|
1640
|
+
results.append({"Category": "Domain Naming Master", "Value": f"{dc_name.lower()}.{domain_fqdn}"})
|
|
1641
|
+
else:
|
|
1642
|
+
results.append({"Category": "Domain Naming Master", "Value": f"{dc_name.lower()}.{forest_name}"})
|
|
1561
1643
|
except:
|
|
1562
1644
|
pass
|
|
1563
1645
|
|
|
@@ -1573,8 +1655,14 @@ class PyADRecon:
|
|
|
1573
1655
|
if schema_owner:
|
|
1574
1656
|
parts = str(schema_owner).split(',')
|
|
1575
1657
|
if len(parts) > 1:
|
|
1576
|
-
dc_name = parts[1].replace('CN=', '')
|
|
1577
|
-
|
|
1658
|
+
dc_name = parts[1].replace('CN=', '').strip()
|
|
1659
|
+
# Extract domain DN from the DN path
|
|
1660
|
+
domain_dn_parts = [p for p in parts if p.strip().upper().startswith('DC=')]
|
|
1661
|
+
if domain_dn_parts:
|
|
1662
|
+
domain_fqdn = dn_to_fqdn(','.join(domain_dn_parts))
|
|
1663
|
+
results.append({"Category": "Schema Master", "Value": f"{dc_name.lower()}.{domain_fqdn}"})
|
|
1664
|
+
else:
|
|
1665
|
+
results.append({"Category": "Schema Master", "Value": f"{dc_name.lower()}.{forest_name}"})
|
|
1578
1666
|
except:
|
|
1579
1667
|
pass
|
|
1580
1668
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|