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

Method getLSA

examples/dpapi.py:81–92  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

79 self.dpapiSystem['UserKey'] = unhexlify(userKey[2:])
80
81 def getLSA(self):
82 localOperations = LocalOperations(self.options.system)
83 bootKey = localOperations.getBootKey()
84
85 lsaSecrets = LSASecrets(self.options.security, bootKey, None, isRemote=False, history=False, perSecretCallback = self.getDPAPI_SYSTEM)
86
87 lsaSecrets.dumpSecrets()
88
89 # Did we get the values we wanted?
90 if 'MachineKey' not in self.dpapiSystem or 'UserKey' not in self.dpapiSystem:
91 logging.error('Cannot grab MachineKey/UserKey from LSA, aborting...')
92 sys.exit(1)
93
94 def run(self):
95 if self.options.action.upper() == 'MASTERKEY':

Callers 1

runMethod · 0.95

Calls 4

getBootKeyMethod · 0.95
dumpSecretsMethod · 0.95
LocalOperationsClass · 0.90
LSASecretsClass · 0.90

Tested by

no test coverage detected