A short, sweet, PoC Python Ransomware (+A file vault for protecting the users files) using Advanced Encryption Standards. The program uses the AES-GCM-256 for its work.
There are two flavors of the program, one is a simple File Encryptor and the other is a simple and effective multiplatform Python Ransomware. The File Vault was actually a school project, but the idea of ransomware came to me because of the procedure I was using for encrypting the files.
The thread_locker uses concurrent.futures thread pools for getting it's job done.
- Uses AES-GCM-256 for encryption and decryption.
- File is verified after decryption.
- Fast encryption and decryption speeds.
| File size | Encryption Speed (in secs.) | Decryption Speed (in secs.) |
|---|---|---|
| 84MB | 0.321843 | 0.313680 |
| 835MB | 5.022431 | 4.948784 |
-
A seperate folder named as
cryptography_lockercontains the same Locker file, but this one uses cryptography module instead. You can replace the originalLocker.pywith thisLocker.pyinstead, it won't harm the functionality of the program. -
Encryption/Decryption speeds for this
Locker.py
| File Size | Encryption Speed (in secs.) | Decryption Speed (in secs.) |
|---|---|---|
| 85MB | 0.220274 | 0.217195 |
| 858MB | 5.068394 | 4.854502 |
as-Classfolder contains both the Lockers, but they are implemented as a class.
-
Please note that the file encrypted with pycryptodome/Locker.py won't be decrypted by this cryptography/Locker.py and vice versa. This is due to the way pycryptodome and cryptography module works.
-
Encrypt (or decrypt) the files with appropriate
Locker.pyonly. If you fail to do do so, unforseeable problems may destroy your program logic.
And as a final word of caution:
Cryptography is a very powerful yet sensitive thing.
If used properly, you get good results, but if you fail to do so, remember:
You should ONLY use it if you're 100% absolutely sure that you know
what you're doing because this program is full of land mines, dragons,
and dinosaurs with laser guns.
The Ransomware provided is meant only for educational purposes and IS NOT MEANT FOR ANY MALICIOUS PURPOSES. I will not be responsible for any sort of damage caused to anyone's property.