Principle:3641397194 wq Gpt6 Astra Binary Triage
| Knowledge Sources | |
|---|---|
| Domains | Reverse_Engineering, Binary_Analysis |
| Last Updated | 2026-10-26 14:00 GMT |
Overview
Technique for rapidly characterizing an unknown binary by parsing its header structure, sections, imports, exports, entry point, and statistical properties without executing it.
Description
Binary triage is the first step in reverse engineering and malware analysis: determining what a file is before deep analysis. It combines format identification (PE vs ELF vs other), structural parsing (header fields, section tables, import/export directories), and statistical fingerprinting (Shannon entropy for packer detection, ASCII string extraction, hex-level inspection, and entry-point byte disassembly).
The key advantage of client-side triage is that the file never leaves the analyst's machine — parsing happens in the browser or locally, making it safe for sensitive or malicious samples. The triage output guides the analyst toward the right deep-analysis tool (IDA, Ghidra, debugger) by surfacing architecture, entry point, interesting imports, and packer indicators (high section entropy).
Usage
Use this principle when you need to:
- Initial sample assessment: quickly determine format, architecture, and packer status of an unknown binary.
- Safe local inspection: triage sensitive samples without uploading to a remote service.
- Pre-IDA preparation: gather section maps, imports, and entry offsets before opening a disassembler.
- Complement to server-side analysis: pair with deeper server-side tools (IDA MCP, binary.js) for full analysis.
Theoretical Basis
Binary triage rests on two foundations:
1. Format Specification Parsing: PE and ELF files have well-documented header structures. The PE format uses the DOS stub's `e_lfanew` field to locate the COFF/Optional headers, which define machine type, entry point, image base, section table, and data directories (imports, exports). ELF uses a fixed header with class (32/64-bit), endianness, machine type, entry point, and section header table offset.
2. Shannon Entropy as Packer Indicator:
Where is the frequency of byte value . Compressed/encrypted sections approach bits/byte; normal code sections are typically . High section entropy is a strong indicator of packing (UPX, Themida, VMProtect).
Pseudo-code Logic:
# Abstract algorithm (NOT real implementation)
magic = read_first_bytes(file)
if magic == b"MZ":
parse_pe(file) # e_lfanew -> COFF -> Optional -> Sections -> Imports/Exports
elif magic == b"\x7fELF":
parse_elf(file) # header -> sections -> entry
for section in sections:
section.entropy = shannon_entropy(section.bytes)
strings = extract_ascii_runs(file, min_length=6)
entry_bytes = disassemble_at(file, entry_point, max=16)