recovering-injected-code-and-shellcode
Carves injected PE images and position-independent shellcode from a memory dump or
v1.0.03 установки+3 за 7 дней24 ЗвездыApache-2.0синхронизировано 10 часов назад
Установка
Ещё нет NotHoly CLI? Сначала установите её.
$ curl -fsSL https://notholy.com/install.sh | sh$ notholy skills install meltedinhex/recovering-injected-code-and-shellcodeПишет в ~/.notholy/skills после проверки подписи и SHA-256.
ПодписьПодписано, ed25519
Пакет46574745…e0a0a979
46574745b28d…6979e0a0a9794 файла · 3.0 KBПроверкаСредний2 замечания
- Исполняемый скрипт в составе навыкаscripts/analyst.py
- Ссылки на внешние домены
Источникgithub.com/meltedinhex/analyst-ai-pack/tree/main/skills/recovering-injected-code-and-shellcode@da7600a
Эта запись еще не переведена на русский, поэтому показан текст на другом языке: English.
На странице
When to Use
- You have a carved memory region (from malfind/vaddump) and need to identify and extract the payload — an injected PE or raw shellcode.
- You need to locate likely shellcode entry points (egg hunters, GetPC stubs) before disassembly.
Do not use this to execute the payload — it prepares code for static disassembly/emulation in a controlled tool, not for running.
Prerequisites
- A carved binary region (raw bytes) from a memory image.
Safety & Handling
- The carved region is live malicious code; store it password-protected and never execute it.
Workflow
Step 1: Identify payload type
python scripts/analyst.py identify region.binDetects an embedded MZ/PE (with offset) versus raw shellcode, and reports the PE's architecture
if present.
Step 2: Locate shellcode entry hints
Finds common position-independent code markers: GetPC stubs (call $+5/fldz/fnstenv), PEB
access (fs:[30]/gs:[60]), and API-hashing loops.
Step 3: Extract for analysis
Carve the PE at its offset (or keep the raw shellcode) and hand it to a disassembler/emulator at the detected base/entry.
Step 4: Document
Record offsets, architecture, and entry hints for the downstream RE workflow.
Validation
- An embedded PE is confirmed by
MZ+ valide_lfanew→PE\0\0. - Shellcode entry hints reference real PIC patterns, not arbitrary bytes.
- Architecture detection matches the PE Machine field (or PIC heuristics for raw shellcode).
Pitfalls
- Assuming everything carved is a PE; much injected code is headerless shellcode.
- Wrong base address breaking relocations when loading a dumped PE — note it for rebuilding.
- Treating compressed/encrypted stages as final shellcode without a decode pass.
References
- See
references/api-reference.mdfor the identifier. - ATT&CK T1620 and T1055 (linked in frontmatter).
Файлы этой версии
references/11.2 KB
- api-reference.md1.2 KB
scripts/12.3 KB
- analyst.py2.3 KB
- LICENSE340 B
- SKILL.md2.8 KB
Права
| Право | Заявлено | Найдено проверкой |
|---|---|---|
| Читает файлы | Нет | Нет |
| Пишет файлы | Нет | Нет |
| Выполняет команды shell | Да | Да |
| Ходит в сеть | Да | Да |
| Использует коннекторы | Нет | Нет |
| Управляет браузером | Нет | Нет |
Замечания проверки
Проверено 13 нояб. 2026 г.
- СредняяФайл · Исполняемый скрипт в составе навыкаscripts/analyst.py
- ИнфоСсылка · Ссылки на внешние домены
Чистая проверка снижает риск, но не доказывает, что пакет безопасен. Читайте то, что ставите.
| Версия | Опубликована | Коммит | SHA-256 | Подпись | Изменение прав |
|---|---|---|---|---|---|
| v1.0.0 | 13 нояб. 2026 г. | da7600a | 46574745 | Подписана | – |
Ещё от 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
Еще в категории «Реверс-инжиниринг и фаззинг»
Вся категорияСпрашивайте обо всём, что позволяет ваш скоуп.
Создайте аккаунт, пополните баланс и задайте первый вопрос в чате или в терминале.
- 1/3
Создайте аккаунт
Личный или для компании. Позже можно перейти на аккаунт компании без потери баланса и ключей.
ЛичныйКомпания - 2/3
Пополните баланс
Картой. Оплата за токены, без подписки.
$5.00минимальное пополнение - 3/3
Спрашивайте
В чате, или установите CLI и выполните notholy login в терминале.
$ notholy login