@@ -339,7 +339,7 @@ def smb_cmd_session_setup(c, buff, esn)
339
339
begin
340
340
smb_get_hash ( smb , arg , true )
341
341
rescue ::Exception => e
342
- print_status ( "SMB Capture - Error processing Hash from #{ smb [ :name ] } - #{ smb [ :ip ] } : #{ e . class } #{ e } #{ e . backtrace } " )
342
+ print_error ( "SMB Capture - Error processing Hash from #{ smb [ :name ] } - #{ smb [ :ip ] } : #{ e . class } #{ e } #{ e . backtrace } " )
343
343
end
344
344
345
345
smb_error ( CONST ::SMB_COM_SESSION_SETUP_ANDX , c , CONST ::SMB_STATUS_LOGON_FAILURE , true )
@@ -401,7 +401,7 @@ def smb_cmd_session_setup(c, buff, esn)
401
401
smb_get_hash ( smb , arg , false )
402
402
403
403
rescue ::Exception => e
404
- print_status ( "SMB Capture - Error processing Hash from #{ smb [ :name ] } : #{ e . class } #{ e } #{ e . backtrace } " )
404
+ print_error ( "SMB Capture - Error processing Hash from #{ smb [ :name ] } : #{ e . class } #{ e } #{ e . backtrace } " )
405
405
end
406
406
407
407
smb_error ( CONST ::SMB_COM_SESSION_SETUP_ANDX , c , CONST ::SMB_STATUS_LOGON_FAILURE , true )
@@ -528,16 +528,17 @@ def smb_get_hash(smb, arg = {}, esn=true)
528
528
529
529
print_status ( capturelogmessage )
530
530
531
+ lm_text = lm_hash + lm_cli_challenge . to_s ? lm_hash + lm_cli_challenge . to_s : "00" * 24
532
+ nt_text = nt_hash + nt_cli_challenge . to_s ? nt_hash + nt_cli_challenge . to_s : "00" * 24
533
+ pass = "#{ smb [ :domain ] } :#{ lm_text } :#{ nt_text } :#{ datastore [ 'CHALLENGE' ] . to_s } "
534
+
531
535
# DB reporting
532
536
report_auth_info (
533
537
:host => smb [ :ip ] ,
534
538
:port => datastore [ 'SRVPORT' ] ,
535
539
:sname => 'smb_challenge' ,
536
540
:user => smb [ :username ] ,
537
- :pass => smb [ :domain ] + ":" +
538
- ( lm_hash + lm_cli_challenge . to_s ? lm_hash + lm_cli_challenge . to_s : "00" * 24 ) + ":" +
539
- ( nt_hash + nt_cli_challenge . to_s ? nt_hash + nt_cli_challenge . to_s : "00" * 24 ) + ":" +
540
- datastore [ 'CHALLENGE' ] . to_s ,
541
+ :pass => pass ,
541
542
:type => smb_db_type_hash ,
542
543
:proof => "NAME=#{ smb [ :nbsrc ] } DOMAIN=#{ smb [ :domain ] } OS=#{ smb [ :peer_os ] } " ,
543
544
:source_type => "captured" ,
0 commit comments