Ransomware-Analyzer is a Python-based tool that simulates ransomware behavior for cybersecurity learning, testing, and research in a controlled environment. It encrypts and decrypts files in a target directory, allowing researchers and learners to study ransomware mechanisms safely.
- Encrypts files in a specified folder using Fernet symmetric encryption.
- Supports parallel encryption/decryption using multithreading for efficiency.
- Fetches encryption keys via a Telegram Bot for secure key management.
- Provides an interactive decryption prompt for recovering files.
- Logs encryption/decryption events for tracking.
- Safe for testing in isolated environments only.
- Clone the repository:
git clone https://github.com/AUX-441/Ransomware-Analyzer.git
cd Ransomware-Analyzer- Install dependencies:
pip install -r requirements.txt- Set up a Telegram Bot:
- Create a bot using BotFather.
- Replace
BOT_TOKENinTelegram_Bot.pywith your bot token.
- Set the target folder to test encryption:
TARGET_FOLDER = r"D:\11" # Change to your test folder- Run the main script:
python main.py- The script will:
- Wait for the encryption key from the Telegram Bot.
- Encrypt all files in the target folder.
- Optionally ask you to decrypt files using the key.
Ransomware-Analyzer/
│
├─ main.py # Main execution script
├─ Get_Key.py # Handles key retrieval from Telegram Bot
├─ encrypted_code.py # Encryption logic
├─ decrypted_code.py # Decryption logic
├─ Telegram_Bot.py # Telegram bot implementation for key generation
├─ logs/ # Stores logs of encryption/decryption
├─ requirements.txt # Python dependencies
└─ README.md
/start– Registers your chat ID to receive keys./getkey– Generates and sends a new encryption key.
Note: Never use this on production or personal files. This project is intended for safe, controlled learning only.
We welcome contributions! Please follow these steps:
- Fork the repository.
- Create a feature branch:
git checkout -b feature/YourFeature. - Make your changes and commit them:
git commit -m "Add feature". - Push to your branch:
git push origin feature/YourFeature. - Open a Pull Request with a clear description of your changes.
- This tool can encrypt real files. Always test in a controlled environment.
- Do not run on system-critical directories.
- Use responsibly and ethically for educational purposes only.
This project is for educational use only. See LICENSE for details.
This `README.md` fully documents your project with usage instructions, structure, and safety warnings.
If you want, I can also create a **`CONTRIBUTING.md`** in Markdown and **a `requirements.txt`** for all the dependencies so the repo is immediately ready to run. Do you want me to do that next?