WardenModuleHeader
struct · warden · 40 bytes
- Meaning
- Holds the ten dwords that open a decompressed module image
- Confidence
- verified, proof two
- Finding
- warden/modules#the-module-image
Finding: The module image in warden: module decoding and loading
A decompressed module is a header, a section table and a stream of runs. Header values are offsets from the
image base. At +0x28 each section has 12 bytes: an address, a size and a Win32 protection. The runs follow
the table. A run is a 16-bit length; runs alternate between copied (the bytes follow) and skipped (zeros),
starting with a copy at the first section's address and ending when the address reaches the image size.
| offset | field |
|---|---|
+0x00 | image size, under 0x80000000 |
+0x04 | not read |
+0x08 | relocation stream |
+0x0c | relocation count |
+0x10 | export table |
+0x14 | export count |
+0x18 | ordinal of the first export |
+0x1c | import table |
+0x20 | import count |
+0x24 | section count |
The derivation is in the doc.
Fields 10
| offset | size | type | name | meaning | confidence | finding |
|---|---|---|---|---|---|---|
0x0000 | 4 | uint32_t | m_imageSize | Holds the size of the image | verified, proof two | warden/modules#the-module-image |
0x0004 | 4 | uint32_t | m_unread | Holds a dword the loader copies and never reads | verified, proof two | warden/modules#the-module-image |
0x0008 | 4 | uint32_t | m_relocationOffset | Holds the offset of the relocation stream | verified, proof two | warden/modules#the-module-image |
0x000c | 4 | uint32_t | m_relocationCount | Holds the number of relocation entries | verified, proof two | warden/modules#the-module-image |
0x0010 | 4 | uint32_t | m_exportOffset | Holds the offset of the export table | verified, proof two | warden/modules#the-module-image |
0x0014 | 4 | uint32_t | m_exportCount | Holds the number of exports | verified, proof two | warden/modules#the-module-image |
0x0018 | 4 | uint32_t | m_exportBase | Holds the ordinal of the first export | verified, proof two | warden/modules#the-module-image |
0x001c | 4 | uint32_t | m_importOffset | Holds the offset of the import table | verified, proof two | warden/modules#the-module-image |
0x0020 | 4 | uint32_t | m_importCount | Holds the number of import libraries | verified, proof two | warden/modules#the-module-image |
0x0024 | 4 | uint32_t | m_sectionCount | Holds the number of 12-byte section entries after the header | verified, proof two | warden/modules#the-module-image |