CS656 LAB 1.1: Brute-force Attack using the OpenSSL Library 1/3

CS 656 LAB 1.1 Brute-force Attack using the OpenSSL Library

Notes:

• That is a person lab.

• The code and different solutions you submit MUST be completely your personal work, and you’re certain by the WSU Tutorial Integrity Coverage (https://www.wichita.edu/ about/student_conduct/ai.php). You MAY seek the advice of with different college students about the conceptualization of the duties and the which means of the questions, however you MUST NOT have a look at any a part of another person’s answer or collaborate with anybody. It’s possible you’ll seek the advice of revealed references, supplied that you simply appropriately cite them in your experiences and applications, as you’d do in a tutorial paper.

• Learn the whole doc rigorously earlier than you begin engaged on the lab.

GOOD LUCK!

1 Overview

The training goal of this lab is to get acquainted with the ideas in the symmetric and discover ways to program using the OpenSSL crypto library.

Lab Surroundings. This lab has been examined on Ubuntu 20.04. You may be given entry to the distant Ubuntu surroundings with mandatory packages put in. You may additionally run your personal digital machine by downloading it from the SEED labs web site (see the particulars right here: https://github.com/ seed-labs/seed-labs/blob/grasp/manuals/vm/seedvm-manual.md).

2 Submission

Submit a PDF doc along with your solutions to the questions on this lab. Your report ought to have a subheading for every Question Assignment, and your solutions ought to be inside the corresponding subheading. If relevant, record the necessary code snippets adopted by clarification. Merely attaching code with none clarification is not going to obtain credit.

Be aware: Your report should include your Title (Lastname, Firstname) and WSU ID. Use the following format to your report’s PDF filename: lab1 1 report YOUR WSU ID.pdf. For instance, in case your ID is C656S656, your report ought to be lab1 1 report c656s656.pdf. Use the following filename format to your program: lab1 1 YOUR WSU ID.. For instance, for those who use C and your WSU ID is C656S656, your supply file can be lab1 1 c656s656.c. There’s a 10% discount of factors in case your report/submissions file don’t observe the right filename format and/or lacking identify/ID inside the doc.

three Lab Process: Brute-force Attack using the Crypto Library

On this lab, you’re given a plaintext and a ciphertext, and your job is to search out the key that’s used for the encryption. You do know the following information:

https://www.wichita.edu/about/student_conduct/ai.php
https://www.wichita.edu/about/student_conduct/ai.php
https://github.com/seed-labs/seed-labs/blob/grasp/manuals/vm/seedvm-manual.md
https://github.com/seed-labs/seed-labs/blob/grasp/manuals/vm/seedvm-manual.md
CS656 LAB 1.1: Brute-force Attack using the OpenSSL Library 2/three

• The aes-128-cbc cipher is used for the encryption.

• The important thing used to encrypt this plaintext is an English phrase shorter than 16 characters; the phrase could be discovered from a typical English dictionary. Since the phrase has lower than 16 characters (i.e. 128 bits), pound indicators (#: hexadecimal worth is 0x23) are appended to the finish of the phrase to kind a key of 128 bits.

Your purpose is to write down a program to search out out the encryption key. You’re given the following information: plaintext.txt ciphertext.txt iv.txt wordlist.txt

Notes:

• On this process, you’re supposed to write down your personal program to invoke the crypto library. No credit score will likely be given for those who merely use the openssl instructions to do that process. Pattern code could be discovered from the following URL:

https://www.openssl.org/docs/man1.1.1/man3/EVP_CipherInit.html

• While you compile your code using gcc, don’t forget to incorporate the -lcrypto flag, as a result of your code wants the crypto library. See the following instance for the code filename bfattack.c:

$ gcc -o bfattack bfattack.c -lcrypto

• You need to use the starter C file from Lab 1 (i.e., task4 starter bfattack.c)

• You’re allowed to make use of any programming language to finish this process.

Deliverable. In your report carry out the following actions and reply the questions. Clearly mark Question Assignment numbers.

1. Draw a flowchart of the answer. [20 Points]

2. Current an algorithmic workflow of your answer. The algorithm have to be aligned with the flowchart you developed in Step 1. Embrace feedback in your algorithm that clearly marks every of the steps. Be aware: straight borrowed pseudocode from the class lecture will observe obtain any factors. [40 Points]

three. What number of search operations you want in the worst-case to search out the key? Justify your reply with the flowchart and algorithms you developed in the earlier steps. [20 Points]

four. Embrace (a) your code, (b) transient clarification of your implementation, and (c) the secret key that you simply discovered. [10 Points]

5. Present a screenshot of your terminal output exhibiting the command to run the code in addition to the key your discovered. [5 Points]

6. Submit the code file with right filename format. To obtain full credit score, each your report and code file have to be submitted. [5 Points]

CS656 LAB 1.1: Brute-force Attack using the OpenSSL Library three/three

Copyright © 2022 Monowar Hasan. This doc is adopted from Dr. Sergio Salinas Monroy and origninally primarily based on the SEED Labs developed by Dr. Wenliang Du. The contents of this doc are licensed beneath a Inventive Commons Attribution-NonCommercial-ShareAlike four.zero Worldwide License. A human-readable abstract of (and never an alternative to) the license is the following: You’re free to repeat and redistribute the materials in any medium or format. You have to give applicable credit score. Should you remix, rework, or construct upon the materials, you could distribute your contributions beneath the similar license as the authentic. It’s possible you’ll not use the materials for industrial functions.

Overview
Submission
Lab Process: Brute-force Attack using the Crypto Library

Published by
Medical
View all posts