Lab 2: Symmetric Encryption with AES

← Back to Week 6

Mission Objectives

Objective 1

Create a file called secret.txt with sensitive data

Use: echo "your secret message" > secret.txt
Objective 2

Encrypt the file using AES-256-CBC encryption

Use: openssl enc -aes-256-cbc -salt -in secret.txt -out secret.enc
You'll be prompted for a password. Use: CyberOps2026
Objective 3

View the encrypted file to see it's unreadable

Use: cat secret.enc to see the encrypted binary data
Objective 4

Decrypt the file back to plaintext

Use: openssl enc -d -aes-256-cbc -in secret.enc -out decrypted.txt
Enter the same password: CyberOps2026
Objective 5

Verify the decrypted file matches the original

Use: cat decrypted.txt to view the content
Objective 6

Try decrypting with the wrong password to see authentication failure

Use: openssl enc -d -aes-256-cbc -in secret.enc -out failed.txt
Enter a different password to see the error
Objective 7

Compare AES-128 vs AES-256 by checking key length with openssl enc -aes-128-cbc -P

First try: openssl enc -aes-128-cbc -P -pass pass:test
Then try: openssl enc -aes-256-cbc -P -pass pass:test
Compare the key lengths!
Encryption Terminal - analyst@cyberops-lab
Welcome to the Symmetric Encryption Lab
Learn AES encryption using OpenSSL
Type 'help' for available commands or start with Objective 1
analyst@cyberops-lab:~$

LAB COMPLETE!

You've mastered symmetric encryption with AES

+25 XP