Skip to content

Ositadim/Encryption-and-Decryption

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 

Repository files navigation

Encryption and Decryption Screenshot of Lab

image

Skills Demonstrated

  • Linux (Command Line)
  • Navigating directories and files (ls, cd, cat)
  • Working with hidden files

Executing security-related commands in a Linux environment 🔐 OpenSSL

  • Decrypting AES-256-CBC encrypted files
  • Using secure key derivation (-pbkdf2)
  • Handling Base64-encoded encrypted data
  • Verifying successful decryption through file inspection

Cryptographic Hashing

  • Generating SHA-256 hash values with sha256sum
  • Understanding file integrity and tamper detection
  • Comparing hash outputs manually using cmp
  • Identifying file changes through hash mismatches

Identity & Access Management (IAM)

  • Analyzing authentication and authorization controls
  • Reviewing event logs to identify suspicious user activity

MODULE 2 — Decrypt an encrypted message (Linux commands) ##Assets, Threats, and Vulnerabilities Task 1: Read the contents of a file

  • List files in the home directory and Read the instructions in README.txt image

Task 2: Find and decrypt a hidden file Change to the caesar subdirectory, list all files, including hidden files and to view the contents of the hidden file.

image

Decrypt the Caesar cipher (left shift by 3)

image

Return to the home directory

image

The tr command remaps letters to reverse the Caesar cipher.

Task 3: Decrypt the encrypted file Decrypt the encrypted file using the revealed OpenSSL command image

Confirm the decrypted file exists and Read the decrypted message

image

Note: Flags explained -a → Base64 encoded input -d → Decrypt -pbkdf2 → Secure key derivation

Activity overview 2 As a security analyst, you’ll need to implement security controls to protect organizations against a range of threats. That’s where hashing comes in. Previously, you learned that a hash function is an algorithm that produces a code that can’t be decrypted. Hash functions are used to uniquely identify the contents of a file so that you can check whether it has been modified. This code provides a unique identifier known as a hash value or digest. For example, a malicious program may mimic an original program. If one code line is different from the original program, it produces a different hash value. Security teams can then identify the malicious program and work to mitigate the risk. Many tools are available to compare hashes for various scenarios. But for a security analyst it’s important to know how to manually compare hashes. In this lab activity, we’ll create hash values for two files and use Linux commands to manually examine the differences. Code: MODULE 2 — Create hash values (Linux commands)

Task 1: Generate hashes for files List the contents of the home directory

  • ls

Display the contents of file1.txt

  • cat file1.txt Display the contents of file2.txt
  • cat file2.txt

Generate a SHA-256 hash for file1.txt

  • sha256sum file1.txt

Generate a SHA-256 hash for file2.txt

  • sha256sum file2.txt
image

Task 2: Compare hashes Generate the hash for file1.txt and save it to file1hash

  • sha256sum file1.txt >> file1hash

Generate the hash for file2.txt and save it to file2hash

  • sha256sum file2.txt >> file2hash
image

Display the contents of the hash files

  • cat file1hash
  • cat file2hash
image

. Compare the two hash files byte by byte cmp file1hash file2hash

  • If the files differ, cmp reports the exact location of the mismatch.
image

Manual Practice on the use of cryptography, encryption and #Hashing in protecting data or information.

image

image

image

About

A hands-on cybersecurity and cryptography project demonstrating encryption, decryption, and hashing techniques, including substitution and columnar transposition ciphers, Linux-based decryption, and SHA-1/SHA-256 hashing, to protect data and verify integrity.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors