Emdee Five For Life HTB challenge – Walkthrough (MD5)
Please Share this Post
Emdee five for life (MD5) – Difficulty (Easy) – Category (Misc) -[http://94.237.61.170:47415/]
Emdee five for life is a Misc challenge machine on Hack The Box where you are given a string to encrypt in MD5 and submit the hash in the field provided. Now, what is MD5?.
What is MD5?
MD5 (Message Digest Algorithm 5) is a widely used cryptographic hash function that produces a 128-bit (16-byte) hash value, typically represented as a 32-character hexadecimal number. Here’s a breakdown of MD5:
Key Features:
- Hashing: MD5 converts any input (text, file, or other data) into a fixed 128-bit (32-character hexadecimal) hash value.
- Deterministic: The same input always produces the same hash, so it’s often used for verifying file integrity.
- One-way: It’s designed to be irreversible, meaning you cannot retrieve the original data from the MD5 hash alone.
- Sensitive to Small Changes: Even a single-bit change in the input data results in a completely different MD5 hash.
Common Uses:
- Integrity Checks: MD5 hashes are used to verify that files haven’t been tampered with or corrupted. By comparing an original file’s hash with a downloaded file’s hash, you can confirm the file’s integrity.
- Digital Signatures: Often part of digital signature creation, even though more secure hashing algorithms (like SHA-256) are recommended today.
Security Limitations:
MD5 was originally designed for security, but it is no longer considered secure because it is vulnerable to collision attacks (when two different inputs produce the same hash). Due to these vulnerabilities, MD5 is now largely avoided for security-sensitive applications like cryptographic verification and passwords. More secure alternatives like SHA-256 or SHA-3 are recommended instead.
Lets try and solve this challenge using this walkthrough. Now loading the protocol given http://94.237.61.170:47415.
When we load this page it gives us a homepage that looks like this.
Now it tells us to encrypt this string to MD5 and submit the hash value in the field provided there. So lets try and do so now with the kali command line:
echo -n “bVskAdoKNjYjqxp75f3n” | md5sum | awk ‘{print $1}’
As we typed the command line with the string we want to encrypt, it automatically encrypts the string and prints the md5 hash value for us immediately below the command line as it is showed in the image below:
Now lets submit the MD5 hash value as we are told to do.
We got a problem. When we submitted the md5 as told to, we get a display message on the screen Too slow, and the web page generates new string to encrypt again as shown above. We tried same thing to encrypt the new string below, we still got same Too slow message on the screen, and it generates new string again to encrypt, maybe we are not fast enough.
So lets try and see if we could do some research on how to encrypt string to md5 hash and submit the hash value to web request immediately also. So after every research, we got a suggestion that writing a python script that will import hash library for the specific hashing format we want to use to encrypt the string and import request to submit the web request and finally import regular expression to match the pattern of the request. So I wrote a python script to do so below and print the flag.
After writing the script and saved it on my machine as a python file named emdeefive.py. I’ll use the python command line tool to execute the script. So let’s execute the script.
python3 emdeefive.py
As you can see, we got the flag.
HTB{N1c3_ScrIpt1nG_B0i!}
Follow us on
Instagram: cyberguard_solutions
facebook: cyberguardsolutionsservices
LinkedIn: Cyber Guard Solutions Services
Youtube: Hackwithspeck
Leave a Reply