mirror of
https://github.com/mgeeky/Penetration-Testing-Tools.git
synced 2025-09-02 01:58:33 +02:00
Dropped a bunch of various scripts.
This commit is contained in:
1
red-teaming/Find-GPODelegatedUsers.ps1
Normal file
1
red-teaming/Find-GPODelegatedUsers.ps1
Normal file
@ -0,0 +1 @@
|
||||
Get-NetGPO | %{Get-ObjectAcl -ResolveGUIDs -Name $_.Name} | %{$acl=$_; $a=[string]$acl.IdentityReference; $b=$a.Substring($a.IndexOf("\")+1); $c=$null; $c=Get-NetUser "$b"; If ($c -ne $null -And $c.userprincipalname -like "*") { $dn=$acl.ObjectDN; If($dn -match 'CN=({[0-9A-F\-]+}),.+'){ $cn=$matches[1]; $gpo=Get-NetGPO -GPOname "$cn"; Write-Output "User: $b / $($c.userprincipalname) - delegated to GPO: $($gpo.displayname)"}}}
|
@ -66,6 +66,8 @@ Loaded $StealthUserHunterShowAll results.
|
||||
Loaded $UserHunterShowAll results.
|
||||
```
|
||||
|
||||
- **`Find-GPODelegatedUsers.ps1`** - One-liner for finding GPO Delegated users that can Edit Settings of that GPO and thus could be used to Abuse GPO Permissions (https://www.harmj0y.net/blog/redteaming/abusing-gpo-permissions/). [gist](https://gist.github.com/mgeeky/5843df09607123772a61e782a6406d54)
|
||||
|
||||
- **`generateMSBuildPowershellXML.py`** - Powershell via MSBuild inline-task XML payload generation script - To be used during Red-Team assignments to launch Powershell payloads without using `powershell.exe` ([gist](https://gist.github.com/mgeeky/df9f313cfe468e56c59268b958319bcb))
|
||||
|
||||
Example output **not minimized**:
|
||||
|
Reference in New Issue
Block a user