Добро пожаловать! Это — архивная версия форумов на «Хакер.Ru». Она работает в режиме read-only.
 

Уязвимости сервера DC++

Пользователи, просматривающие топик: none

Зашли как: Guest
Все форумы >> [В Сети] >> Уязвимости сервера DC++
Имя
Сообщение << Старые топики   Новые топики >>
Уязвимости сервера DC++ - 2009-02-02 20:45:50.073333   
Vanusha

Сообщений: 334
Оценки: 0
Присоединился: 2008-12-04 23:30:31.720000
Приветствую всех. Гугл не очень помогает. Кто знает отпишитесь кто знает какие уязвимости могут быть в сервере DC++ как его можно выключить перезагрузить добавить учетку модера… воообщем все что связано в DC просьба отписать, кто што знает!
Post #: 1
RE: Уязвимости сервера DC++ - 2009-02-16 02:33:36.680000   
mr_resect

Сообщений: 62
Оценки: 0
Присоединился: 2009-01-21 17:28:43.330000
DDoSe!!!111one
Post #: 2
RE: Уязвимости сервера DC++ - 2009-02-16 05:19:15.130000   
z00MAN

Сообщений: 18
Оценки: 0
Присоединился: 2009-02-14 18:30:37.080000
verlihub &lt;=0.9.8d-RC2 remote r00t / command execution
== verlihub &lt;=0.9.8d-RC2 remote r00t / command execution ======================= | ' / | /__ ___ ( / \\--`-'-|`---\\ | |' _/ ` __/ / '._ V ,--' '_:_._/ description:-------------------------------------------------------------------- "Verlihub is a Direct Connect protocol server; runs on Linux OS; written in C++." -- &lt;http://www.verlihub-project.org/&gt; Verlihub does not sanitize user input passed to the shell via its "trigger" mechanism. Furthermore, the Verlihub daemon can optionally be configured to run as root. This allows for the arbitrary execution of commands by users connected to the hub and, in the case of the daemon running as root, complete commandeering of the machine. -- Code Listing: src/ctrigger.cpp : cTrigger::DoIt() ------------------- 106 string command(buf); : 107 filename = server.mConfigBaseDir; ,: 108 filename.append("/tmp/trigger.tmp"); | / \ | 109 command.append(" &gt; "); \_\\ //_/ 110 command.append(filename); .'/()\'. 111 cout &lt;&lt; command &lt;&lt; endl; \\ // 112 system(command.c_str()); ------------------------------------------------------------------------ vulnerability check:------------------------------------------------------------ # grep allow_exec /etc/verlihub/dbconfig allow_exec = 1 or # grep allow_exec $HOME/.verlihub/dbconfig allow_exec = 1 exploit:------------------------------------------------------------------------ 1. Connect to a hub with user triggers allowed and set up to accept arguments; 2. Run a trigger with a specially crafted argument, e.g.: +&lt;trigger&gt; `cat /etc/passwd` where &lt;trigger&gt; is the name of the trigger. 3. ... patch:-------------------------------------------------------------------------- $ diff src/ctrigger.cpp src/ctrigger.cpp.new 9a10 &gt; #include &lt;stdio.h&gt; 19a21,33 &gt; void strip( char * str, char c ) &gt; { &gt; char * p1 = str; &gt; while ( *p1++ ) &gt; if( *p1 == c ) &gt; { &gt; char * p2 = p1; &gt; while( *p2 && *p2 == c ) { ++p2; } &gt; if(*p2) { *p1 = *p2; *p2 = c; } &gt; else { *p1 = '\0'; break; } &gt; } &gt; } &gt; 107,114c121,145 &lt; filename = server.mConfigBaseDir; &lt; filename.append("/tmp/trigger.tmp"); &lt; command.append(" &gt; "); &lt; command.append(filename); &lt; cout &lt;&lt; command &lt;&lt; endl; &lt; system(command.c_str()); &lt; buf = ""; &lt; if (!LoadFileInString(filename,buf)) return 0; --- &gt; char buffer[ 1024 ]; &gt; FILE * stream; &gt; buf = ""; &gt; char * cmd = command.c_str(); &gt; &gt; strip( cmd, ';' ); strip( cmd, '\"' ); &gt; strip( cmd, '\'' ); strip( cmd, '\\' ); &gt; strip( cmd, '`' ); strip( cmd, ':' ); &gt; strip( cmd, '!' ); strip( cmd, '$' ); &gt; strip( cmd, '{' ); strip( cmd, '}' ); &gt; strip( cmd, '[' ); strip( cmd, ']' ); &gt; strip( cmd, '&' ); strip( cmd, '&gt;' ); &gt; strip( cmd, '&lt;' ); strip( cmd, '|' ); &gt; strip( cmd, '~' ); strip( cmd, '/' ); &gt; &gt; cout &lt;&lt; cmd &lt;&lt; endl; &gt; stream = popen( cmd, "r" ); &gt; if ( stream == NULL ) &gt; perror( NULL ); &gt; else &gt; while( fgets( buffer, 1024, stream ) &gt; != NULL ) &gt; buf.append( buffer ); &gt; if ( pclose( stream ) == -1 ) &gt; perror( NULL ); == eof ======================================== by v4lkyrius at gmail dot com ==
Post #: 3
Страниц:  [1]
Все форумы >> [В Сети] >> Уязвимости сервера DC++







Связаться:
Вопросы по сайту / xakep@glc.ru

Предупреждение: использование полученных знаний в противозаконных целях преследуется по закону.