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

Prevent Attack Replay #1

Merged
merged 1 commit into from
Oct 11, 2021
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
4 changes: 4 additions & 0 deletions impacket/examples/ntlmrelayx/attacks/ldapattack.py
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,9 @@ def addUserToGroup(self, userDn, domainDumper, groupDn):


def shadowCredentialsAttack(self, domainDumper):
if self.config.ShadowCredentialsTarget in delegatePerformed:
LOG.info('Shadow credentials attack already performed for %s, skipping' % self.config.ShadowCredentialsTarget)
return
LOG.info("Searching for the target account")

# Get the domain we are in
Expand Down Expand Up @@ -301,6 +304,7 @@ def shadowCredentialsAttack(self, domainDumper):
LOG.info("A TGT can now be obtained with https://github.com/dirkjanm/PKINITtools")
LOG.info("Run the following command to obtain a TGT")
LOG.info("python3 PKINITtools/gettgtpkinit.py -cert-pfx %s.pfx -pfx-pass %s %s/%s %s.ccache" % (path, password, domain, self.config.ShadowCredentialsTarget, path))
delegatePerformed.append(self.config.ShadowCredentialsTarget)
else:
if self.client.result['result'] == 50:
LOG.error('Could not modify object, the server reports insufficient rights: %s' % self.client.result['message'])
Expand Down