IMPORTANT:AttackDefense Labs is included with a Pentester Academy subscription! Upgrade Now to access over 1800+ Labs.

Already a Pentester Academy student? Your access will continue uninterrupted. Please use the same Google account to login here.

Not a Pentester Academy student? Try our Free Communitiy Labs

Cracking HMAC-SHA1 key

password-cracking-hashes-basics | Level: Easy  | Total Lab Runs: 0 | Premium Lab

Lab Scoreboard

Lab Walkthrough Video:


The SHA-1 (Secure Hash Algorithm) is a popular 160-bit hash function standardized by NIST in 1991. It was widely used to hash passwords and verify the integrity of files/binaries. However, since 2005 it is not considered secure against adversaries with huge computational resources. It was succeeded by SHA-2.

HMAC is a keyed hash (authenticated hash) scheme which ensures that a specific hash value can only be generated if the entity possess a secret key. This scheme can be used to turn any existing hash function into an authenticated hash function which can be then used to check the authenticity of the message in addition to it integrity. HMAC-SHA1 was widely used in online banking security, HTTPS, VPN connections in addition to verify the integrity of the files/binaries. In essence, it is mostly used to protect the data in transit over insecure mediums. 

A plain-text string and corresponding HMAC-SHA1 digest is provided in digest.txt file. The key used to generate the HMAC-SHA1 is either taken from a key dictionary or by using the key policy. The digest.txt file and the dictionary file "1000000-password-seclists.txt" is present in the user's home directory.

Objective: Recover the secret key. 

If the password file does not work then the Key Policy could be: 
  • Key length is less than 6 characters i.e. 0 < length < 6
  • Key can only contain characters from this character set:  a-z, 0-9

Hashcat needs the input in a specific format.


Verify:
1. Secret Key
 

The following activities are strictly prohibited on this website unless otherwise explicitly stated as allowed in the mission statement:

  • Using automated scanners
  • Using brute force attacks
  • Denial of Service attacks
  • Attacking other student machines in challenges where you might achieve a shell on the vulnerable system
  • Attacking the lab infrastructure

Users violating the above will be either temporarily or permanently banned from the website. 

If you are unsure about an activity, then please contact support to confirm that it is allowed on our website.

Technical Support for this Lab:

There is a reason we provide unlimited lab time: you can take as much time as you need to solve a lab. However, we realize that sometimes hints might be necessary to keep you motivated!

We currently provide technical support limited to:

  • Giving hints for a lab exercise
  • In rare circumstances, if you have totally given up (NO!!!) then tell you how to solve it. This will be limited to sharing the solution video or lab report
  • A lab exercise fails to load or has errors in it

If you need technical support, please email  attackdefense@pentesteracademy.com  clearly mention the name and link of the lab exercise and other essential details. The more descriptive you are, the faster we can help you. We will get back to you within 24 hours or less. 

For adminitrative queries, billing, enterprise accounts etc. please email feedback@binarysecuritysolutions.com