Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Computer Before Delegation #1690

Merged
merged 1 commit into from
Feb 8, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions impacket/examples/ntlmrelayx/attacks/ldapattack.py
Original file line number Diff line number Diff line change
Expand Up @@ -1105,11 +1105,6 @@ def run(self):
if dns_name_ok and dns_ipaddr_ok:
self.addDnsRecord(name, ipaddr)

# Perform the Delegate attack if it is enabled and we relayed a computer account
if self.config.delegateaccess and self.username[-1] == '$':
self.delegateAttack(self.config.escalateuser, self.username, domainDumper, self.config.sid)
return

# Add a new computer if that is requested
# privileges required are not yet enumerated, neither is ms-ds-MachineAccountQuota
if self.config.addcomputer is not None:
Expand All @@ -1124,6 +1119,11 @@ def run(self):
self.addComputer(computerscontainer, domainDumper)
return

# Perform the Delegate attack if it is enabled and we relayed a computer account
if self.config.delegateaccess and self.username[-1] == '$':
self.delegateAttack(self.config.escalateuser, self.username, domainDumper, self.config.sid)
return

# Perform the Shadow Credentials attack if it is enabled
if self.config.IsShadowCredentialsAttack:
self.shadowCredentialsAttack(domainDumper)
Expand Down
Loading