PyADRecon-ADWS 0.3.5__tar.gz → 0.3.7__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.5 → pyadrecon_adws-0.3.7}/CHANGELOG.md +10 -10
- {pyadrecon_adws-0.3.5 → pyadrecon_adws-0.3.7}/PKG-INFO +1 -1
- {pyadrecon_adws-0.3.5 → pyadrecon_adws-0.3.7}/PyADRecon_ADWS.egg-info/PKG-INFO +1 -1
- {pyadrecon_adws-0.3.5 → pyadrecon_adws-0.3.7}/helpers/adws_wrapper.py +9 -0
- pyadrecon_adws-0.3.7/package.json +3 -0
- {pyadrecon_adws-0.3.5 → pyadrecon_adws-0.3.7}/pyadrecon_adws.py +42 -6
- {pyadrecon_adws-0.3.5 → pyadrecon_adws-0.3.7}/windows/pyadrecon_adws.exe +0 -0
- pyadrecon_adws-0.3.5/package.json +0 -3
- {pyadrecon_adws-0.3.5 → pyadrecon_adws-0.3.7}/.dockerignore +0 -0
- {pyadrecon_adws-0.3.5 → pyadrecon_adws-0.3.7}/.github/FUNDING.yml +0 -0
- {pyadrecon_adws-0.3.5 → pyadrecon_adws-0.3.7}/.github/ISSUE_TEMPLATE/bug_report.md +0 -0
- {pyadrecon_adws-0.3.5 → pyadrecon_adws-0.3.7}/.github/ISSUE_TEMPLATE/feature_request.md +0 -0
- {pyadrecon_adws-0.3.5 → pyadrecon_adws-0.3.7}/.github/pyadrecon.png +0 -0
- {pyadrecon_adws-0.3.5 → pyadrecon_adws-0.3.7}/.github/workflows/conventional-commits.yml +0 -0
- {pyadrecon_adws-0.3.5 → pyadrecon_adws-0.3.7}/.github/workflows/pypi.yml +0 -0
- {pyadrecon_adws-0.3.5 → pyadrecon_adws-0.3.7}/.gitignore +0 -0
- {pyadrecon_adws-0.3.5 → pyadrecon_adws-0.3.7}/Dockerfile +0 -0
- {pyadrecon_adws-0.3.5 → pyadrecon_adws-0.3.7}/LICENSE +0 -0
- {pyadrecon_adws-0.3.5 → pyadrecon_adws-0.3.7}/PyADRecon_ADWS.egg-info/SOURCES.txt +0 -0
- {pyadrecon_adws-0.3.5 → pyadrecon_adws-0.3.7}/PyADRecon_ADWS.egg-info/dependency_links.txt +0 -0
- {pyadrecon_adws-0.3.5 → pyadrecon_adws-0.3.7}/PyADRecon_ADWS.egg-info/entry_points.txt +0 -0
- {pyadrecon_adws-0.3.5 → pyadrecon_adws-0.3.7}/PyADRecon_ADWS.egg-info/requires.txt +0 -0
- {pyadrecon_adws-0.3.5 → pyadrecon_adws-0.3.7}/PyADRecon_ADWS.egg-info/top_level.txt +0 -0
- {pyadrecon_adws-0.3.5 → pyadrecon_adws-0.3.7}/README.md +0 -0
- {pyadrecon_adws-0.3.5 → pyadrecon_adws-0.3.7}/helpers/__init__.py +0 -0
- {pyadrecon_adws-0.3.5 → pyadrecon_adws-0.3.7}/helpers/adws/__init__.py +0 -0
- {pyadrecon_adws-0.3.5 → pyadrecon_adws-0.3.7}/helpers/adws/adws.py +0 -0
- {pyadrecon_adws-0.3.5 → pyadrecon_adws-0.3.7}/helpers/adws/encoder/__init__.py +0 -0
- {pyadrecon_adws-0.3.5 → pyadrecon_adws-0.3.7}/helpers/adws/encoder/encoder.py +0 -0
- {pyadrecon_adws-0.3.5 → pyadrecon_adws-0.3.7}/helpers/adws/encoder/records/__init__.py +0 -0
- {pyadrecon_adws-0.3.5 → pyadrecon_adws-0.3.7}/helpers/adws/encoder/records/attributes.py +0 -0
- {pyadrecon_adws-0.3.5 → pyadrecon_adws-0.3.7}/helpers/adws/encoder/records/constants.py +0 -0
- {pyadrecon_adws-0.3.5 → pyadrecon_adws-0.3.7}/helpers/adws/encoder/records/datatypes.py +0 -0
- {pyadrecon_adws-0.3.5 → pyadrecon_adws-0.3.7}/helpers/adws/encoder/records/elements.py +0 -0
- {pyadrecon_adws-0.3.5 → pyadrecon_adws-0.3.7}/helpers/adws/encoder/records/record.py +0 -0
- {pyadrecon_adws-0.3.5 → pyadrecon_adws-0.3.7}/helpers/adws/encoder/records/text.py +0 -0
- {pyadrecon_adws-0.3.5 → pyadrecon_adws-0.3.7}/helpers/adws/encoder/records/utils.py +0 -0
- {pyadrecon_adws-0.3.5 → pyadrecon_adws-0.3.7}/helpers/adws/encoder/xml_parser.py +0 -0
- {pyadrecon_adws-0.3.5 → pyadrecon_adws-0.3.7}/helpers/adws/ms_nmf.py +0 -0
- {pyadrecon_adws-0.3.5 → pyadrecon_adws-0.3.7}/helpers/adws/ms_nns.py +0 -0
- {pyadrecon_adws-0.3.5 → pyadrecon_adws-0.3.7}/helpers/adws/soap_templates.py +0 -0
- {pyadrecon_adws-0.3.5 → pyadrecon_adws-0.3.7}/pyproject.toml +0 -0
- {pyadrecon_adws-0.3.5 → pyadrecon_adws-0.3.7}/requirements.txt +0 -0
- {pyadrecon_adws-0.3.5 → pyadrecon_adws-0.3.7}/setup.cfg +0 -0
- {pyadrecon_adws-0.3.5 → pyadrecon_adws-0.3.7}/windows/README.md +0 -0
|
@@ -1,35 +1,35 @@
|
|
|
1
|
-
## [0.3.
|
|
1
|
+
## [0.3.7](https://github.com/l4rm4nd/PyADRecon-ADWS/compare/v0.3.6...v0.3.7) (2026-02-19)
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
### Bug Fixes
|
|
5
5
|
|
|
6
|
-
*
|
|
6
|
+
* forest support for child domain environments ([1deacd3](https://github.com/l4rm4nd/PyADRecon-ADWS/commit/1deacd355dc4ce58e336a3b72ba758209e24297d))
|
|
7
7
|
|
|
8
|
-
## [0.3.
|
|
8
|
+
## [0.3.6](https://github.com/l4rm4nd/PyADRecon-ADWS/compare/v0.3.5...v0.3.6) (2026-02-19)
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
### Bug Fixes
|
|
12
12
|
|
|
13
|
-
*
|
|
13
|
+
* adjust ace parsing for adcs and fix esc4 detection ([56b91d1](https://github.com/l4rm4nd/PyADRecon-ADWS/commit/56b91d19b2534553b8d1cf672d6a037db780b9b6))
|
|
14
14
|
|
|
15
|
-
## [0.3.
|
|
15
|
+
## [0.3.5](https://github.com/l4rm4nd/PyADRecon-ADWS/compare/v0.3.4...v0.3.5) (2026-02-19)
|
|
16
16
|
|
|
17
17
|
|
|
18
18
|
### Bug Fixes
|
|
19
19
|
|
|
20
|
-
*
|
|
20
|
+
* make --page-size and -v working ([e4bb00d](https://github.com/l4rm4nd/PyADRecon-ADWS/commit/e4bb00d348f82b3685c11c90ab5bfaedf0452e3b))
|
|
21
21
|
|
|
22
|
-
## [0.3.
|
|
22
|
+
## [0.3.4](https://github.com/l4rm4nd/PyADRecon-ADWS/compare/v0.3.3...v0.3.4) (2026-02-19)
|
|
23
23
|
|
|
24
24
|
|
|
25
25
|
### Bug Fixes
|
|
26
26
|
|
|
27
|
-
*
|
|
27
|
+
* adcs ca parsing ([bde2e18](https://github.com/l4rm4nd/PyADRecon-ADWS/commit/bde2e18b938e7be809ef4183294e0a025d2e1e26))
|
|
28
28
|
|
|
29
|
-
## [0.3.
|
|
29
|
+
## [0.3.3](https://github.com/l4rm4nd/PyADRecon-ADWS/compare/v0.3.2...v0.3.3) (2026-02-19)
|
|
30
30
|
|
|
31
31
|
|
|
32
32
|
### Bug Fixes
|
|
33
33
|
|
|
34
|
-
*
|
|
34
|
+
* cell coloring; remove requirement for dns lookups and just lookup dumped dns records ([46d3d2a](https://github.com/l4rm4nd/PyADRecon-ADWS/commit/46d3d2afc2b3980df396d5bccc1f5114b9033a61))
|
|
35
35
|
|
|
@@ -216,7 +216,16 @@ class ADWSConnection:
|
|
|
216
216
|
rootdse = self._adws_client.get_rootdse_contexts(self.server.host, self._adws_client._nmf)
|
|
217
217
|
self._root_dn = rootdse.get('defaultNamingContext') or rootdse.get('rootDomainNamingContext')
|
|
218
218
|
if self._root_dn:
|
|
219
|
+
# Store all naming contexts from RootDSE for proper forest queries
|
|
219
220
|
self.server.info.other['defaultNamingContext'] = [self._root_dn]
|
|
221
|
+
|
|
222
|
+
# Store other naming contexts if available (critical for child domains)
|
|
223
|
+
if rootdse.get('configurationNamingContext'):
|
|
224
|
+
self.server.info.other['configurationNamingContext'] = [rootdse['configurationNamingContext']]
|
|
225
|
+
if rootdse.get('schemaNamingContext'):
|
|
226
|
+
self.server.info.other['schemaNamingContext'] = [rootdse['schemaNamingContext']]
|
|
227
|
+
if rootdse.get('rootDomainNamingContext'):
|
|
228
|
+
self.server.info.other['rootDomainNamingContext'] = [rootdse['rootDomainNamingContext']]
|
|
220
229
|
|
|
221
230
|
self._bound = True
|
|
222
231
|
return True
|
|
@@ -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.7" # Automatically updated by CI/CD pipeline during release
|
|
73
73
|
BANNER = f"""
|
|
74
74
|
╔═══════════════════════════════════════════════════════════════════
|
|
75
75
|
║ PyADRecon-ADWS {VERSION} - Python AD Reconnaissance Tool (ADWS)
|
|
@@ -753,6 +753,7 @@ class PyADRecon:
|
|
|
753
753
|
self.base_dn: str = ""
|
|
754
754
|
self.config_dn: str = ""
|
|
755
755
|
self.schema_dn: str = ""
|
|
756
|
+
self.forest_root_dn: str = ""
|
|
756
757
|
self.domain_sid: str = ""
|
|
757
758
|
self.results: Dict[str, List] = {}
|
|
758
759
|
self.start_time: datetime = datetime.now()
|
|
@@ -806,15 +807,39 @@ class PyADRecon:
|
|
|
806
807
|
default_nc = self.conn.server.info.other.get('defaultNamingContext', [])
|
|
807
808
|
if default_nc:
|
|
808
809
|
self.base_dn = default_nc[0] if isinstance(default_nc, list) else default_nc
|
|
810
|
+
|
|
811
|
+
# Get Configuration DN from RootDSE (critical for child domains - it's forest-wide)
|
|
812
|
+
config_nc = self.conn.server.info.other.get('configurationNamingContext', [])
|
|
813
|
+
if config_nc:
|
|
814
|
+
self.config_dn = config_nc[0] if isinstance(config_nc, list) else config_nc
|
|
815
|
+
|
|
816
|
+
# Get Schema DN from RootDSE (also forest-wide)
|
|
817
|
+
schema_nc = self.conn.server.info.other.get('schemaNamingContext', [])
|
|
818
|
+
if schema_nc:
|
|
819
|
+
self.schema_dn = schema_nc[0] if isinstance(schema_nc, list) else schema_nc
|
|
809
820
|
|
|
810
|
-
# Derive
|
|
821
|
+
# Fallback: Derive from base DN if not provided by RootDSE
|
|
811
822
|
if not self.base_dn and self.config.domain:
|
|
812
823
|
# Construct from domain name
|
|
813
824
|
parts = self.config.domain.split('.')
|
|
814
825
|
self.base_dn = ','.join([f'DC={part}' for part in parts])
|
|
815
826
|
|
|
816
|
-
|
|
817
|
-
|
|
827
|
+
# For child domains, derive forest root DN (Configuration/Schema are forest-wide)
|
|
828
|
+
forest_root_dn = self.base_dn
|
|
829
|
+
if self.base_dn:
|
|
830
|
+
dn_parts = [part.strip() for part in self.base_dn.split(',') if part.strip().startswith('DC=')]
|
|
831
|
+
if len(dn_parts) >= 3: # Child domain detected
|
|
832
|
+
forest_root_dn = ','.join(dn_parts[1:])
|
|
833
|
+
logger.info(f"[*] Child domain detected - using forest root DN: {forest_root_dn}")
|
|
834
|
+
|
|
835
|
+
# Store forest root DN for use in forest-wide queries
|
|
836
|
+
self.forest_root_dn = forest_root_dn
|
|
837
|
+
|
|
838
|
+
# Fallback for config/schema if RootDSE didn't provide them
|
|
839
|
+
if not hasattr(self, 'config_dn') or not self.config_dn:
|
|
840
|
+
self.config_dn = f"CN=Configuration,{forest_root_dn}"
|
|
841
|
+
if not hasattr(self, 'schema_dn') or not self.schema_dn:
|
|
842
|
+
self.schema_dn = f"CN=Schema,{self.config_dn}"
|
|
818
843
|
|
|
819
844
|
logger.info(f"[*] Base DN: {self.base_dn}")
|
|
820
845
|
logger.info(f"[*] Config DN: {self.config_dn}")
|
|
@@ -960,11 +985,18 @@ class PyADRecon:
|
|
|
960
985
|
if ace_type == 5: # ACCESS_ALLOWED_OBJECT_ACE_TYPE
|
|
961
986
|
try:
|
|
962
987
|
ace_data = ace['Ace']
|
|
963
|
-
|
|
988
|
+
# Check if ObjectType is present (Flags is a bitfield)
|
|
989
|
+
# Try to access Flags field directly
|
|
990
|
+
try:
|
|
991
|
+
flags = ace_data['Flags']
|
|
992
|
+
except (KeyError, TypeError):
|
|
993
|
+
flags = 0
|
|
994
|
+
|
|
964
995
|
# If no ObjectType GUID (flags & 0x1 == 0), it applies to ALL properties
|
|
965
996
|
if not (flags & 0x1):
|
|
966
997
|
has_generic_write_property = True
|
|
967
998
|
except (KeyError, TypeError):
|
|
999
|
+
# If we can't determine, assume it's generic (safer for detection)
|
|
968
1000
|
has_generic_write_property = True
|
|
969
1001
|
else:
|
|
970
1002
|
# Standard ACE with write property = applies to all properties
|
|
@@ -3417,7 +3449,7 @@ class PyADRecon:
|
|
|
3417
3449
|
search_bases = [
|
|
3418
3450
|
self.base_dn,
|
|
3419
3451
|
f"DC=DomainDnsZones,{self.base_dn}",
|
|
3420
|
-
f"DC=ForestDnsZones,{self.
|
|
3452
|
+
f"DC=ForestDnsZones,{self.forest_root_dn}",
|
|
3421
3453
|
]
|
|
3422
3454
|
|
|
3423
3455
|
for search_base in search_bases:
|
|
@@ -4257,6 +4289,10 @@ class PyADRecon:
|
|
|
4257
4289
|
if risk_level not in ['CRITICAL', 'HIGH']:
|
|
4258
4290
|
risk_level = 'HIGH'
|
|
4259
4291
|
risk_factors.append('ESC4: Low-privileged owner can modify template')
|
|
4292
|
+
|
|
4293
|
+
# If no ESC vulnerabilities and no risk factors, set risk level to None
|
|
4294
|
+
if not esc_vulns and not risk_factors:
|
|
4295
|
+
risk_level = 'None'
|
|
4260
4296
|
|
|
4261
4297
|
# Format enrollment and write permissions
|
|
4262
4298
|
enroll_perms_str = '; '.join(enrollment_principals) if enrollment_principals else 'None'
|
|
Binary file
|
|
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
|