Skip to content

Execution

PE files (Windows executables)

PE file triage cheat sheet: hashes, imphash and Rich header, compile timestamp caveats, sections and entropy, version info, signatures, PDB paths and tools.

Location
Any .exe, .dll, .sys, .scr, .cpl on disk or extracted from memory
Proves
What a binary is, who built and signed it, and whether it matches known tools or malware
Timestamps
PE TimeDateStamp as UNIX time, UTC (easily forged); Authenticode countersignature time, UTC; file $SI/$FN times, UTC
Retention
Persists until deleted; removed tools may survive in the Recycle Bin, VSS, unallocated space, memory or AV/EDR quarantine
Access
Read access to the containing folder (often Administrator); no default KAPE target, copy with a custom target or raw-access tool
Evidence of
Execution
Type
File / file system
Windows
XPVista / 78 / 8.11011
KAPE target
No dedicated target
Velociraptor
Windows.Triage.Targets:PrefetchBinaries

What it is

Every Windows executable, DLL, driver, screen saver and Control Panel item uses the Portable Executable (PE) format. Execution artifacts (Prefetch, Amcache, ShimCache) tell you a path ran or existed; the PE file itself tells you what it is. Static triage of the header, imports, resources and signature answers most first questions without running the sample: is it a renamed legitimate tool, a signed vendor binary, or a packed unknown?

Location

WhereWhy
Paths listed by Prefetch, Amcache, ShimCache, BAM, services, tasks and Run keysBinaries that ran or persist
\Users\<user>\AppData\, \Users\Public\, \ProgramData\, \Windows\Temp\Common attacker staging folders
Recycle Bin, carved unallocated space, shadow copiesDeleted binaries
Memory images and crash dumpsUnpacked or fileless modules
Defender quarantineDetected samples (encrypted in the quarantine store)

What it proves

  • Identity: hashes identify the exact file; imphash and Rich-header hashes cluster related builds of the same malware or tool family.
  • Origin: version information, Authenticode signature, certificate signer and PDB path show who built or signed it.
  • Renaming: OriginalFilename / InternalName in the version resource that differ from the on-disk name reveal renamed tools (for example svchost.exe that is really rclone.exe).
  • Capabilities: imports, strings and rules (capa, YARA) indicate what the code can do (network, injection, credential access).
  • It does not prove execution; that comes from execution artifacts.

Key fields

FieldMeaning
MD5 / SHA-1 / SHA-256File hashes; Amcache stores SHA-1 (of the first 30 MB)
ImphashHash of the ordered import table; similar for builds from the same source
Rich headerUndocumented Microsoft linker metadata (tool versions); its hash clusters builds
TimeDateStamp (COFF header)Link time, seconds since 1970 UTC
Sections (.text, .rdata, .rsrc…)Names, sizes and entropy; entropy near 8 or names like UPX0 suggest packing
Imports / exportsAPIs used; DLL export names
Version infoCompanyName, FileDescription, OriginalFilename, ProductVersion
AuthenticodeEmbedded signature, signer and timestamp; Windows components are often catalog-signed instead
Debug directoryPDB path such as C:\Users\dev\source\repos\loader\Release\loader.pdb
OverlayData appended after the last section (installers, embedded payloads)

Timestamps

TimestampSet whenFormatPitfalls
TimeDateStampLinkingUNIX time, UTCTrivially forged; reproducible builds (many Windows 10/11 system files) store a hash, not a date; some compilers use fixed values
Signature timestamp (countersignature)SigningUTC from the timestamping authorityMuch harder to forge; dates the signing, not the build
File system times ($SI / $FN)File creation on this systemNTFS, UTCDescribe the copy on disk, see timestomping

Retention and clearing

  • Attackers delete tools after use; recover them from the Recycle Bin, shadow copies, unallocated space, memory or EDR/antivirus quarantine.
  • If only the hash survives (Amcache), search it in threat-intelligence sources and across the fleet.

Collection

  • KAPE: no target collects arbitrary binaries by default; add the paths you found with a custom target or copy them with a raw-access tool.
  • Velociraptor (Windows.Triage.Targets): PrefetchBinaries collects the binaries referenced by Prefetch files; Windows.Search.FileFinder and Windows.Detection.BinaryHunter locate others.
  • Built-in:
Get-FileHash C:\Users\Public\svc.exe -Algorithm SHA256
Get-AuthenticodeSignature C:\Users\Public\svc.exe
(Get-Item C:\Users\Public\svc.exe).VersionInfo | Format-List *

Handle samples in a controlled environment and never execute them on the evidence system.

Parsing tools

  • sigcheck (Sysinternals): sigcheck -a -h -i file.exe shows version info, hashes and signature, including catalog signatures.
  • PEStudio (free edition): flags suspicious imports, strings, resources and indicators.
  • pefile (Python, open source): scripted access to headers, sections, imports, Rich header and imphash.
  • Detect It Easy: compiler, packer and installer identification.
  • capa (Mandiant, open source): maps code features to capabilities and ATT&CK techniques.
  • YARA: match against rule sets for known families and tools.

Investigation tips

  • Start with the hash and the signature: a validly signed vendor binary in an odd path is often a LOLBin or DLL side-loading setup, so check the DLLs next to it.
  • Compare the on-disk name with OriginalFilename; renamed remote-access and exfiltration tools are common.
  • A PDB path or unusual Rich header can link a sample to other incidents.
  • Treat TimeDateStamp as a hint, never as proof of when the attacker built or deployed the file.
  • Correlate the binary's SHA-1 with Amcache on other hosts to scope the incident, and check Defender detections for the same path.

Related artifacts

Glossary terms

Guides

All artifacts on one page: cheat sheet