forked from snovvcrash/PPN
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
eec6b3f
commit 833b464
Showing
13 changed files
with
152 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -158,7 +158,7 @@ MATCH (u:User {hasspn:true}), (c:Computer), p=shortestPath((u)-[*1..]->(c)) RETU | |
|
||
{% embed url="https://youtu.be/o3W4H0UfDmQ" %} | ||
|
||
There're 2 global dicts in JSON files: `data` and `meta`. We need `data`: | ||
There're 2 global dicts in JSON files: `data` and `meta`. We care about `data`: | ||
|
||
```json | ||
$ cat 20220604031239_users.json | jq '. | keys' | ||
|
@@ -186,13 +186,13 @@ List user accounts whose passwords were set after their last logon (an effective | |
cat 20220604031239_users.json | jq '.data[].Properties | select(.enabled == true and .pwdlastset > .lastlogontimestamp) | .name + " :: " + (.lastlogontimestamp | tostring)' -r | ||
``` | ||
|
||
List user accounts with `DoesNotRequirePreAuth` set ([asreproastable](/pentest/infrastructure/ad/roasting.md#asreproasting)): | ||
List user accounts with `DoesNotRequirePreAuth` set (aka [asreproastable](/pentest/infrastructure/ad/roasting.md#asreproasting)): | ||
|
||
``` | ||
cat 20220604031239_users.json | jq '.data[].Properties | select(.enabled == true and .dontreqpreauth == true) | .name' -r | ||
``` | ||
|
||
List user accounts with SPN(s) set ([kerberoastable](/pentest/infrastructure/ad/roasting.md#kerberoasting)) | ||
List user accounts with SPN(s) set (aka [kerberoastable](/pentest/infrastructure/ad/roasting.md#kerberoasting)) | ||
|
||
``` | ||
cat 20220604031239_users.json | jq '.data[].Properties | select(.enabled == true and .serviceprincipalnames != []) | .name + " :: " + (.serviceprincipalnames | join(","))' -r | ||
|
@@ -204,18 +204,30 @@ List computer accounts' operating system names: | |
cat 20220604031239_computers.json | jq '.data[].Properties | .name + " :: " + .operatingsystem' -r | ||
``` | ||
|
||
Recursively list all members of a group ([script](https://github.com/penetrarnya-tm/WeaponizeKali.sh/blob/main/misc/get_ad_group_member.py)): | ||
Recursively list all members of a group (mimics RSAT `Get-ADGroupMember`, [script](https://github.com/penetrarnya-tm/WeaponizeKali.sh/blob/main/misc/get_ad_group_member.py)): | ||
|
||
``` | ||
$ ls | ||
20220604043009_computers.json 20220604043009_groups.json 20220604043009_users.json | ||
$ python3 get_ad_group_member.py 'DOMAIN [email protected]' | ||
``` | ||
|
||
Recursively list all groups which the user is a member of ([script](https://github.com/penetrarnya-tm/WeaponizeKali.sh/blob/main/misc/get_ad_user_memberof.py)): | ||
Recursively list all groups which the user is a member of (mimics RSAT `Get-ADUser | select memberof`, [script](https://github.com/penetrarnya-tm/WeaponizeKali.sh/blob/main/misc/get_ad_user_memberof.py)): | ||
|
||
``` | ||
$ ls | ||
20220604043009_groups.json 20220604043009_users.json | ||
$ python3 get_ad_user_memberof.py '[email protected]' | ||
``` | ||
|
||
Generate a `.csv` file containing AD trusts mapping to be used in [TrustVisualizer](https://github.com/snovvcrash/TrustVisualizer) (mimics PowerView `Get-DomainTrustMapping`, [script](https://github.com/penetrarnya-tm/WeaponizeKali.sh/blob/main/misc/get_domain_trust_mapping.py)): | ||
|
||
``` | ||
$ ls | ||
20220604043009_domains.json | ||
$ python3 get_domain_trust_mapping.py | ||
``` | ||
|
||
|
||
|
||
### PowerView / SharpView | ||
|
@@ -475,6 +487,7 @@ Detect stale, unused or fake computer accounts based on password age (replace `- | |
$date = [DateTime]::Today.AddDays(-90); Get-ADComputer -Filter '(Enabled -eq $true) -and (PasswordLastSet -le $date)' | select Name | ||
``` | ||
|
||
Administrative Tier Model explained: | ||
Administrative Tier Model & Microsoft RaMP (Zero Trust **Ra**pid **M**odernization **P**lan): | ||
|
||
* [https://security-tzu.com/2020/03/23/mitigate-credential-theft-with-administrative-tier-model/](https://security-tzu.com/2020/03/23/mitigate-credential-theft-with-administrative-tier-model/) | ||
* [https://www.secframe.com/ramp/](https://www.secframe.com/ramp/) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
# Network | ||
|
||
* [https://github.com/frostbits-security/MITM-cheatsheet](https://github.com/frostbits-security/MITM-cheatsheet) | ||
- [https://github.com/frostbits-security/MITM-cheatsheet](https://github.com/frostbits-security/MITM-cheatsheet) | ||
- [https://xakep.ru/author/necreas1ng/](https://xakep.ru/author/necreas1ng/) | ||
- [https://xakep.ru/2021/08/25/stp-yersinia/](https://xakep.ru/2021/08/25/stp-yersinia/) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# API Hooking | ||
|
||
- [https://www.ired.team/offensive-security/code-injection-process-injection/how-to-hook-windows-api-using-c++](https://www.ired.team/offensive-security/code-injection-process-injection/how-to-hook-windows-api-using-c++) | ||
- [https://www.malwaretech.com/2015/01/inline-hooking-for-programmers-part-1.html](https://www.malwaretech.com/2015/01/inline-hooking-for-programmers-part-1.html) | ||
- [https://www.malwaretech.com/2015/01/inline-hooking-for-programmers-part-2.html](https://www.malwaretech.com/2015/01/inline-hooking-for-programmers-part-2.html) | ||
|
||
|
||
|
||
|
||
## Examples | ||
|
||
|
||
|
||
### C++ | ||
|
||
- [https://github.com/mgeeky/ShellcodeFluctuation/blob/master/ShellcodeFluctuation/main.cpp](https://github.com/mgeeky/ShellcodeFluctuation/blob/master/ShellcodeFluctuation/main.cpp) | ||
- [https://github.com/snovvcrash/VeraCryptThief/blob/main/VeraCryptThiefDll/veracryptthief.cpp](https://github.com/snovvcrash/VeraCryptThief/blob/main/VeraCryptThiefDll/veracryptthief.cpp) | ||
|
||
|
||
|
||
### C\# | ||
|
||
- [https://gist.github.com/NaxAlpha/144d1dd96c7d0ad29fe149e4063a8f25](https://gist.github.com/NaxAlpha/144d1dd96c7d0ad29fe149e4063a8f25) | ||
|
||
|
||
|
||
|
||
## Tools | ||
|
||
- [https://github.com/CCob/MinHook.NET](https://github.com/CCob/MinHook.NET) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters