@@ -38,10 +38,15 @@ def run
38
38
session . core . use ( "incognito" ) if not session . incognito
39
39
40
40
# It wasn't me mom! Stinko did it!
41
- hashes = client . priv . sam_hashes
41
+ begin
42
+ hashes = client . priv . sam_hashes
43
+ rescue
44
+ print_error ( 'Error accessing hashes, did you migrate to a process that matched the target\'s architecture?' )
45
+ return
46
+ end
42
47
43
48
# Target infos for the db record
44
- addr = client . sock . peerhost
49
+ addr = session . session_host
45
50
# client.framework.db.report_host(:host => addr, :state => Msf::HostState::Alive)
46
51
47
52
# Record hashes to the running db instance
@@ -59,14 +64,14 @@ def run
59
64
# Build credential information
60
65
credential_data = {
61
66
origin_type : :session ,
67
+ session_id : session_db_id ,
62
68
post_reference_name : self . fullname ,
63
69
private_type : :ntlm_hash ,
64
70
private_data : hash . lanman + ":" + hash . ntlm ,
65
71
username : hash . user_name ,
66
72
workspace_id : myworkspace_id
67
73
}
68
74
69
- credential_data [ :session_id ] = session . db_record . id if !session . db_record . nil?
70
75
credential_data . merge! ( service_data )
71
76
credential_core = create_credential ( credential_data )
72
77
0 commit comments