Lab 1: Hashing with OpenSSL

← Back to Week 6

Mission Objectives

Objective 1

Generate an MD5 hash of the file evidence.txt

Use: openssl dgst -md5 evidence.txt
Objective 2

Generate a SHA-1 hash of the same file

Use: openssl dgst -sha1 evidence.txt
Objective 3

Generate a SHA-256 hash of the file

Use: openssl dgst -sha256 evidence.txt
Objective 4

Compare the hash of evidence.txt with tampered.txt to detect tampering

Hash both files with SHA-256 and compare: openssl dgst -sha256 tampered.txt
Objective 5

Use sha256sum to verify file integrity

Use: sha256sum evidence.txt
Objective 6

Demonstrate MD5 collision vulnerability by hashing collision1.bin and collision2.bin

Hash both files with MD5. They have different content but same MD5 hash!
openssl dgst -md5 collision1.bin
openssl dgst -md5 collision2.bin
OpenSSL Terminal - analyst@cyberops-lab
Welcome to the CyberOps Cryptography Lab
Files available: evidence.txt, tampered.txt, collision1.bin, collision2.bin
Type 'help' for available commands or start with Objective 1
analyst@cyberops-lab:~$

LAB COMPLETE!

You've mastered cryptographic hashing with OpenSSL

+25 XP