File tree Expand file tree Collapse file tree 1 file changed +33
-1
lines changed
modules/auxiliary/scanner/nessus Expand file tree Collapse file tree 1 file changed +33
-1
lines changed Original file line number Diff line number Diff line change @@ -110,11 +110,43 @@ def do_login(user='nessus', pass='nessus')
110
110
:active => true ,
111
111
:type => 'password' }
112
112
113
- report_auth_info ( report_hash )
113
+ report_cred (
114
+ ip : datastore [ 'RHOST' ] ,
115
+ port : datastore [ 'RPORT' ] ,
116
+ service_name : 'nessus-xmlrpc' ,
117
+ user : user ,
118
+ password : pass
119
+ )
114
120
return :next_user
115
121
end
116
122
end
117
123
vprint_error ( "FAILED LOGIN. '#{ user } ' : '#{ pass } '" )
118
124
return :skip_pass
119
125
end
126
+
127
+ def report_cred ( opts )
128
+ service_data = {
129
+ address : opts [ :ip ] ,
130
+ port : opts [ :port ] ,
131
+ service_name : opts [ :service_name ] ,
132
+ protocol : 'tcp' ,
133
+ workspace_id : myworkspace_id
134
+ }
135
+
136
+ credential_data = {
137
+ origin_type : :service ,
138
+ module_fullname : fullname ,
139
+ username : opts [ :user ] ,
140
+ private_data : opts [ :password ] ,
141
+ private_type : :password
142
+ } . merge ( service_data )
143
+
144
+ login_data = {
145
+ core : create_credential ( credential_data ) ,
146
+ status : Metasploit ::Model ::Login ::Status ::UNTRIED ,
147
+ } . merge ( service_data )
148
+
149
+ create_credential_login ( login_data )
150
+ end
151
+
120
152
end
You can’t perform that action at this time.
0 commit comments