analyzing-compiled-python-malware
Analyzes Python-based malware packaged as PyInstaller/py2exe executables by detecting
v1.0.03 установки+3 за 7 дней24 ЗвездыApache-2.0синхронизировано 10 часов назад
Установка
Ещё нет NotHoly CLI? Сначала установите её.
$ curl -fsSL https://notholy.com/install.sh | sh$ notholy skills install meltedinhex/analyzing-compiled-python-malwareПишет в ~/.notholy/skills после проверки подписи и SHA-256.
ПодписьПодписано, ed25519
Пакет2246020e…203da53d
2246020e5d3b…bdd6203da53d4 файла · 2.8 KBПроверкаСредний2 замечания
- Исполняемый скрипт в составе навыкаscripts/analyst.py
- Ссылки на внешние домены
Источникgithub.com/meltedinhex/analyst-ai-pack/tree/main/skills/analyzing-compiled-python-malware@da7600a
Эта запись еще не переведена на русский, поэтому показан текст на другом языке: English.
На странице
When to Use
- You have an executable that is actually a frozen Python app (PyInstaller, py2exe, cx_Freeze) and need to identify the packer and locate the embedded Python modules.
- You want to extract
.pycfiles for decompilation.
Do not use this to run the executable — it identifies and locates the embedded archive
statically. Decompile extracted .pyc in an isolated environment.
Prerequisites
- The frozen executable (read inertly).
Safety & Handling
- Read bytes statically; treat extracted modules as malicious until reviewed.
Workflow
Step 1: Detect the packer
python scripts/analyst.py detect sample.exeLooks for PyInstaller markers (pyi-, PYZ-00.pyz, the MEI CArchive cookie MEI\014\013\012\013\016),
py2exe (PYTHONSCRIPT, zipfile.zip), and embedded python3x.dll references.
Step 2: Locate the embedded archive
Find the CArchive cookie near the end of the file and report the offset and the embedded Python
version string (python3.x).
Step 3: Extract and decompile
Use a PyInstaller extractor to dump the archive, then decompile .pyc (matching the detected
Python version) for source recovery.
Step 4: Analyze the source
Review the recovered Python for C2, persistence, and capability; map to ATT&CK.
Validation
- The packer is identified by its specific marker, not just the presence of Python strings.
- The CArchive cookie offset and Python version are reported when PyInstaller is present.
- Findings distinguish the bootloader stub from the embedded Python payload.
Pitfalls
.pycversion mismatch breaking decompilation — match the interpreter version.- Stripped/obfuscated bytecode (e.g., custom magic) needing header repair before decompiling.
- Encrypted PYZ archives (PyInstaller
--key) requiring the key.
References
- See
references/api-reference.mdfor the detector. - PyInstaller archive and Python bytecode references (linked in frontmatter).
Файлы этой версии
references/11.1 KB
- api-reference.md1.1 KB
scripts/12.1 KB
- analyst.py2.1 KB
- LICENSE340 B
- SKILL.md2.9 KB
Права
| Право | Заявлено | Найдено проверкой |
|---|---|---|
| Читает файлы | Нет | Нет |
| Пишет файлы | Нет | Нет |
| Выполняет команды shell | Да | Да |
| Ходит в сеть | Да | Да |
| Использует коннекторы | Нет | Нет |
| Управляет браузером | Нет | Нет |
Замечания проверки
Проверено 13 нояб. 2026 г.
- СредняяФайл · Исполняемый скрипт в составе навыкаscripts/analyst.py
- ИнфоСсылка · Ссылки на внешние домены
Чистая проверка снижает риск, но не доказывает, что пакет безопасен. Читайте то, что ставите.
| Версия | Опубликована | Коммит | SHA-256 | Подпись | Изменение прав |
|---|---|---|---|---|---|
| v1.0.0 | 13 нояб. 2026 г. | da7600a | 2246020e | Подписана | – |
Ещё от meltedinhex
Всё от этого издателя- writing-yara-rules-from-reversed-codemeltedinhex/writing-yara-rules-from-reversed-code4
- validating-detections-with-atomic-testsmeltedinhex/validating-detections-with-atomic-tests4
- writing-suricata-and-snort-rulesmeltedinhex/writing-suricata-and-snort-rules3
- writing-sigma-detection-rulesmeltedinhex/writing-sigma-detection-rules3
Еще в категории «Анализ вредоносного ПО и шифровальщиков»
Вся категория- yara-sigsdariushoule/yara-sigs4
- monitoring-darkweb-sourcesmukul975/monitoring-darkweb-sources3
- deploying-ransomware-canary-filesmukul975/deploying-ransomware-canary-files3
- implementing-honeypot-for-ransomware-detectionmukul975/implementing-honeypot-for-ransomware-detection3
- yaraaeondave/yara3
- testing-ransomware-recovery-proceduresmukul975/testing-ransomware-recovery-procedures3
Спрашивайте обо всём, что позволяет ваш скоуп.
Создайте аккаунт, пополните баланс и задайте первый вопрос в чате или в терминале.
- 1/3
Создайте аккаунт
Личный или для компании. Позже можно перейти на аккаунт компании без потери баланса и ключей.
ЛичныйКомпания - 2/3
Пополните баланс
Картой. Оплата за токены, без подписки.
$5.00минимальное пополнение - 3/3
Спрашивайте
В чате, или установите CLI и выполните notholy login в терминале.
$ notholy login