Hello, brilliant learner! 👋
You have come a long way! In Module 1, we learned what John is. In Module 2, we installed it. In Module 3, we made it smarter with wordlists and rules. Now it is time to make John faster and more powerful.
In this module, we will learn how to crack complex passwords like ZIP files, PDFs, and even Windows passwords. We will also learn how to use John’s advanced features like session management and GPU acceleration.
Think of this as upgrading your car from a standard engine to a turbocharged one. Let’s go! 🏎️💨
After this module, you will be able to:
Kofi has become the best key-maker in Cyberville. But he faces new challenges. People bring him complex locks – some from cars, some from safes, and some from computers.
Kofi upgrades his workshop. He adds a turbo machine that can try keys much faster. He also adds a memory bank that remembers which keys he has tried. Now he can crack even the toughest locks.
That is exactly what we will do with John. We will add speed, memory, and the ability to crack complex locks like ZIP files and Windows passwords.
Let’s upgrade our John workshop! 🛠️🚀
Definition: A session is a record of John’s work, including which passwords have been tried.
Why it is important: If John is interrupted, you can resume from where you stopped.
Simple explanation: Like saving a video game so you can continue later.
Real‑life example: You save a document so you don’t lose your work.
School example: You save your homework on a USB drive.
Home example: You save a movie to watch later.
Nigerian example: You save a transaction receipt.
Illustration (ASCII):
$ john --session=mycrack hashfile.txt
(John saves progress to mycrack.rec)
(If interrupted, resume with:)
$ john --restore=mycrack
Mini summary: Sessions let you save and resume John’s work.
Definition: The pot file is where John stores cracked passwords.
Why it is important: It prevents John from cracking the same password again.
Simple explanation: Like a notebook where you write down solved puzzles.
Real‑life example: You keep a list of phone numbers.
School example: You keep a glossary of new words.
Home example: You keep a list of your passwords (securely!).
Nigerian example: You keep a list of important dates.
Illustration (ASCII):
john.pot (pot file)
+----------------------------------+
| chidi:5f4dcc3b5aa765d61d832... |
| bola:7c6a180b36896a0a8c... |
| tunde:6d7b3e1b2c3d... |
+----------------------------------+
Mini summary: The pot file remembers cracked passwords.
Definition: Incremental mode is John’s brute‑force mode that tries every possible combination.
Why it is important: It can crack any password, but it is very slow.
Simple explanation: Like trying every key in the world.
Real‑life example: A locksmith trying every key on a giant keyring.
School example: You try every possible answer in a multiple‑choice test.
Home example: You try every possible combination to unlock your phone.
Nigerian example: You try every possible PIN at an ATM.
Illustration (ASCII):
$ john --incremental hashfile.txt
John tries:
a, b, c, ..., aa, ab, ..., aaa, ...
(This can take days or years!)
Mini summary: Incremental mode tries all combinations.
Definition: ZIP files are compressed folders that can be password-protected.
Why it is important: Many people use ZIP passwords, and John can crack them.
Simple explanation: Like a locked briefcase.
Real‑life example: You download a ZIP file with homework.
School example: Your teacher sends you a ZIP with notes.
Home example: You save photos in a ZIP file.
Nigerian example: A company sends files in a ZIP.
Illustration (ASCII):
Step 1: Convert ZIP to hash:
$ zip2john secret.zip > zip.hash
Step 2: Crack with John:
$ john --wordlist=wordlist.txt zip.hash
Mini summary: John can crack ZIP passwords using zip2john.
Definition: PDF files can also be password-protected.
Why it is important: John can crack them to recover lost passwords.
Simple explanation: Like a locked document.
Real‑life example: A confidential report is password-protected.
School example: A teacher sends a PDF with exam answers.
Home example: A bank statement is a PDF.
Nigerian example: A legal document is a PDF.
Illustration (ASCII):
Step 1: Convert PDF to hash:
$ pdf2john secret.pdf > pdf.hash
Step 2: Crack with John:
$ john --wordlist=wordlist.txt pdf.hash
Mini summary: John can crack PDF passwords using pdf2john.
Definition: Windows stores passwords as NT hashes.
Why it is important: Many computers use Windows, so we need to crack these hashes.
Simple explanation: Like a special lock used by Windows.
Real‑life example: Your school computer runs Windows.
School example: The lab computers use Windows.
Home example: Your family PC runs Windows.
Nigerian example: Many offices use Windows.
Illustration (ASCII):
Windows NT hash example:
Password: "hello"
NT hash: 8846f7eaee8fb117ad06bdd830b7586c
(32 characters)
Crack with:
$ john --format=nt --wordlist=wordlist.txt nt.hash
Mini summary: John can crack Windows NT hashes.
Definition: GPU stands for Graphics Processing Unit – it is the part of your computer that handles graphics.
Why it is important: GPUs are very fast at certain calculations, making John much faster.
Simple explanation: Like adding a turbo engine to your car.
Real‑life example: Gamers use GPUs for better graphics.
School example: A school computer with a good GPU.
Home example: Your gaming console has a GPU.
Nigerian example: A video editor uses a GPU.
Illustration (ASCII):
CPU: 100 tries/sec
GPU: 1,000,000 tries/sec
John with GPU is MUCH faster!
(Requires special build of John)
Mini summary: GPUs can make John extremely fast.
Definition: Optimisation means making John run as fast as possible.
Why it is important: Faster cracking saves time.
Simple explanation: Like cleaning your car to make it faster.
Real‑life example: You close unnecessary apps on your phone.
School example: You organise your desk to work faster.
Home example: You clean the kitchen to cook faster.
Nigerian example: A trader organises goods to sell faster.
Illustration (ASCII):
Tips for speed:
+ Use GPU if available
+ Use a smaller wordlist if you know the password pattern
+ Use --format to avoid detection delays
+ Use --session to save progress
+ Use --fork to use multiple CPU cores
Mini summary: Optimisation makes John faster.
Definition: The --fork option uses multiple CPU cores to crack faster.
Why it is important: Modern computers have multiple cores, and John can use them all.
Simple explanation: Like having many workers instead of one.
Real‑life example: A factory with many machines.
School example: Many students working on a project.
Home example: Many family members cleaning the house.
Nigerian example: Many traders in a market.
Illustration (ASCII):
$ john --fork=4 --wordlist=wordlist.txt hashfile.txt
This uses 4 CPU cores to crack faster.
Mini summary: --fork uses multiple CPU cores.
Definition: Linux stores passwords in the /etc/shadow file as hashes.
Why it is important: Many servers run Linux, and we may need to test their security.
Simple explanation: Like the Windows lock, but for Linux.
Real‑life example: A web server runs Linux.
School example: The school server may run Linux.
Home example: A Raspberry Pi runs Linux.
Nigerian example: A bank’s server may run Linux.
Illustration (ASCII):
shadow file example:
user:$6$salt$hash:...
Crack with:
$ john --format=sha512crypt shadow.txt
Mini summary: John can crack Linux shadow hashes.
Definition: RAR files are compressed files that can have passwords.
Why it is important: Some people use RAR instead of ZIP.
Simple explanation: Another type of locked briefcase.
Real‑life example: A friend sends you a RAR file.
School example: Your teacher sends a RAR with notes.
Home example: You download a RAR file.
Nigerian example: A company uses RAR for files.
Illustration (ASCII):
Step 1: Convert RAR to hash:
$ rar2john secret.rar > rar.hash
Step 2: Crack with John:
$ john --wordlist=wordlist.txt rar.hash
Mini summary: John can crack RAR passwords.
Definition: A security audit is a test to find weaknesses.
Why it is important: John helps companies find weak passwords.
Simple explanation: Like a fire drill to test safety.
Real‑life example: A company hires a security team to test their systems.
School example: The school tests its computer lab.
Home example: You test your Wi‑Fi password.
Nigerian example: A bank conducts a security audit.
Illustration (ASCII):
Audit process:
1. Collect hashes
2. Run John with wordlists and rules
3. Analyse results
4. Report weak passwords
5. Recommend improvements
Mini summary: John is a key tool in security audits.
Definition: Ethical considerations are rules about right and wrong.
Why it is important: Advanced cracking can be used for harm, so we must be careful.
Simple explanation: Like having superpowers – use them for good.
Real‑life example: A doctor uses skills to heal, not harm.
School example: You use knowledge to help others.
Home example: You use tools to fix things, not break them.
Nigerian example: You use a car to transport, not to race dangerously.
Illustration (ASCII):
Ethical Use:
+ Always have permission
+ Only crack your own or authorised systems
+ Report vulnerabilities responsibly
+ Never use cracked passwords for harm
Mini summary: Always use advanced cracking ethically.
Definition: Performance tips are ways to make John run better.
Why it is important: They save time and resources.
Simple explanation: Like using the right tool for the job.
Real‑life example: You use a calculator for math.
School example: You use a highlighter for important notes.
Home example: You use a fast kettle for tea.
Nigerian example: You use a generator during a power cut.
Illustration (ASCII):
Performance Tips:
1. Use --format to skip detection
2. Use --fork to use multiple cores
3. Use GPU if available
4. Use a targeted wordlist
5. Use --session to save progress
Mini summary: Performance tips make John faster.
Definition: An advanced user can crack complex passwords and optimise John.
Why it is important: You are now ready for real‑world challenges.
Simple explanation: Like becoming a master chef.
Real‑life example: A senior security analyst.
School example: The top student in the class.
Home example: A parent who can fix anything.
Nigerian example: A master tailor.
Illustration (ASCII):
Advanced John User:
+ Can crack any hash format
+ Uses sessions and pot files
+ Optimises with GPU and forks
+ Cracks ZIP, PDF, RAR, and more
+ Acts ethically
+ Helps others stay secure
Mini summary: You are now an advanced John user!
--fork uses multiple CPU cores.zip2john to extract the hash: zip2john secret.zip > zip.hash.rockyou.txt or a custom list.john --wordlist=rockyou.txt zip.hash.john --wordlist=rockyou.txt --rules zip.hash.john --show zip.hash.Illustration (flowchart):
Start
|
v
Get ZIP file
|
v
zip2john → zip.hash
|
v
Run John with wordlist
|
v
Add rules
|
v
Show results
|
v
End
zip2john.rockyou.txt wordlist is from a 2009 data breach.--fork for multiple cores.zip2john before cracking. --session.--fork and GPU if available.
1996 ── John 1.0 released
2000 ── Added Windows support
2005 ── Added GPU support
2010 ── Added more hash formats
2015 ── Added session management
2024 ── John 1.9 with advanced features
| Mode | Description | Speed | Best for |
|---|---|---|---|
| Wordlist | Uses a dictionary | Fast | Common passwords |
| Rules | Modifies words | Medium | Password variations |
| Incremental | Tries all combinations | Slow | Short passwords |
| GPU | Uses graphics card | Very fast | Large cracking tasks |
Start
|
v
ZIP file (secret.zip)
|
v
zip2john → zip.hash
|
v
Run John with wordlist
|
v
Add rules
|
v
Check results
|
v
Password found? ── Yes ──> Success!
|
No
|
v
Try incremental mode
|
v
End
| File Type | Tool | Format |
|---|---|---|
| ZIP | zip2john | zip |
| pdf2john | ||
| RAR | rar2john | rar |
| Windows | pwdump | nt |
| Linux | unshadow | sha512crypt |
Amazing work! You have completed the fourth module. Here is what we learned:
--fork for multiple cores.You are now an advanced John user! In the next module, we will learn about real‑world penetration testing and how to use John in professional security assessments.
--session=name and --restore=name.--fork?john --fork=4 uses 4 cores.--fork, and optimisation.--________ to use multiple cores.--fork uses multiple cores. (True)--session --save --store zip2john pdf2john rar2john --fork --cores --multi rar2john zip2john pdf2john --restore --resume --continue Match the term on the left with its description on the right.
| Term | Description |
|---|---|
| 1. Session | A. Stores cracked passwords |
| 2. Pot file | B. Saved state of John's work |
| 3. Incremental | C. Used for ZIP files |
| 4. zip2john | D. Brute‑force mode |
| 5. GPU | E. Makes John faster |
Answers: 1‑B, 2‑A, 3‑D, 4‑C, 5‑E
Scenario 1: Kofi has a ZIP file called “secret.zip” that he forgot the password to.
zip2john and then John.)Scenario 2: Ada is running John on a large hash file and it is taking too long.
--fork or GPU.)--session.)Activity: In groups, create a password‑protected ZIP file and then use John to crack it. Share your results and discuss the time taken.
Activity: Create a PDF with a password and crack it using John. Write down the steps you took.
Project: Create a report on how to crack a ZIP file using John. Include the steps, commands, and screenshots (if possible). Also, include a section on ethical considerations.
Assignment: Using John, crack a password‑protected ZIP file provided by your teacher. Submit a report with the password and the time taken.
Challenge: Crack a PDF password that is not in any wordlist. Use incremental mode and time how long it takes. (Hint: use a short password.)
(Answers to Fill-in-the-Blank, True/False, and Multiple Choice are provided within each section.)
--fork significantly improve speed.In Module 5, we will learn about real‑world penetration testing. We will simulate a real security audit, use John in a team, and understand how professionals use John to protect organisations.
Make sure you have John installed and have completed all exercises. See you in Module 5! 🚀
End of Module 4