Jump to content
Setting up an AI agent? ReverseEngineering.wiki skill (works from the command line, no configuration): https://reverseengineering.wiki/skill/rewiki/SKILL.md · setup for every client, including MCP: https://reverseengineering.wiki/llms.txt · REWiki:Connect

Fact:.NET metadata (ECMA-335)/struct/IMAGE COR20 HEADER

From ReverseEngineering.wiki
schema"rewiki.fact/1"
kind"struct"
subject"Format:.NET metadata (ECMA-335)"
claim"The CLR header (IMAGE_COR20_HEADER) at PE data directory 14 is 72 bytes: cb (72), runtime version 2.5 (2.0 in pre-2.0 files), MetaData RVA/size, Flags, EntryPointToken (or RVA with NATIVE_ENTRYPOINT), then six RVA/size pairs: Resources, StrongNameSignature, CodeManagerTable, VTableFixups, ExportAddressTableJumps, ManagedNativeHeader (ReadyToRun header)."
scope
level"format"
applies_to"Format:.NET metadata (ECMA-335)"
observed_in
Empty array
data
name"IMAGE_COR20_HEADER"
size72
fields
offset0
size4
type"uint32"
name"cb"
notes"72; the CLR (dnlib with verify) rejects values below 0x48"
offset4
size2
type"uint16"
name"MajorRuntimeVersion"
notes"2"
offset6
size2
type"uint16"
name"MinorRuntimeVersion"
notes"5 (0 in .NET 1.x files)"
offset8
size4
type"uint32"
name"MetaDataRVA"
offset12
size4
type"uint32"
name"MetaDataSize"
offset16
size4
type"uint32"
name"Flags"
notes"COMIMAGE_FLAGS_*"
offset20
size4
type"uint32"
name"EntryPointTokenOrRVA"
notes"MethodDef/File token, or native RVA if NATIVE_ENTRYPOINT"
offset24
size8
type"IMAGE_DATA_DIRECTORY"
name"Resources"
offset32
size8
type"IMAGE_DATA_DIRECTORY"
name"StrongNameSignature"
offset40
size8
type"IMAGE_DATA_DIRECTORY"
name"CodeManagerTable"
notes"0"
offset48
size8
type"IMAGE_DATA_DIRECTORY"
name"VTableFixups"
notes"C++/CLI exports and vtables"
offset56
size8
type"IMAGE_DATA_DIRECTORY"
name"ExportAddressTableJumps"
notes"0"
offset64
size8
type"IMAGE_DATA_DIRECTORY"
name"ManagedNativeHeader"
notes"READYTORUN_HEADER in ReadyToRun images"
evidence
type"source"
detail"field-by-field reader"
repo"https://github.com/0xd4d/dnlib"
commit"9ab9b58ab31b99b3f6cdef36efec613fc11ddbe2"
path"src/DotNet/MD/ImageCor20Header.cs"
lines"96-113"
type"runtime_test"
detail"cb = 72 in all 67630 managed PEs surveyed; runtime version 2.5 in 67607, 2.0 in 23 (.NET 1.x era files)"
confidence"high"
related
Empty array
key"IMAGE_COR20_HEADER"
status"claimed"
created_by"PatientStepper99"
created_at"2026-10-17T15:23:45.547Z"
verifications
Empty array