Saturday, September 24, 2016

hashcat fastest password/hash cracking

hashcat utilizes  gpu power to crack hash and password, the more powerful the gpu the faster the cracking speed.

1- install hashcat
$ sudo apt-get install hashcat 

2- cracking md5 hash
- you can generate md5 hash with openssl, below, is the md5 hash of 12abc
$ echo -e -n "12abc" | openssl md5
(stdin)= 42c56c61ee49c16375960c809c6a3eb0


- crack the hash above
$ hashcat -a 3 -m 0 42c56c61ee49c16375960c809c6a3eb0
hashcat (v3.00) starting...

OpenCL Platform #1: NVIDIA Corporation 
======================================
- Device #1: GeForce GTX 750 Ti, 511/2047 MB allocatable, 5MCU
Session.Name...: hashcat
Status.........: Exhausted
Input.Mode.....: Mask (?1?2?2?2) [4]
Hash.Target....: 42c56c61ee49c16375960c809c6a3eb0
Hash.Type......: MD5
Time.Started...: 0 secs
Speed.Dev.#1...:  6208.9 kH/s (0.85ms)
Recovered......: 0/1 (0.00%) Digests, 0/1 (0.00%) Salts
Progress.......: 2892672/2892672 (100.00%)
Rejected.......: 0/2892672 (0.00%)

42c56c61ee49c16375960c809c6a3eb0:12abc                   
                                                         
Session.Name...: hashcat
Status.........: Cracked
Input.Mode.....: Mask (?1?2?2?2?2) [5]
Hash.Target....: 42c56c61ee49c16375960c809c6a3eb0
Hash.Type......: MD5
Time.Started...: 0 secs
Speed.Dev.#1...: 71358.8 kH/s (0.77ms)
Recovered......: 1/1 (100.00%) Digests, 1/1 (100.00%) Salts
Progress.......: 34045440/104136192 (32.69%)
Rejected.......: 0/34045440 (0.00%)
Restore.Point..: 506880/1679616 (30.18%)

Started: Sat Sep 24 11:32:15 2016
Stopped: Sat Sep 24 11:32:18 2016


so it take on 3 seconds to crack 5 string-lenght hash

3- cracking sha1 hash
- generate sha1 hash string
$ echo -e -n "12abc" | openssl sha1
(stdin)= 2809f5614d4b6b0c4e1bb4c3f67ef361c7ef7281


- crack the hash above with the following command
$ hashcat -a 3 -m 100 2809f5614d4b6b0c4e1bb4c3f67ef361c7ef7281

2809f5614d4b6b0c4e1bb4c3f67ef361c7ef7281:12abc           
                                                         
Session.Name...: hashcat
Status.........: Cracked
Input.Mode.....: Mask (?1?2?2?2?2) [5]
Hash.Target....: 2809f5614d4b6b0c4e1bb4c3f67ef361c7ef7281
Hash.Type......: SHA1
Time.Started...: 0 secs
Speed.Dev.#1...: 64208.4 kH/s (0.72ms)
Recovered......: 1/1 (100.00%) Digests, 1/1 (100.00%) Salts
Progress.......: 33331200/104136192 (32.01%)
Rejected.......: 0/33331200 (0.00%)
Restore.Point..: 522240/1679616 (31.09%)

Started: Sat Sep 24 11:29:54 2016
Stopped: Sat Sep 24 11:29:57 2016 


- snapshot of cpu and gpu utilization
gpu: watch -n 1 nvidia-smi
cpu: htop

No comments:

Post a Comment