Cyber Range Lab Assignment Report 3
docx
keyboard_arrow_up
School
Southern New Hampshire University *
*We aren’t endorsed by this school
Course
MBA530
Subject
Industrial Engineering
Date
Jan 9, 2024
Type
docx
Pages
14
Uploaded by ericbraxton8
IST 894
Capstone Experience
Cyber Range Lab Assignment Report 3
Page 1
of 14
Table of Contents
1.0
Introduction
........................................................................................................................................
3
2.0
General Context
.................................................................................................................................
3
3.0 Technical Context
...............................................................................................................................
3
4.0 Solution
..............................................................................................................................................
4
5.0 Activity Log
.......................................................................................................................................
13
6.0 References
........................................................................................................................................
14
Page 2
of 14
1.0
Introduction
In this lab, we will utilize the “Ubuntu with Snort and Other Tools” environment within the U.S. Cyber Range. This lab will provide some hands-on experience with cryptography primitives and cipher block modes of operation on a Linux system. Throughout the lab, I will complete two different tasks, the first is to setup the lab environment and install the hex editor software Bless. The second task is comparing block cipher modes of operation.
2.0
General Context
In this lab exercise, I utilized the U.S. Cyber Range, which provides an environment for educators, industry, and others to allow for hands-on cybersecurity training and education to increase the
number of skilled cybersecurity experts across all sectors (
U.S. Cyber Range
, 2020). Inside the lab environment, I used a virtual environment that was running a Linux distribution to install a software package called Bless. This application allows its users to view and manipulate the binary code that makes up an application. Essentially, you can utilize a program like Bless to open, display, and change characters or binary bytes inside any kind of file. During this portion of the lab, I used Bless to inspect the binary code of a simple text file. After viewing the text file in plain text, I encrypted the file using several different encryption methods and viewed the files in Bless to see how the bytes changed depending on the encryption method. It was interesting to see how you can manipulate a single byte and it would have a big impact on the overall file. I then performed the same steps with an image file and had similar results. Manipulating a single byte would corrupt the file.
3.0 Technical Context
For this lab, I utilized the U.S. Cyber Range to get hands-on training with cryptography primitives and cipher block modes of operation on a Linux system. Initially, I logged into the Xubuntu VM and installed the hex editor software called Bless via CLI using sudo apt-get
. Once the hex editor Page 3
of 14
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
- Access to all documents
- Unlimited textbook solutions
- 24/7 expert homework help
was installed, navigated to the student directory, and used the wget
command to download the lab3.tgz file from the Virginia Cyber Range and then used the tar
command to unzip the files. Once the files were unzipped in the correct directory, I then encrypted the file using openssl
. I was able to use the --help flag, which provided all the cipher types available natively within openssl. I performed a test encryption using 128-bit AES in Cypher-Block Chaining (CBC) mode, which displayed the contents of the file in binary. I then decrypted the file, which changed it back to plain text. Essentially, the first half
of the lab was setting up the environment and performing a test encryption and decryption.
In the second half of the lab, I compared different block cipher modes of operation using CLI to encrypt a file called shapes.bmp. The different encryption methods were electronic codebook (ECB), cyber block chaining (CBC), cipher feedback mode (CFB), and output feedback mode (OFB). Once the files were encrypted via CLI with the different methods, I then analyzed them using Bless to increment the first character of the 40
th
byte and then decrypted the file to see how much the file was changed or corrupted. It was interesting to utilize an image viewer, in this lab we used Ristretto, to see how the shapes.bmp file changed when the 40
th
byte was manipulated.
4.0 Solution
4.1 – Initial Setup
I started this lab by simply logging into my Xubuntu VM with the following credentials.
Username: student
Password: student
Figure 4-1: Student Login
Page 4
of 14
4.2 – Task 1: Lab Setup
The first step of Task 1 was to install Bless via Linux CLI using the command sudo apt-get install bless --force -yes
. Bless is a binary (hex) editor that enables you to edit files as a sequence of bytes written for the GNOME desktop (
Bless
, 2020).
Figure 4-2: Bless Install
In order to launch the newly installed application from the previous step, simply type the command bless
, and the application will launch.
Page 5
of 14
Figure 4-3: Launching Bless
In this step of the lab I downloaded and unzipped the files required for the lab. The files were located in
the artifacts of the Virginia Cyber Range. The commands I used to navigate to the appropriate directory,
download and unzip the files were:
cd /home/student
wget http://artifacts.virginiacyberrange.net/crypto/lab3.tgz
tar –zxvf lab3.tgz
cd lab3
Page 6
of 14
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
- Access to all documents
- Unlimited textbook solutions
- 24/7 expert homework help
Figure 4-4: Virginia Cyber Range Files
I then utilized the tool, openssl, which is used for encryption and decryption using a variety of encryption algorithms and modes. I used the command openssl enc - -help
to view the different command line options for openssl.
Figure 4-5: OpenSSL Help Options
I then used the command openssl enc –aes-128-cbc –e –in test_message.txt –out test_aes_128_cbc.bin \-k 00112233445566778899aabbccddeeff \-iv 0102030405060708
to encrypt the file located at /home/student/lab3/test_message.txt using 128-bit AES in Cypher-block Chaining (CBC) mode.
Figure 4-6: OpenSSL AES Encryption
I confirmed the contents of the file was encrypted by running the command, which only showed binary data. openssl enc –aes-128-cbc –d –in test_aes_128_cbc.bin –out test_message2.txt \-k 00112233445566778899aabbccddeeff \-iv 0102030405060708
Page 7
of 14
Figure 4-7: OpenSSL Encryption Confirmation
4.3 – Task 2: Comparing Block Cipher Modes of Operation
In this task, I used the openssl utility to encrypt an image file utilizing two different block cipher modes of operation and compared the results.
In the first part of the task, I am viewing the contents of the shapes.bmp image file using the Ristretto Image Viewer.
Figure 4-8: Shapes.bmp in Ristretto
Once I was able to view the image above, I used the openssl tool to encrypt the shapes.bmp image using 128-AES in electronic codebook (ECB) mode and renamed the output shapes_aes-128-ecb.bmp. The command I used to run this was openssl enc –aes-128-ecb –e –in shapes.bmp –out shapes_aes_128_ecb.bmp \-k 00112233445566778899aabbccddeeff \-iv 0102030405060708. I then confirmed the contents of the folder by running the command ls -l
. This confirms that shapes_aes_128_ecb.bmp exists.
Page 8
of 14
Figure 4-9: Shapes.bmp AES Encryption
You can see in the application Bless that the first image below, shapes.bmp is not encrypted, while the second image it, and starts with ‘Salted’.
Figure 4-10: Shapes.bmp in Bless
Page 9
of 14
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
- Access to all documents
- Unlimited textbook solutions
- 24/7 expert homework help
Figure 4-11: Shapes.bmp AES 128-bit
In the next portion of the lab, I encrypted the plain.txt file using 128-bit AES with CBC using the command openssl enc –aes-128-ecb –e –in plain.txt –out plain_aes_128_ecb.txt \-k 00112233445566778899aabbccddeeff \-iv 0102030405060708. You can see in the first image that the contents of the plain.txt file did not change, repeating the line “This is a test plain text message.” The next image is the plain_aes_128_ecb.txt encrypted file where the contents are encrypted and cannot be read.
Page 10
of 14
Figure 4-12: Plain.txt in Bless
Figure 4-13: Plain.txt in AES 128 ECB
I then changed the value of the first character in the 40
th
byte, which you can see changed the contents of
the text file. By changing a single byte, it only corrupts the file in a small area. However, changing several bytes could corrupt the file to a point that it was not legible.
Page 11
of 14
Figure 4-14: Plain.txt – 40
th
Byte Change
CBC Mode – changing the 40
th
bit from 42 to 70
Figure 4-14: Plain.txt – 40
th
Byte Change
Page 12
of 14
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
- Access to all documents
- Unlimited textbook solutions
- 24/7 expert homework help
Figure 4-15: After Changing 40
th
Byte
After changing the bit, you can see the document was substantially changed.
Figure 4-16: After Changing 40
th
Byte
Repeating the same steps as above and changing the 40
th
byte while in CBC Mode, CFB Mode, and OFB
Mode all changed the layout of the file, some more drastic than others. This exercise does a good job demonstrating the cipher feedback and output feedback modes and how changing a single byte can greatly impact the overall file.
5.0 Activity Log
5.1 - Member Log
Page 13
of 14
Member Name Task Date
Task Details
Eric Braxton
9/25/2021
Completed all lab steps and lab report.
6.0 References
Author Unknown. (2021). Bless. Retrieved on 25 September 2021 from: https://community.linuxmint.com/software/view/bless#:~:text=Bless%20is%20a%20binary%20(hex,*
%20Multilevel%20undo%20%2D%20redo%20operations
.
Block Cipher Modes of Operation. Retrieved on 25 September 2021 from: https://cryptography.fandom.com/wiki/Block_cipher_modes_of_operation
Gilberto, G. (2018). Web Penetration Testing with Kali Linux: Block Cipher Modes. Retrieved on September 25, 2021 from: https://www.oreilly.com/library/view/web-penetration-testing/9781788623377/d849c011-13a2-480f-
b155-b5722007e837.xhtml
Halo Linux Services (2020). Looking at File Internals with the Bless Editor. Retrieved on 25 September 2021 from https://www.halolinux.us/assembly-programming/looking-at-file-internals-with-the-bless-
editor.html
U.S. Cyber Range (2020). About the U.S. Cyber Range. Retrieved on 14 September 2021 from https://www.uscyberrange.org/about
Page 14
of 14