GPEN Password Attacks and Formats Practice Question
A penetration tester has obtained a hash from a Linux system's /etc/shadow file: $6$rounds=656000$XyZ123$... The tester wants to crack this hash using John the Ripper. Which format should be specified to John to ensure correct cracking?
⚠ Common exam trap
The trap here is assuming that any Linux shadow hash uses the same format, ignoring the $ prefix that specifies the algorithm.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
--format=sha512crypt
The hash begins with $6$, which is the identifier for SHA-512 crypt. John the Ripper's format for this is sha512crypt. The other formats correspond to different algorithms (bcrypt, md5crypt, descrypt) that do not match the $6$ prefix. Therefore, specifying sha512crypt is necessary for successful cracking.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
--format=bcrypt
Why it's wrong here
Bcrypt hashes typically start with $2a$, $2b$, or $2y$. The $6$ prefix is not bcrypt. Using this format would cause John to misinterpret the hash and likely fail to crack it. Bcrypt is a different algorithm, so this is incorrect.
- ✓
--format=sha512crypt
Why this is correct
The hash prefix $6$ indicates SHA-512 crypt, which is the default for many Linux systems. John the Ripper uses the format name sha512crypt for this. Specifying this format ensures John applies the correct algorithm and iteration count (rounds). This is the correct choice for the given hash.
- ✗
--format=md5crypt
Why it's wrong here
MD5 crypt hashes start with $1$. The given hash starts with $6$, which is SHA-512 crypt. MD5crypt is weaker and uses a different algorithm. Specifying this format would result in errors or no cracks. Therefore, this is not the correct format.
- ✗
--format=descrypt
Why it's wrong here
DES crypt hashes are typically 13 characters long and do not have a $ prefix. The given hash has a $6$ prefix, indicating SHA-512 crypt. Descrypt is outdated and uses a different structure. Using this format would not work for the hash. Hence, it is incorrect.
About these practice questions
This GPEN question is part of Courseiva's 298-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →
JA
Written and reviewed by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
Last reviewed September 2026 · checked against the official GIAC exam blueprint
This GPEN practice question is part of Courseiva's free GIAC certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the GPEN exam.