Skip to content

Commit 3d57d43

Browse files
authored
Update README with CheckWritableAttributesADUsers details
Added usage instructions for CheckWritableAttributesADUsers script in both Python and PowerShell.
1 parent 88ea1a9 commit 3d57d43

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

README.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@ PowerShell-Scripts/
4242
│ └── test_shares_read_write.ps1
4343
│ └── analyze_gpo3.ps1 (imports modules: GroupPolicy)
4444
│ └── lan_audit_full2.ps1
45+
│ └── CheckWritableAttributesADUsers.py (Python, PowerShell version is below)
46+
│ └── CheckWritableAttributesADUsers.ps1 (is the PowerShell equivalent of Python file above)
4547
└── README.md
4648
```
4749

@@ -434,3 +436,29 @@ Use like so, first get domains from tenant:
434436
Results piped to all_domains.txt which we will feed into the script like so:
435437

436438
`.\domains2ipsipv4Only.ps1 -InputPath all_domains.txt -OutputPath ips.txt`
439+
440+
---
441+
### `CheckWritableAttributesADUsers.py|.ps1`
442+
443+
The Python svcript uses strictly LDAP3 to enumerate the AD users (use the -dc-ip parameter to specify your Domain Controller IP).
444+
Then it will attempt to write "temp" to attributes to determine if any is writeable.
445+
Although not the most elegent solution - it works! It will write a users.cvs file, which should only contain your own AD account-any others are worhty of ivestigation!
446+
Use like so:
447+
448+
`python3 CheckWritableAttributesADUsers.py DOMAIN/mcontestabile:'XXX' -dc-ip 1.2.3.4`
449+
450+
The PowerShell version does the same thing - but with a twist.
451+
Firstly, it will try to use ADWS first before falling back to LDAP.
452+
Secondly, it also produces a ADUsers.csv output file but it contains the "WriteableAttributes" for each user.
453+
Users with excessive permissions will stand out!
454+
455+
Use with parameters and it will use your current Windows account. You can specify like so:
456+
`-Dc 1.2.0.10 -Out investigate_UsersPS.csv`
457+
458+
or specify other creds like so:
459+
`$cred = Get-Credential domain\otheruser
460+
.\CheckWritableAttributesADUsers.ps1 -Credential $cred`
461+
462+
Use `-PageSize 200` for large directories.
463+
464+

0 commit comments

Comments
 (0)