Ransomware script based on AES-CBC (Fernet Token) and RSA (PKCS1-OAEP) cryptosystem.
Pyransom
This ransomware script implement AES and RSA cryptosystem to encrypt file. Target folder will encrypted using fernet cryptosystem based on 128-bit AES. The fernet key also encrypted using RSA cryptosystem based on PKCS1-OAEP standard.
How To Use
- Generate RSA key by run
gen_rsa.py
. After that you will get a pair public and private key in PEM format. - Run
main.py
to start ransomware script. - After the welcome message show up you need to input the target directory you want to attack. The default directory is
C:/Users/<USERNAME>/Desktop
.
Warning
Make sure you run this script on virtual machine. Don’t delete your private.pem
key or your file will be encrypted forever. This program is for educational purpose and help CS/CE students understand how cryptography works in real world scenario.
Bug
PermissionError: [Errno 13] Permission denied:
(To prevent this bug runcmd
as administrator)
PS : This tool is only for testing and academic purposes and can only be used where strict consent has been given. Do not use it for illegal purposes! Code licensed by MIT with no warranty.
Leave a Reply