Government Security
Network Security Resources

Jump to content

Photo

[python] Bmysql - Bruteforce Mysql


  • Please log in to reply
3 replies to this topic

#1 Juza

Juza

    Specialist

  • Sergeant Major
  • 149 posts

Posted 04 October 2007 - 03:28 AM

it's already passed some time since that i post a new python script, here he is a new one, bMySQL (Brute Force MySQL), script objective, Crack Remote User of Target Database from remote Server.

Posted Image

The script have to mods of running which are:
Normal MultiThreading, and, if this is a new tecnique, tell me for i put a name :rolleyes: , multi - multi threding (What!!!You're Kidding Me, Right? :D ), yes it's something like that, of course i will explain.

Comparison:
(Balls and Shoot Exemple, i think is a good one, or not)
:Normal (Non - MultiThread)
Posted Image
:Fast (MultiThraeding)
Posted Image
:Very Fast (Multi - MultiThreading)
Posted Image
Normal Multithreding act like this, create some thraeds an then execute them in the same time, something like this:

Python Ex:
import threadingclass MyThread(threading.Thread):	def __init__(self, func):		threading.Thread.__init__(self)		self.func = func	def run(self):		apply(self.func)def ball1():	for i in range(50):		print 'ball 1 : shoot :',i + 1def ball2():	for i in range(50):		print 'ball 2 : shoot :',i + 1funcs = [ball1,ball2]def main():	nfuncs = range(len(funcs))	print '\n*** MULTIPLE THREADS ***'	threads = []	for i in nfuncs:		t = MyThread(funcs[i])		threads.append(t)	for i in nfuncs:		threads[i].start()	for i in nfuncs:		threads[i].join()	print '*** ALL DONE ***'if __name__ == '__main__':	main()

Output:
ball 2 : shoot : 9ball 1 : shoot : 32ball 1 : shoot : 33ball 1 : shoot : 34ball 1 : shoot : 35ball 1 : shoot : 36ball 1 : shoot : 37ball 1 : shoot : 38ball 1 : shoot : 39ball 2 : shoot : 10ball 2 : shoot : 11ball 2 : shoot : 12ball 2 : shoot : 13

You see is fast but can't run the functions at the same time,
this way just make the script more fast.

Now Multi - Multi Threading, Multi - Multi (Why?), because he puts a thread in a thread, pratical exemple, i have too football balls and i will make 3 shoot, it simple shoots the two balls at the same time, and make the 3 shoots of which balls at the same time.

Python Ex:
import threadingclass MyThread(threading.Thread):	def __init__(self, func):		threading.Thread.__init__(self)		self.func = func	def run(self):		apply(self.func)class BallMyThread(threading.Thread):	def __init__(self, func, ball, i):		threading.Thread.__init__(self)		self.func = func		self.ball = ball		self.i = i	def run(self):		apply(self.func,(self.ball,self.i))def pt(ball,i): print "Ball",ball,": Shoot :",i + 1 def ball1():        threads = []	for i in range(50):		t = BallMyThread(pt,'1',i)		threads.append(t)	for i in range(50):                threads[i].start()def ball2():	threads = []	for i in range(50):		t = BallMyThread(pt,'2',i)		threads.append(t)	for i in range(50):                threads[i].start()                		funcs = [ball1,ball2]def main():	nfuncs = range(len(funcs))	print '\n*** MULTIPLE THREADS ***'	threads = []	for i in nfuncs:		t = MyThread(funcs[i])		threads.append(t)	for i in nfuncs:		threads[i].start()	for i in nfuncs:		threads[i].join()	print '*** ALL DONE ***'if __name__ == '__main__':	main()

Output:
Ball 1 : Shoot : 1Ball 1 : Shoot : 2Ball 2 : Shoot : 1Ball 1 : Shoot : 3Ball 2 : Shoot : 2Ball 1 : Shoot : 4Ball 2 : Shoot : 3Ball 1 : Shoot : 5Ball 2 : Shoot : 4Ball 1 : Shoot : 6Ball 2 : Shoot : 5Ball 1 : Shoot : 7Ball 2 : Shoot : 6

A thread in a thread.

Note: The script was tested in a Pentium 3 800Mhz 512mb Memory, using de simple MultiThread, and in 2min. the script test 24734 passwords, in Multi - MultiThreding the script test 22255, this because of the computer of tests.

Download Log of MultiThreading : MThread.txt
Download Log of Multi - MultiThreading : MMThread.txt

Download Script: bMySQL.py (310 lines of code, 12.537 bytes)

Questions, Erros, just post.
Go to iamjuza.blogspot.com
Follow me twitter.com/iamjuza

The true beginning of our end.


#2 Se7eN

Se7eN

    Sergeant

  • Members
  • 227 posts

Posted 04 October 2007 - 03:44 AM

Ok very nice :D but...does mysql allowed that fast off password testing ?

#3 Juza

Juza

    Specialist

  • Sergeant Major
  • 149 posts

Posted 04 October 2007 - 04:26 AM

Good point, i really don't know, but i will find out.
Go to iamjuza.blogspot.com
Follow me twitter.com/iamjuza

The true beginning of our end.


#4 Juza

Juza

    Specialist

  • Sergeant Major
  • 149 posts

Posted 04 October 2007 - 06:04 AM

I search in MySQL Homepage, and i didn't find nothing in relation to this subject, so, i think mysql allowed.
Go to iamjuza.blogspot.com
Follow me twitter.com/iamjuza

The true beginning of our end.





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users