In this project you will develop a small program capable of causing great havoc. Although the greatest virtue of ransomware is its ability to spread through networks of hundreds of computers, in this case, your program will only affect a small part of your files.
Clone the repository:
git clone https://github.com/salecler/stockholm.git
Make a directory named "venv" inside the repo. It will be your volume inside your docker.
mkdir venv
Move the program inside "/venv/"
mv stockholm venv/
Move the bash script inside "/venv/"
mv bash_test venv/
Then you can run the Dockerfile.
./docker.sh
Once you're in the docker, go to the admin directory that has been created in the home carpet.
cd home/admin/
And you can finally execute the script.
./bash_test
Then you can run it:
python3 stockholm
Flags:
- --reverse / -r
- --version / -v
- --help / -h
- --silent / -s
You will work at all times within a virtual machine. You will create a program called stockholm that meets the following specifications.
• It will be developed for the Linux platform.
• Will only act on a infection folder in the user’s HOME directory.
• The program will act only on files with the extensions that were affected by Wannacry.
• You will include a file of no more than 50 lines called README.md with the instructions of use and, if required, to compile it.
• In case of compiled language, you will include all the source code of the program.
• The program will rename all the files in the mentioned folder adding the ".ft" extension.
• If they already have this extension, they will not be renamed.
• Files will be encrypted with a known algorithm of your choice, which is considered secure.
• The key with which the files are encrypted will be at least 16 characters long.
• The program will have the option "–help" or "-h" to display help.
• The program will have the option "–version" or "-v" to show the version of the program.
• The program will have the option "–reverse" or "-r" followed by the key entered as an argument to reverse the infection.
• The program will show each encrypted file during the process unless the option is indicated "–silent" or "-s", in which case the program will not produce any output.
• The program will handle errors and will not stop unexpectedly in any case. You can use any programming language as long as you meet these specifications. You can use encryption libraries such as openssl or libsodium, but you will need to justify your choice of encryption during evaluation.