dumping-and-rebuilding-a-pe-from-memory
Rebuilds a usable PE file from a memory dump by fixing the section alignment
v1.0.03 установки+3 за 7 дней24 ЗвездыApache-2.0синхронизировано 10 часов назад
Установка
Ещё нет NotHoly CLI? Сначала установите её.
$ curl -fsSL https://notholy.com/install.sh | sh$ notholy skills install meltedinhex/dumping-and-rebuilding-a-pe-from-memoryПишет в ~/.notholy/skills после проверки подписи и SHA-256.
ПодписьПодписано, ed25519
Пакет76749e3d…bfe68b05
76749e3d287f…ce23bfe68b054 файла · 3.2 KBПроверкаСредний2 замечания
- Исполняемый скрипт в составе навыкаscripts/analyst.py
- Ссылки на внешние домены
Источникgithub.com/meltedinhex/analyst-ai-pack/tree/main/skills/dumping-and-rebuilding-a-pe-from-memory@da7600a
Эта запись еще не переведена на русский, поэтому показан текст на другом языке: English.
На странице
When to Use
- You have a process/region dump of an unpacked or injected PE and need a file that loads in a disassembler.
- You need to convert virtual (loaded) layout back toward raw layout and fix the entry point.
Do not use this on a still-packed image — unpack to OEP first. This skill operates on an already-captured dump; it does not execute the sample.
Prerequisites
- A raw PE dump (e.g., from x64dbg Scylla, vaddump) and the OEP if known.
Safety & Handling
- The dump is live malicious code; store password-protected and never execute it.
Workflow
Step 1: Inspect the dumped headers
python scripts/analyst.py inspect dump.binReports whether section RawAddress/RawSize match VirtualAddress/VirtualSize (memory-aligned dumps have raw==virtual) and the current AddressOfEntryPoint.
Step 2: Realign sections to raw layout
python scripts/analyst.py fix dump.bin --oep 0x1234 -o rebuilt.binRewrites each section's PointerToRawData/SizeOfRawData to its virtual layout (the on-disk-from- memory convention) and sets the entry point to the supplied OEP.
Step 3: Reconstruct imports
The dumped image usually has a destroyed IAT; rebuild it with an import reconstructor (Scylla/ ImpRec) using the OEP, then re-inspect.
Step 4: Verify
Confirm the rebuilt file parses, has a valid entry point, and disassembles.
Validation
- Section table is internally consistent (no overlaps, within file size).
- AddressOfEntryPoint points inside an executable section.
- The rebuilt file is accepted by a PE parser/disassembler.
Pitfalls
- Forgetting that memory dumps use virtual alignment — raw offsets must be rewritten.
- Setting an OEP RVA that lies outside any section.
- Skipping IAT reconstruction, leaving call targets pointing at null/garbage.
References
- See
references/api-reference.mdfor the rebuilder. - PE format spec and ATT&CK T1620 (linked in frontmatter).
Файлы этой версии
references/11.2 KB
- api-reference.md1.2 KB
scripts/13.2 KB
- analyst.py3.2 KB
- LICENSE340 B
- SKILL.md2.8 KB
Права
| Право | Заявлено | Найдено проверкой |
|---|---|---|
| Читает файлы | Нет | Нет |
| Пишет файлы | Нет | Нет |
| Выполняет команды shell | Да | Да |
| Ходит в сеть | Да | Да |
| Использует коннекторы | Нет | Нет |
| Управляет браузером | Нет | Нет |
Замечания проверки
Проверено 13 нояб. 2026 г.
- СредняяФайл · Исполняемый скрипт в составе навыкаscripts/analyst.py
- ИнфоСсылка · Ссылки на внешние домены
Чистая проверка снижает риск, но не доказывает, что пакет безопасен. Читайте то, что ставите.
| Версия | Опубликована | Коммит | SHA-256 | Подпись | Изменение прав |
|---|---|---|---|---|---|
| v1.0.0 | 13 нояб. 2026 г. | da7600a | 76749e3d | Подписана | – |
Ещё от 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