1

In Immersive Labs lab "Password Hashes II"

What is the plaintext password of 'hash part 1' in the shadow file?

shadow.txt contains:

part1:$6$WJ9Y7LHr$S3SdnPsXhCzHetPz0CL6TL7gZdeVK/8DZjWvWuKss7gh8CR1VHkwbJyBufg19.4igURrZ6KkZ1rpErbmRnErl0:1001:1001::/home/part1:/bin/bash

part2:$6$OiSz6xnZ$ajXWPNxlLIKlxxoQJrOPnY/YvY7b2HXK9AMF.vbUiRsd4Gj717XGI2XWVIG1IQ5/kk3wG5RNnzck4nZObvrXn.:1002:1002::/home/part2:/bin/bash

part3:$6$hv6ZhFAI$KPhisFWkOD0YNzseYrp6A0FJUqGn1eeOGV6iZ97GBCrfgb9Dhm.8O96WMiftKJG4VZBSQfXvYJoRHRhdpEM4j1:1003:1003::/home/part3:/bin/bash

I've tried

root@password-hashes-2:~/Desktop# john --format=Raw-MD5 --wordlist=/usr/share/wordlists/rockyou.txt shadow.txt 
Using default input encoding: UTF-8
No password hashes loaded (see FAQ)
root@password-hashes-2:~/Desktop# 

Any advice?

========

From Immersive Labs:

In this lab, you must crack the three salted hashes contained within ‘shadow.txt’, located on the desktop. There are many tools available for hash cracking; one such tool is John The Ripper (John). To crack the hashes using John, you need to use the ‘rockyou’ wordlist, found within ‘/usr/share/wordlists’. The following syntax can be used to crack the hashes with John, using a wordlist. Follow the link below for more information on John The Ripper.

john --wordlist=/usr/share/wordlist/mywordlist.txt --format=raw-md5 Downloads/hashes.txt

2 Answers 2

3

I think the problem is that you're setting the --format to raw-MD5, while the$6$ at the beginning of the hash tells you it is a hash of type SHA512 crypt .

Here is what the numbers at the beginning of the hash mean:

$1$ is MD5
$2a$ is Blowfish
$2y$ is Blowfish
$5$ is SHA-256
$6$ is SHA-512

john should be able to detect this automatically if you do not use the --format option, but if it does not work set --format=sha512crypt

0
0

john --wordlists=/usr/share/wordlists/mywordlist.txt --format=raw sha512crypt Downloads/hashes.txt This will reveal the answers.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .