Question: Creating Ransomware write a simple ransomware using Python shell script. The assumptions on the ransomware are as follows: 1) An attacker has already broken into

Creating Ransomware

write a simple ransomware using Python shell script.

The assumptions on the ransomware are as follows: 1) An attacker has already broken into a victims Linux/Unix machine on which GPG is installed; 2) The attacker put a ransomware program and public key (ransompubkey.asc) in the victims machine; 3) The victim has three to four text files in their current directory. (Note that these files have extension .txt.)

The ransomware should perform the following: 1) It generates a random passphrase for symmetric encryption and saves it to a file named session.key 2) Then it encrypts all .txt files in the current directory using the key that the attacker selected in step 1. 3) The file session.key will be encrypted to session.key.asc using the attackers public key, which is ransompubkey.asc. 4) The file session.key should be deleted. 5) All .txt files should be deleted 6) It will finally display a message asking for ransom Your text files are encrypted. To decrypt them, you need to pay me $5,000 and send ransompubkey.asc in your folder to [me]. [me] should be an email address associated with ransompubkey.asc. 7) Your second task is to write a program (again Python Shell Script) to recover (decrypt) all the encrypted files if the victim pays the ransom.

Note 1: In step 1, the key used to encrypt files must not appear in the source code of the ransomware program. A random passphrase means that the passphrase is not easy to guess and it must be changed every time the program is executed.

Restriction: Use subprocess to execute the commands required for the programs and do not use shell=true option in subprocess. It should be noted that some commands work only with shell=true option in subprocess, Use proper alternatives for such commands.

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 Databases Questions!