Renatoissance/Ransomware-Simulation
GitHub: Renatoissance/Ransomware-Simulation
一个基于 Python 和 Fernet(AES)仿勒索软件加密与恢复的 PoC 项目,用于教学与演练。
Stars: 1 | Forks: 0
# 第一阶段:威胁模拟与利用(红队)
## 概述
本概念验证的第一阶段演示了典型勒索软件载荷如何在受感染端点上运行。自定义 Python 脚本(`attacker.py`)利用 `cryptography` 库(基于 AES-CBC 模式、128 位密钥实现的 Fernet)系统性地使文件无法访问。
## 步骤 1:环境准备
为了在不危及实际系统完整性的情况下安全模拟攻击,在隔离的 Ubuntu 虚拟机中生成了一个包含 100 个虚拟文件的专用目录。
使用一个简单的 Bash 循环快速为目标目录预置包含真实字符串数据的文件:
```
mkdir ~/WICHTIGE_FIRMEN_DATEN
cd ~/WICHTIGE_FIRMEN_DATEN
for i in {1..100}; do echo "Dies ist ein extrem wichtiges Firmendokument Nummer $i. Enthält geheime Finanzdaten." > "geheime_rechnung_$i.txt"; done
```
The target directory after successfully provisioning 100 dummy files.
Execution of the attacker.py script targeting the dummy directory.
Terminal output confirming the successful encryption of all 100 files.
The compromised directory showing modified extensions and the dropped ransom note.
Viewing the unreadable AES ciphertext of an encrypted dummy document.
Microsoft Defender intercepting the custom payload via behavioral heuristics.
标签:AES-CBC, Fernet, PoC演示, Python加密, 勒索软件模拟, 安全教学, 安全演示, 库, 应急响应, 攻击模拟, 数据加密, 文件加密, 模拟攻击, 端点安全, 蓝队响应, 补丁管理, 误配置预防, 逆向工具, 驱动签名利用