File tree Expand file tree Collapse file tree 1 file changed +33
-8
lines changed
modules/post/windows/gather/credentials Expand file tree Collapse file tree 1 file changed +33
-8
lines changed Original file line number Diff line number Diff line change @@ -120,6 +120,32 @@ def check_other(filename)
120
120
end
121
121
end
122
122
123
+ def report_cred ( opts )
124
+ service_data = {
125
+ address : opts [ :ip ] ,
126
+ port : opts [ :port ] ,
127
+ service_name : opts [ :service_name ] ,
128
+ protocol : 'tcp' ,
129
+ workspace_id : myworkspace_id
130
+ }
131
+
132
+ credential_data = {
133
+ post_reference_name : self . refname ,
134
+ session_id : session_db_id ,
135
+ origin_type : :session ,
136
+ private_data : opts [ :password ] ,
137
+ private_type : :password ,
138
+ username : opts [ :user ]
139
+ } . merge ( service_data )
140
+
141
+ login_data = {
142
+ core : create_credential ( credential_data ) ,
143
+ status : Metasploit ::Model ::Login ::Status ::UNTRIED ,
144
+ } . merge ( service_data )
145
+
146
+ create_credential_login ( login_data )
147
+ end
148
+
123
149
def get_ini ( filename )
124
150
config = client . fs . file . new ( filename , 'r' )
125
151
parse = config . read
@@ -142,14 +168,13 @@ def get_ini(filename)
142
168
else
143
169
source_id = nil
144
170
end
145
- report_auth_info (
146
- :host => host ,
147
- :port => port ,
148
- :sname => 'ftp' ,
149
- :source_id => source_id ,
150
- :source_type => "exploit" ,
151
- :user => username ,
152
- :pass => passwd
171
+
172
+ report_cred (
173
+ ip : host ,
174
+ port : port ,
175
+ service_name : 'ftp' ,
176
+ user : username ,
177
+ password : passwd
153
178
)
154
179
end
155
180
end
You can’t perform that action at this time.
0 commit comments