Repository navigation
Description
Before submitting
- I searched the open and closed issues and pull requests for a related proposal.
- I understand the contribution scope must be reviewed before integration; open questions are welcome here.
- This request does not include credentials, private samples, or sensitive target data.
Area
Native analysis or decompilation
Current limitation
The first triage question for a Windows binary is what its imports say it can do: process injection, persistence, service control, keyboard capture, credential access, anti-debug, download, driver loading. Today that needs a disassembler session or external tooling such as pefile/capa. REA's inspect_pe_resources reads resources but not imports, and there is no import hash to pivot on threat intelligence. Related: #3413 (static packer identification) and #2729 (static PE provider) overlap on packing facts.
Use cases
- An automated (LLM) triage step that needs a few KB of behaviour facts, not a disassembly.
- Pivoting on the import hash (imphash) as pefile and VirusTotal compute it.
- Spotting crafted images whose import tables disagree (what the loader binds vs what other tools show).
Desired outcome and success criteria
A read-only inspect_pe_imports tool (CLI and MCP) for a local PE32/PE32+ image. It returns:
- imported APIs grouped into behaviour categories with MITRE ATT&CK technique IDs and strong/medium/weak confidence tiers;
- the imphash exactly as pefile computes it;
- DLLs, runtime-resolution hints and basic packing facts;
- the complete import and export tables as retained Evidence, using REA's standard
detailcontract.
Success means imports, exports, ordinal resolution and imphash match pefile on real and crafted images. Capabilities are stated as "imports consistent with", never as a verdict.
Expected interaction with targets
Read existing files or captured data
Target and scope details (optional)
Static parsing only; no execution, no disassembly. The ATT&CK taxonomy is a new interpretive surface (versioned, built from Microsoft API names and ATT&CK IDs, no third-party rule text). The maintainers' view on whether and how it belongs is welcome. ELF and Mach-O are out of scope for now.
Verification available so far
I have a prototype or observed results
Verification
Prototype on the fork branch feat/binary-imports. A real-toolchain lane builds mingw-w64 x86/x64 fixtures and compares every import, delay import, export, ordinal resolution and imphash with pefile 2024.8.26, and the DLL set with llvm-readobj, through CLI and MCP. Seven adversarial review rounds. The imphash matches pefile on 104 of 107 real and crafted images; the remaining 3 are malformed and refused.
Activity
FerroLx commentedon Oct 25, 2026
#6509 now covers the import tables and the pefile-compatible imphash, and
inspect_pe_certificatescovers the Authenticode certificate table. Thanks @mvanhorn. My draft branch (FerroLx/rea:feat/binary-imports) overlaps both, so I won't open it as written.Two parts of this issue are not in
mainyet. I'd like to propose each as a small follow-up PR that builds on #6509's parsed import facts rather than adding a second parser:VirtualAllocEx+WriteProcessMemory+CreateRemoteThread→ process injection, T1055). It would be reported as derived from observed imports, never as observed behaviour, and unknown APIs would stay untagged rather than read as benign.GetProcAddress-style dynamic resolution. They'd be paged with explicit coverage, so a binary that resolves APIs at runtime isn't reported as importing nothing.Neither executes the target, and both read the same caller-selected local file. Is either one in scope? If yes, which should come first? I'll wait for a maintainer decision before porting anything.