identifying-file-types-and-formats
Identifies a sample''s true file type independent of its extension: matching magic
v1.0.03 установки+3 за 7 дней24 ЗвездыApache-2.0синхронизировано 10 часов назад
Установка
Ещё нет NotHoly CLI? Сначала установите её.
$ curl -fsSL https://notholy.com/install.sh | sh$ notholy skills install meltedinhex/identifying-file-types-and-formatsПишет в ~/.notholy/skills после проверки подписи и SHA-256.
ПодписьПодписано, ed25519
Пакет06b5ff69…ad0d6b38
06b5ff690dfe…77faad0d6b384 файла · 3.3 KBПроверкаСредний2 замечания
- Исполняемый скрипт в составе навыкаscripts/analyst.py
- Ссылки на внешние домены
Источникgithub.com/meltedinhex/analyst-ai-pack/tree/main/skills/identifying-file-types-and-formats@da7600a
Эта запись еще не переведена на русский, поэтому показан текст на другом языке: English.
На странице
When to Use
- You receive an unknown sample and must determine what it actually is before choosing tools.
- You suspect masquerading — a
.pdfor.jpgthat is really an executable or script. - You need to detect container formats (ZIP/OLE/ISO) that hide a payload.
Do not use the file extension or the OS-reported type as truth — adversaries rename executables and embed payloads; always confirm by content.
Prerequisites
file/libmagic or an equivalent magic-byte database; the sample handled inertly in the lab.
Safety & Handling
- Never open the sample in its associated application during identification; read raw bytes only.
- Keep the disguised extension in mind — a double extension or RTLO trick can mislead the eye.
Workflow
Step 1: Read the magic bytes
Inspect the leading bytes and known offset signatures (e.g., MZ, \x7fELF, %PDF, PK\x03\x04,
OLE D0 CF 11 E0).
python scripts/analyst.py identify sample.datStep 2: Confirm structure
For container formats, confirm internal structure (ZIP central directory, OLE storage, ISO
CD001 at 0x8001) rather than trusting the header alone.
Step 3: Compare against the claimed extension
Flag mismatches: a .jpg whose content is MZ, or a document that is actually a script. These
are strong masquerading indicators.
Step 4: Route to the right analysis
Use the confirmed type to pick the correct workflow (PE static analysis, document analysis, archive extraction).
Validation
- The detected type is confirmed by both magic bytes and structural checks, not magic alone.
- Extension/content mismatches are explicitly reported.
- The result correctly routes the sample to the appropriate analysis skill.
Pitfalls
- Trusting the first 2 bytes only; some formats need offset or structural confirmation.
- Missing polyglot files that are valid as two formats at once.
- Overlooking nested containers (archive inside archive) that hide the real payload.
References
- See
references/api-reference.mdfor the type identifier. - libmagic and the magic-number reference (linked in frontmatter).
Файлы этой версии
references/11.1 KB
- api-reference.md1.1 KB
scripts/12.6 KB
- analyst.py2.6 KB
- LICENSE340 B
- SKILL.md3.0 KB
Права
| Право | Заявлено | Найдено проверкой |
|---|---|---|
| Читает файлы | Нет | Нет |
| Пишет файлы | Нет | Нет |
| Выполняет команды shell | Да | Да |
| Ходит в сеть | Да | Да |
| Использует коннекторы | Нет | Нет |
| Управляет браузером | Нет | Нет |
Замечания проверки
Проверено 13 нояб. 2026 г.
- СредняяФайл · Исполняемый скрипт в составе навыкаscripts/analyst.py
- ИнфоСсылка · Ссылки на внешние домены
Чистая проверка снижает риск, но не доказывает, что пакет безопасен. Читайте то, что ставите.
| Версия | Опубликована | Коммит | SHA-256 | Подпись | Изменение прав |
|---|---|---|---|---|---|
| v1.0.0 | 13 нояб. 2026 г. | da7600a | 06b5ff69 | Подписана | – |
Ещё от 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