Question: Task 3 : Decrypting an ELF File Problem Statement: You are provided with an ELF file that has been encrypted using AES 1 2 8

Task 3: Decrypting an ELF File
Problem Statement: You are provided with an ELF file that has been encrypted using AES128-CBC. You are to decrypt this file.
Your Specific Inputs:
Encrypted File Name: "437102453_project_1_task3_enc_file.elf"
Output File Name: "437102453_project_1_task3_dec_file.elf"
Key: "4ad369022f630c2b"
Your Student ID: 437102453
Python Code Snippet:from Crypto.Cipher import AES
def decrypt_aes_cbc(encrypted_file, key, iv):
cipher = AES.new(key, AES.MODE_CBC, iv)
with open(encrypted_file, 'rb') as f:
encrypted_data = f.read()
decrypted_data = cipher.decrypt(encrypted_data)
return decrypted_data
if __name__=="__main__":
key = b''
iv = b''
encrypted_file_path =""
decrypted_data = decrypt_aes_cbc(encrypted_file_path, key, iv)
with open("",'wb') as f:
f.write(decrypted_data)
Expected Output: Decrypted ELF file that when executed, should print a specific secret message.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!