Public Hash Cracker programming help
#1
Hello,

I need some code and database optimization tips. I'm trying to make a custom public hash cracker, just for LinkedIn hashes.

Functions:
- adding multiple passwords to the database at once
- downloading all uncracked hashes
- downloading cracked password list

I already did a beta version in PHP and MySQL, but database calls are really slow. They take about 4 seconds each, because the database has 6.5 million rows.

My VPS server:

- Ubuntu server x64
- Intel i7 2,93GHz (1 core only)
- 2GB RAM

Database table:
- id - INT(11)
- sha1 - VARCHAR(40)
- plain - TEXT

The current SQL query for adding passwords is:
PHP Code:
UPDATE linkedin SET plain='".$plains[$i]."' WHERE substring(sha1,6,40LIKE substring(SHA1('".$plains[$i]."'),6,40
*substring(sha1,6,40) is used because of possible 00000 prefixes
*the query gets executed in a for loop for each new password, is there a faster solution?

What can i do to optimise my application? Thank you so much!
Reply
#2
Well done for getting this far fizikalac.

I am really looking forward to this, I can't wait to get it going. I have been storing up my founds for a good few days now !! Smile

I know a few others who will join in when its up, we are all waiting in the background !
Reply
#3
deliver hourly cached data. Are you sure there is no SQLi in there? Also using = instead of like. You also could try not to store the hashes in hex.
Reply
#4
(06-13-2012, 09:54 PM)undeath Wrote: deliver hourly cached data. Are you sure there is no SQLi in there? Also using = instead of like. You also could try not to store the hashes in hex.

Thanks! = instead of LIKE was really an obvious one Smile How can I store the hashes in binary?
Reply
#5
Use 5 int columns to store the hashes.
Reply