File tree Expand file tree Collapse file tree 1 file changed +34
-10
lines changed
modules/exploits/windows/http Expand file tree Collapse file tree 1 file changed +34
-10
lines changed Original file line number Diff line number Diff line change @@ -58,6 +58,33 @@ def initialize(info = {})
58
58
] , self . class )
59
59
end
60
60
61
+ def report_cred ( opts )
62
+ service_data = {
63
+ address : opts [ :ip ] ,
64
+ port : opts [ :port ] ,
65
+ service_name : opts [ :service_name ] ,
66
+ protocol : 'tcp' ,
67
+ workspace_id : myworkspace_id
68
+ }
69
+
70
+ credential_data = {
71
+ module_fullname : fullname ,
72
+ post_reference_name : self . refname ,
73
+ session_id : session_db_id ,
74
+ origin_type : :session ,
75
+ private_data : opts [ :password ] ,
76
+ private_type : :password ,
77
+ username : opts [ :user ]
78
+ } . merge ( service_data )
79
+
80
+ login_data = {
81
+ core : create_credential ( credential_data ) ,
82
+ status : Metasploit ::Model ::Login ::Status ::UNTRIED ,
83
+ } . merge ( service_data )
84
+
85
+ create_credential_login ( login_data )
86
+ end
87
+
61
88
def exploit
62
89
print_status ( "Sending request to #{ datastore [ 'RHOST' ] } :#{ datastore [ 'RPORT' ] } " )
63
90
@@ -105,16 +132,13 @@ def exploit
105
132
end
106
133
107
134
# report the auth
108
- auth = {
109
- :host => datastore [ 'RHOST' ] ,
110
- :port => 445 ,
111
- :sname => 'smb' ,
112
- :proto => 'tcp' ,
113
- :user => user ,
114
- :pass => pass ,
115
- :active => true
116
- }
117
- report_auth_info ( auth )
135
+ report_cred (
136
+ ip : datastore [ 'RHOST' ] ,
137
+ port : 445 ,
138
+ service_name : 'smb' ,
139
+ user : user ,
140
+ password : pass
141
+ )
118
142
119
143
srvc = {
120
144
:host => datastore [ 'RHOST' ] ,
You can’t perform that action at this time.
0 commit comments