PyADRecon-ADWS 0.3.10__tar.gz → 0.3.11__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.10 → pyadrecon_adws-0.3.11}/CHANGELOG.md +7 -7
- {pyadrecon_adws-0.3.10 → pyadrecon_adws-0.3.11}/PKG-INFO +2 -2
- {pyadrecon_adws-0.3.10 → pyadrecon_adws-0.3.11}/PyADRecon_ADWS.egg-info/PKG-INFO +2 -2
- {pyadrecon_adws-0.3.10 → pyadrecon_adws-0.3.11}/PyADRecon_ADWS.egg-info/SOURCES.txt +1 -2
- {pyadrecon_adws-0.3.10 → pyadrecon_adws-0.3.11}/README.md +1 -1
- pyadrecon_adws-0.3.11/package.json +3 -0
- {pyadrecon_adws-0.3.10 → pyadrecon_adws-0.3.11}/pyadrecon_adws.py +60 -6
- {pyadrecon_adws-0.3.10 → pyadrecon_adws-0.3.11}/windows/README.md +3 -11
- pyadrecon_adws-0.3.10/package.json +0 -3
- pyadrecon_adws-0.3.10/windows/pyadrecon_adws.exe +0 -0
- {pyadrecon_adws-0.3.10 → pyadrecon_adws-0.3.11}/.dockerignore +0 -0
- {pyadrecon_adws-0.3.10 → pyadrecon_adws-0.3.11}/.github/FUNDING.yml +0 -0
- {pyadrecon_adws-0.3.10 → pyadrecon_adws-0.3.11}/.github/ISSUE_TEMPLATE/bug_report.md +0 -0
- {pyadrecon_adws-0.3.10 → pyadrecon_adws-0.3.11}/.github/ISSUE_TEMPLATE/feature_request.md +0 -0
- {pyadrecon_adws-0.3.10 → pyadrecon_adws-0.3.11}/.github/pyadrecon.png +0 -0
- {pyadrecon_adws-0.3.10 → pyadrecon_adws-0.3.11}/.github/workflows/conventional-commits.yml +0 -0
- {pyadrecon_adws-0.3.10 → pyadrecon_adws-0.3.11}/.github/workflows/pypi.yml +0 -0
- {pyadrecon_adws-0.3.10 → pyadrecon_adws-0.3.11}/.gitignore +0 -0
- {pyadrecon_adws-0.3.10 → pyadrecon_adws-0.3.11}/Dockerfile +0 -0
- {pyadrecon_adws-0.3.10 → pyadrecon_adws-0.3.11}/LICENSE +0 -0
- {pyadrecon_adws-0.3.10 → pyadrecon_adws-0.3.11}/PyADRecon_ADWS.egg-info/dependency_links.txt +0 -0
- {pyadrecon_adws-0.3.10 → pyadrecon_adws-0.3.11}/PyADRecon_ADWS.egg-info/entry_points.txt +0 -0
- {pyadrecon_adws-0.3.10 → pyadrecon_adws-0.3.11}/PyADRecon_ADWS.egg-info/requires.txt +0 -0
- {pyadrecon_adws-0.3.10 → pyadrecon_adws-0.3.11}/PyADRecon_ADWS.egg-info/top_level.txt +0 -0
- {pyadrecon_adws-0.3.10 → pyadrecon_adws-0.3.11}/helpers/__init__.py +0 -0
- {pyadrecon_adws-0.3.10 → pyadrecon_adws-0.3.11}/helpers/adws/__init__.py +0 -0
- {pyadrecon_adws-0.3.10 → pyadrecon_adws-0.3.11}/helpers/adws/adws.py +0 -0
- {pyadrecon_adws-0.3.10 → pyadrecon_adws-0.3.11}/helpers/adws/encoder/__init__.py +0 -0
- {pyadrecon_adws-0.3.10 → pyadrecon_adws-0.3.11}/helpers/adws/encoder/encoder.py +0 -0
- {pyadrecon_adws-0.3.10 → pyadrecon_adws-0.3.11}/helpers/adws/encoder/records/__init__.py +0 -0
- {pyadrecon_adws-0.3.10 → pyadrecon_adws-0.3.11}/helpers/adws/encoder/records/attributes.py +0 -0
- {pyadrecon_adws-0.3.10 → pyadrecon_adws-0.3.11}/helpers/adws/encoder/records/constants.py +0 -0
- {pyadrecon_adws-0.3.10 → pyadrecon_adws-0.3.11}/helpers/adws/encoder/records/datatypes.py +0 -0
- {pyadrecon_adws-0.3.10 → pyadrecon_adws-0.3.11}/helpers/adws/encoder/records/elements.py +0 -0
- {pyadrecon_adws-0.3.10 → pyadrecon_adws-0.3.11}/helpers/adws/encoder/records/record.py +0 -0
- {pyadrecon_adws-0.3.10 → pyadrecon_adws-0.3.11}/helpers/adws/encoder/records/text.py +0 -0
- {pyadrecon_adws-0.3.10 → pyadrecon_adws-0.3.11}/helpers/adws/encoder/records/utils.py +0 -0
- {pyadrecon_adws-0.3.10 → pyadrecon_adws-0.3.11}/helpers/adws/encoder/xml_parser.py +0 -0
- {pyadrecon_adws-0.3.10 → pyadrecon_adws-0.3.11}/helpers/adws/ms_nmf.py +0 -0
- {pyadrecon_adws-0.3.10 → pyadrecon_adws-0.3.11}/helpers/adws/ms_nns.py +0 -0
- {pyadrecon_adws-0.3.10 → pyadrecon_adws-0.3.11}/helpers/adws/soap_templates.py +0 -0
- {pyadrecon_adws-0.3.10 → pyadrecon_adws-0.3.11}/helpers/adws_wrapper.py +0 -0
- {pyadrecon_adws-0.3.10 → pyadrecon_adws-0.3.11}/pyproject.toml +0 -0
- {pyadrecon_adws-0.3.10 → pyadrecon_adws-0.3.11}/requirements.txt +0 -0
- {pyadrecon_adws-0.3.10 → pyadrecon_adws-0.3.11}/setup.cfg +0 -0
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
## [0.3.11](https://github.com/l4rm4nd/PyADRecon-ADWS/compare/v0.3.10...v0.3.11) (2026-02-20)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* properly traverse sids and display child/parent domain names for adcs certificate templates ([3e8b113](https://github.com/l4rm4nd/PyADRecon-ADWS/commit/3e8b113832ab66e3139a081344fdad0dd38af59d))
|
|
7
|
+
|
|
1
8
|
## [0.3.10](https://github.com/l4rm4nd/PyADRecon-ADWS/compare/v0.3.9...v0.3.10) (2026-02-20)
|
|
2
9
|
|
|
3
10
|
|
|
@@ -26,10 +33,3 @@
|
|
|
26
33
|
|
|
27
34
|
* forest support for child domain environments ([1deacd3](https://github.com/l4rm4nd/PyADRecon-ADWS/commit/1deacd355dc4ce58e336a3b72ba758209e24297d))
|
|
28
35
|
|
|
29
|
-
## [0.3.6](https://github.com/l4rm4nd/PyADRecon-ADWS/compare/v0.3.5...v0.3.6) (2026-02-19)
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
### Bug Fixes
|
|
33
|
-
|
|
34
|
-
* adjust ace parsing for adcs and fix esc4 detection ([56b91d1](https://github.com/l4rm4nd/PyADRecon-ADWS/commit/56b91d19b2534553b8d1cf672d6a037db780b9b6))
|
|
35
|
-
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: PyADRecon-ADWS
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.11
|
|
4
4
|
Summary: Python Active Directory Reconnaissance Tool (ADRecon port) using ADWS with NTLM support.
|
|
5
5
|
Author: LRVT
|
|
6
6
|
License-Expression: MIT
|
|
@@ -53,7 +53,7 @@ pyadrecon_adws --version
|
|
|
53
53
|
````
|
|
54
54
|
|
|
55
55
|
> [!TIP]
|
|
56
|
-
> For Windows,
|
|
56
|
+
> For Windows, may read [this](https://github.com/l4rm4nd/PyADRecon/tree/main/windows). Only NTLM authentication works on Windows atm.
|
|
57
57
|
|
|
58
58
|
## Usage
|
|
59
59
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: PyADRecon-ADWS
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.11
|
|
4
4
|
Summary: Python Active Directory Reconnaissance Tool (ADRecon port) using ADWS with NTLM support.
|
|
5
5
|
Author: LRVT
|
|
6
6
|
License-Expression: MIT
|
|
@@ -53,7 +53,7 @@ pyadrecon_adws --version
|
|
|
53
53
|
````
|
|
54
54
|
|
|
55
55
|
> [!TIP]
|
|
56
|
-
> For Windows,
|
|
56
|
+
> For Windows, may read [this](https://github.com/l4rm4nd/PyADRecon/tree/main/windows). Only NTLM authentication works on Windows atm.
|
|
57
57
|
|
|
58
58
|
## Usage
|
|
59
59
|
|
|
@@ -33,7 +33,7 @@ pyadrecon_adws --version
|
|
|
33
33
|
````
|
|
34
34
|
|
|
35
35
|
> [!TIP]
|
|
36
|
-
> For Windows,
|
|
36
|
+
> For Windows, may read [this](https://github.com/l4rm4nd/PyADRecon/tree/main/windows). Only NTLM authentication works on Windows atm.
|
|
37
37
|
|
|
38
38
|
## Usage
|
|
39
39
|
|
|
@@ -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.11" # Automatically updated by CI/CD pipeline during release
|
|
73
73
|
BANNER = f"""
|
|
74
74
|
╔═══════════════════════════════════════════════════════════════════
|
|
75
75
|
║ PyADRecon-ADWS {VERSION} - Python AD Reconnaissance Tool (ADWS)
|
|
@@ -294,8 +294,14 @@ def dn_to_fqdn(dn: str) -> str:
|
|
|
294
294
|
|
|
295
295
|
|
|
296
296
|
def sid_to_str(sid_bytes: bytes) -> str:
|
|
297
|
-
"""Convert binary SID to string format.
|
|
297
|
+
"""Convert binary SID to string format.
|
|
298
|
+
Handles both raw bytes and base64-encoded strings."""
|
|
298
299
|
try:
|
|
300
|
+
# Handle base64-encoded strings
|
|
301
|
+
if isinstance(sid_bytes, str):
|
|
302
|
+
import base64
|
|
303
|
+
sid_bytes = base64.b64decode(sid_bytes)
|
|
304
|
+
|
|
299
305
|
if IMPACKET_AVAILABLE:
|
|
300
306
|
return ldaptypes.LDAP_SID(sid_bytes).formatCanonical()
|
|
301
307
|
# Fallback manual parsing
|
|
@@ -758,6 +764,7 @@ class PyADRecon:
|
|
|
758
764
|
self.results: Dict[str, List] = {}
|
|
759
765
|
self.start_time: datetime = datetime.now()
|
|
760
766
|
self._sid_cache: Dict[str, str] = {} # Cache for SID-to-name resolution
|
|
767
|
+
self.domain_sid_to_name: Dict[str, str] = {} # Mapping of domain SIDs to domain names from trusts
|
|
761
768
|
|
|
762
769
|
def connect(self) -> bool:
|
|
763
770
|
"""Establish ADWS connection."""
|
|
@@ -941,8 +948,9 @@ class PyADRecon:
|
|
|
941
948
|
current_domain = self.domain_sid if hasattr(self, 'domain_sid') and self.domain_sid else None
|
|
942
949
|
|
|
943
950
|
if current_domain and sid_domain != current_domain:
|
|
944
|
-
# Cross-domain SID -
|
|
945
|
-
|
|
951
|
+
# Cross-domain SID - try to resolve the domain name
|
|
952
|
+
domain_name = self.domain_sid_to_name.get(sid_domain, "Foreign Domain")
|
|
953
|
+
result = f"[{domain_name}] {well_known_rids[rid]}"
|
|
946
954
|
else:
|
|
947
955
|
result = well_known_rids[rid]
|
|
948
956
|
|
|
@@ -1008,6 +1016,21 @@ class PyADRecon:
|
|
|
1008
1016
|
except Exception as e:
|
|
1009
1017
|
logger.debug(f"Could not resolve SID {sid} in forest root: {e}")
|
|
1010
1018
|
|
|
1019
|
+
# Before returning just the SID, check if it belongs to a known domain
|
|
1020
|
+
if sid.startswith('S-1-5-21-'):
|
|
1021
|
+
parts = sid.split('-')
|
|
1022
|
+
if len(parts) >= 8:
|
|
1023
|
+
# Extract domain SID (everything except the RID)
|
|
1024
|
+
sid_domain = '-'.join(parts[:7])
|
|
1025
|
+
# Check if this domain is in our mapping
|
|
1026
|
+
domain_name = self.domain_sid_to_name.get(sid_domain)
|
|
1027
|
+
if domain_name:
|
|
1028
|
+
# Extract the RID for display
|
|
1029
|
+
rid = parts[-1]
|
|
1030
|
+
result = f"[{domain_name} SID] {sid} (RID: {rid})"
|
|
1031
|
+
self._sid_cache[sid] = result
|
|
1032
|
+
return result
|
|
1033
|
+
|
|
1011
1034
|
# Return SID if resolution failed
|
|
1012
1035
|
result = f"[SID] {sid}"
|
|
1013
1036
|
self._sid_cache[sid] = result
|
|
@@ -1409,13 +1432,16 @@ class PyADRecon:
|
|
|
1409
1432
|
return (enrollment_principals, auto_enrollment_principals, owner_principal)
|
|
1410
1433
|
|
|
1411
1434
|
# Parse each ACE in the DACL
|
|
1435
|
+
logger.debug(f"Parsing {len(sd['Dacl'].aces)} ACEs from security descriptor")
|
|
1412
1436
|
for ace in sd['Dacl'].aces:
|
|
1413
1437
|
try:
|
|
1414
1438
|
# Get SID from ACE
|
|
1415
1439
|
sid = ace['Ace']['Sid'].formatCanonical()
|
|
1440
|
+
logger.debug(f"Processing ACE with SID: {sid}")
|
|
1416
1441
|
|
|
1417
1442
|
# Resolve SID to name
|
|
1418
1443
|
principal_name = self._resolve_sid_to_name(sid)
|
|
1444
|
+
logger.debug(f" Resolved to: {principal_name}")
|
|
1419
1445
|
|
|
1420
1446
|
# Check if this is an ACCESS_ALLOWED_OBJECT_ACE
|
|
1421
1447
|
ace_type = ace['AceType']
|
|
@@ -1478,6 +1504,9 @@ class PyADRecon:
|
|
|
1478
1504
|
logger.debug(f"Error parsing security descriptor: {e}")
|
|
1479
1505
|
import traceback
|
|
1480
1506
|
logger.debug(traceback.format_exc())
|
|
1507
|
+
|
|
1508
|
+
logger.debug(f"Found {len(enrollment_principals)} enrollment principals: {enrollment_principals}")
|
|
1509
|
+
logger.debug(f"Found {len(auto_enrollment_principals)} auto-enrollment principals: {auto_enrollment_principals}")
|
|
1481
1510
|
|
|
1482
1511
|
return (enrollment_principals, auto_enrollment_principals, owner_principal)
|
|
1483
1512
|
|
|
@@ -1557,8 +1586,12 @@ class PyADRecon:
|
|
|
1557
1586
|
# Get domain SID
|
|
1558
1587
|
sid_bytes = get_attr(entry, 'objectSid')
|
|
1559
1588
|
self.domain_sid = sid_to_str(sid_bytes)
|
|
1589
|
+
|
|
1590
|
+
# Map current domain SID to its name for cross-domain resolution
|
|
1591
|
+
domain_name = dn_to_fqdn(self.base_dn)
|
|
1592
|
+
self.domain_sid_to_name[self.domain_sid] = domain_name
|
|
1560
1593
|
|
|
1561
|
-
results.append({"Category": "Name", "Value":
|
|
1594
|
+
results.append({"Category": "Name", "Value": domain_name})
|
|
1562
1595
|
results.append({"Category": "NetBIOS", "Value": get_attr(entry, 'name', '')})
|
|
1563
1596
|
results.append({"Category": "Functional Level", "Value": f"{func_level}Domain"})
|
|
1564
1597
|
results.append({"Category": "DomainSID", "Value": self.domain_sid})
|
|
@@ -3347,11 +3380,25 @@ class PyADRecon:
|
|
|
3347
3380
|
search_base=self.base_dn,
|
|
3348
3381
|
search_filter='(objectCategory=trustedDomain)',
|
|
3349
3382
|
attributes=['distinguishedName', 'trustPartner', 'trustDirection', 'trustType',
|
|
3350
|
-
'trustAttributes', 'whenCreated', 'whenChanged']
|
|
3383
|
+
'trustAttributes', 'whenCreated', 'whenChanged', 'securityIdentifier']
|
|
3351
3384
|
)
|
|
3352
3385
|
|
|
3353
3386
|
for entry in entries:
|
|
3354
3387
|
|
|
3388
|
+
# Get the trusted domain's SID and build mapping
|
|
3389
|
+
trusted_domain_sid_bytes = get_attr(entry, 'securityIdentifier')
|
|
3390
|
+
trusted_domain_name = get_attr(entry, 'trustPartner', '')
|
|
3391
|
+
|
|
3392
|
+
if trusted_domain_sid_bytes and trusted_domain_name:
|
|
3393
|
+
try:
|
|
3394
|
+
# Convert SID to string format (handles both bytes and base64 strings)
|
|
3395
|
+
trusted_domain_sid = sid_to_str(trusted_domain_sid_bytes)
|
|
3396
|
+
# Store mapping for SID resolution
|
|
3397
|
+
self.domain_sid_to_name[trusted_domain_sid] = trusted_domain_name
|
|
3398
|
+
logger.debug(f"Mapped trusted domain SID {trusted_domain_sid} to {trusted_domain_name}")
|
|
3399
|
+
except Exception as e:
|
|
3400
|
+
logger.debug(f"Failed to map trusted domain SID: {e}")
|
|
3401
|
+
|
|
3355
3402
|
trust_dir = get_attr(entry, 'trustDirection', 0)
|
|
3356
3403
|
trust_type = get_attr(entry, 'trustType', 0)
|
|
3357
3404
|
trust_attrs = get_attr(entry, 'trustAttributes', 0)
|
|
@@ -4196,6 +4243,13 @@ class PyADRecon:
|
|
|
4196
4243
|
def collect_certificate_templates(self) -> List[Dict]:
|
|
4197
4244
|
"""Collect AD Certificate Services certificate templates."""
|
|
4198
4245
|
logger.info("[-] Collecting ADCS Certificate Templates...")
|
|
4246
|
+
|
|
4247
|
+
# Warn if querying from child domain - ACLs may be incomplete
|
|
4248
|
+
if hasattr(self, 'forest_root_dn') and self.forest_root_dn != self.base_dn:
|
|
4249
|
+
logger.warning("[!] Connected to child domain - certificate template ACLs may be incomplete!")
|
|
4250
|
+
logger.warning(" For complete ACL data, connect to forest root DC instead.")
|
|
4251
|
+
logger.warning(f" Forest root: {dn_to_fqdn(self.forest_root_dn)}")
|
|
4252
|
+
|
|
4199
4253
|
results = []
|
|
4200
4254
|
|
|
4201
4255
|
try:
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
# PyADRecon-ADWS on Windows
|
|
2
2
|
|
|
3
|
-
A guide for running **PyADRecon-ADWS** on Windows systems using either
|
|
3
|
+
A guide for running **PyADRecon-ADWS** on Windows systems using either an executable or Python.
|
|
4
4
|
|
|
5
5
|
>[!CAUTION]
|
|
6
|
-
>PyADRecon-ADWS.py as well as
|
|
6
|
+
>PyADRecon-ADWS.py as well as a standalone executable may be flagged by AV/EDR software.
|
|
7
7
|
|
|
8
8
|
---
|
|
9
9
|
|
|
@@ -45,7 +45,7 @@ The following ports must be accessible on the Domain Controller:
|
|
|
45
45
|
|
|
46
46
|
## Quick Start
|
|
47
47
|
|
|
48
|
-
### Using the
|
|
48
|
+
### Using the executable
|
|
49
49
|
|
|
50
50
|
#### NTLM Authentication
|
|
51
51
|
```powershell
|
|
@@ -97,14 +97,6 @@ klist
|
|
|
97
97
|
|
|
98
98
|
## Installation Methods
|
|
99
99
|
|
|
100
|
-
### Using Pre-built Executable
|
|
101
|
-
|
|
102
|
-
No installation required. Simply download and run `pyadrecon_adws.exe`.
|
|
103
|
-
|
|
104
|
-
See [Quick Start](#quick-start) for usage examples.
|
|
105
|
-
|
|
106
|
-
---
|
|
107
|
-
|
|
108
100
|
### Running with Python
|
|
109
101
|
|
|
110
102
|
For development, testing, or custom builds.
|
|
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
|
{pyadrecon_adws-0.3.10 → pyadrecon_adws-0.3.11}/PyADRecon_ADWS.egg-info/dependency_links.txt
RENAMED
|
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
|