Hola, bueno el titulo mismo del post lo dice un script en perl para un brute force ...
espero que les guste , comenten sus opiñones o como se podria mejorar .
**********************************************
* MD5CRACKER script [perl] par *..::pr0xXx0r::..* *
**********************************************
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 | #!/usr/bin/perl # md5crack.pl # Usage: # ./md5crack <charset> <mincount> <maxcount> <yourMD5> # nUm/b0 # Ècrit par *..::pr0xXx0r::..* tam I.S.W $ver = "01"; $dbgtmr = "1"; #Intervall of showing the current speed + lastpassword in seconds. if ($dbgtmr<=0){ die "Set dbgtmr to a value >=1 !\n";}; use Digest::MD5 qw(md5_hex); use Time::HiRes qw(gettimeofday); if ($ARGV[0]=~"a") { $alpha = "abcdefghijklmnopqrstuvwxyz";} if ($ARGV[0]=~"A") { $alpha = $alpha. "ABCDEFGHIJKLMNOPQRSTUVWXYZ";} if ($ARGV[0]=~"d") { $alpha = $alpha."1234567890";} if ($ARGV[0]=~"x") { $alpha = $alpha. "!\"\$%&/()=?-.:\\*'-_:.;,";} if ($alpha eq "" or $ARGV[3] eq "") {usage();}; if (length($ARGV[3]) != 32) { die "Désolé, mais il Semble que le MD5 est pas valide!\n";}; print "Selected charset for attack: '$alpha\'\n"; print "Going to Crack '$ARGV[3]'...\n"; for (my $t=$ARGV[1];$t<=$ARGV[2];$t++){ crack ($t); } sub usage{ print "\n\nMD5 Hash Bruteforce Kit v_$ver\n"; print "by unix_chro alias backtrack (311733@yahoo.com)\n"; print "Member in staff leader:elite-members,ubuntu-hackers\n\n"; print "USAGE\n"; print "./md5crack <charset> <mincount> <maxcount> <yourMD5>\n"; print " Charset can be: [aAdx]\n"; print " a = {'a','b','c',...}\n"; print " A = {'A','B','C',...}\n"; print " d = {'1','2','3',...}\n"; print " x = {'!','\"',' ',...}\n"; print "EXAMPLE FOR CRACKING A MD5 HASH\n"; print "./md5crack.pl ad 1 3 900150983cd24fb0d6963f7d28e17f72\n"; print " This example tries to crack the given MD5 with all lowercase Alphas and all digits.\n"; print " MD5 Kit only tries combinations with a length from 1 and 3 characters.\n-------\n"; print "./md5crack.pl aA 3 3 900150983cd24fb0d6963f7d28e17f72\n"; print " This example tries to crack the given MD5 with all lowercase Alphas and all uppercase Alphas.\n"; print " MD5 Kit only tries passwords which length is exactly 3 characters.\n-------\n"; print "./md5crack.pl aAdx 1 10 900150983cd24fb0d6963f7d28e17f72\n"; print " This example tries to crack the given MD5 with nearly every character.\n"; print " MD5 Kit only tries combinations with a length from 1 to 10 characters.\n"; die "Quitting...\n"; } sub crack{ $CharSet = shift; @RawString = (); for (my $i =0;$i<$CharSet;$i++){ $RawString = 0;} $Start = gettimeofday(); do{ for (my $i =0;$i<$CharSet;$i++){ if ($RawString[$i] > length($alpha)-1){ if ($i==$CharSet-1){ print "Bruteforcing done with $CharSet Chars. No Results.\n"; $cnt=0; return false; } $RawString[$i+1]++; $RawString[$i]=0; } } ################################################## # $ret = ""; for (my $i =0;$i<$CharSet;$i++){ $ret = $ret . substr($alpha,$RawString[$i],1);} $hash = md5_hex($ret); $cnt++; $Stop = gettimeofday(); if ($Stop-$Start>$dbgtmr){ $cnt = int($cnt/$dbgtmr); print "$cnt hashes\\second.\tLast Pass '$ret\'\n"; $cnt=0; $Start = gettimeofday(); } print "$ARGV[3] != $hash ($ret)\n"; if ($ARGV[3] eq $hash){ die "\n**** Password Cracked! => $ret\n"; } ################################################## # #checkhash($CharSet)."\n"; $RawString[0]++; }while($RawString[$CharSet-1]<length($alpha)); } sub checkhash{ $CharSet = shift; $ret = ""; for (my $i =0;$i<$CharSet;$i++){ $ret = $ret . substr($alpha,$RawString[$i],1);} $hash = md5_hex($ret); $cnt++; $Stop = gettimeofday(); if ($Stop-$Start>$dbgtmr){ $cnt = int($cnt/$dbgtmr); print "$cnt hashes\\second.\tLast Pass '$ret\'\n"; $cnt=0; $Start = gettimeofday(); } if ($ARGV[3] eq $hash){ die "\n**** Password Cracked! => $ret\n"; } } |
0 comentarios: sobre MD5 CRACKER Script Perl
Publicar un comentario para MD5 CRACKER Script Perl