The project aims to develop a ransomware simulator that mimics the behavior of actual ransomware without causing any harm. The simulator encrypts test files, displays a ransom note, and simulates disabling functionalities to test security measures and user awareness.
- File Encryption/Decryption: The simulator encrypts files using symmetric encryption (AES) and renames them to show their encrypted state.
- Ransom Note GUI: A graphical window displays the ransom message with a countdown timer and fields for the decryption key.
- Non-Destructive: The encryption and decryption operations are reversible to prevent data loss.
- Programming Language: Python
- Libraries and Frameworks:
- Cryptography:
PyCryptodomefor encryption and decryption - File Manipulation:
osandshutilfor file and directory operations - GUI Development:
Tkinterfor building the ransom note window - Image Processing:
Pillowfor image handling in the GUI
- Cryptography:
- Development Environment: Visual Studio Code (VS Code)
- Clone the repository:
git clone https://github.com/yourusername/ransomeware_simulation.git cd ransomeware_simulation - Install required Python libraries:
pip install -r requirements.txt
- Run the encryption script:
python script.py
- Enter the decryption key from the key.key file when prompted by the ransom note window to decrypt the files.
- File Encryption:
- The simulator encrypts files in the specified directory using the AES encryption algorithm.
- Ransom Note Display:
- A graphical ransom note is displayed with an image and instructions to pay a ransom.
- A countdown timer creates urgency for the user to input the decryption key.**
- File Decryption:
- If the correct key is provided, files are decrypted and restored to their original state.
- Initial Infection: The victim unknowingly acquires ransomware through email attachments or links.
- Contacting the Attacker's C&C Server: The ransomware connects to the attacker's command-and-control server to download the public key.
- Data Encryption: Files are encrypted using the public key, and a ransom note is displayed.
- Ransom Payment and Decryption: The victim must pay the ransom to receive the private key to decrypt the files.
To mitigate the risks posed by ransomware, follow these best practices:
- Regular Backups: Backup important data to offline or cloud storage.
- Security Awareness: Educate users on phishing and social engineering attacks.
- Security Solutions: Implement antivirus, firewalls, and intrusion detection systems.
- Access Control: Regularly review and update file permissions.
Sandarbh Kansal