@@ -91,6 +91,11 @@ def __init__(self,config):
91
91
if self .config .outputFile is not None :
92
92
smbConfig .set ('global' ,'jtr_dump_path' ,self .config .outputFile )
93
93
94
+ if self .config .dumpHashes is True :
95
+ smbConfig .set ("global" , "dump_hashes" , "True" )
96
+ else :
97
+ smbConfig .set ("global" , "dump_hashes" , "False" )
98
+
94
99
if self .config .SMBServerChallenge is not None :
95
100
smbConfig .set ('global' , 'challenge' , self .config .SMBServerChallenge )
96
101
@@ -373,6 +378,9 @@ def SmbSessionSetup(self, connId, smbServer, recvPacket):
373
378
authenticateMessage ['ntlm' ])
374
379
client .sessionData ['JOHN_OUTPUT' ] = ntlm_hash_data
375
380
381
+ if self .server .getDumpHashes ():
382
+ LOG .info (ntlm_hash_data ['hash_string' ])
383
+
376
384
if self .server .getJTRdumpPath () != '' :
377
385
writeJohnOutputToFile (ntlm_hash_data ['hash_string' ], ntlm_hash_data ['hash_version' ],
378
386
self .server .getJTRdumpPath ())
@@ -667,6 +675,9 @@ def SmbSessionSetupAndX(self, connId, smbServer, SMBCommand, recvPacket):
667
675
authenticateMessage ['lanman' ], authenticateMessage ['ntlm' ])
668
676
client .sessionData ['JOHN_OUTPUT' ] = ntlm_hash_data
669
677
678
+ if self .server .getDumpHashes ():
679
+ LOG .info (ntlm_hash_data ['hash_string' ])
680
+
670
681
if self .server .getJTRdumpPath () != '' :
671
682
writeJohnOutputToFile (ntlm_hash_data ['hash_string' ], ntlm_hash_data ['hash_version' ],
672
683
self .server .getJTRdumpPath ())
@@ -742,6 +753,9 @@ def SmbSessionSetupAndX(self, connId, smbServer, SMBCommand, recvPacket):
742
753
sessionSetupData ['AnsiPwd' ], sessionSetupData ['UnicodePwd' ])
743
754
client .sessionData ['JOHN_OUTPUT' ] = ntlm_hash_data
744
755
756
+ if self .server .getDumpHashes ():
757
+ LOG .info (ntlm_hash_data ['hash_string' ])
758
+
745
759
if self .server .getJTRdumpPath () != '' :
746
760
writeJohnOutputToFile (ntlm_hash_data ['hash_string' ], ntlm_hash_data ['hash_version' ],
747
761
self .server .getJTRdumpPath ())
0 commit comments