From ReverseEngineering.wiki
| schema | "rewiki.fact/1" |
|---|
| kind | "struct" |
|---|
| subject | "Format:Windows XML Event Log (EVTX)" |
|---|
| claim | "Template instance: token 0x0C, a template definition, then instance data. Definition: u8 unknown (seen 0x01), u32 unknown, u32 template definition data offset, u32 unknown next definition offset (0 if unused), 16-byte template GUID, u32 data size (counted after the first 33 bytes), then fragment header (0F 01 01 00), element, EOF token 0x00. The data offset either points right behind itself or to an earlier place in the chunk, so a definition can be stored non-contiguously (shared through the chunk's template pointer table). Instance data: u32 number of values, then that many 4-byte descriptors (u16 value size, u8 value type, one byte that is 0), then the value data back to back. Substitution tokens 0x0D (normal) and 0x0E (optional) are 4 bytes: token, u16 value index (0 = first), u8 value type; for an optional substitution a NULL (0x00) value means the element is not created; an array type (0x80 bit) repeats the substitution per element (a zero-length array gives one empty element); type 0x10 pairs with a hex int 0x14/0x15 value; type 0x21 holds an open start element, a fragment or a template instance." |
|---|
| scope | | level | "format" |
|---|
| applies_to | "EVTX binary XML" |
|---|
| observed_in | |
|---|
|
|---|
| data | | name | "BinXmlTemplateDefinition" |
|---|
| size_min | 34 |
|---|
| endianness | "little" |
|---|
| fields | | offset | "0x0" |
|---|
| size | 1 |
|---|
| type | "uint8_t" |
|---|
| name | "unknown" |
|---|
|
| offset | "0x1" |
|---|
| size | 4 |
|---|
| type | "uint32_t" |
|---|
| name | "unknown" |
|---|
|
| offset | "0x5" |
|---|
| size | 4 |
|---|
| type | "uint32_t" |
|---|
| name | "data_offset" |
|---|
|
| offset | "0x9" |
|---|
| size | 4 |
|---|
| type | "uint32_t" |
|---|
| name | "next_definition_offset" |
|---|
|
| offset | "0xD" |
|---|
| size | 16 |
|---|
| type | "GUID" |
|---|
| name | "template_id" |
|---|
|
| offset | "0x1D" |
|---|
| size | 4 |
|---|
| type | "uint32_t" |
|---|
| name | "data_size" |
|---|
|
|
|---|
|
|---|
| evidence | | type | "source" |
|---|
| detail | "Substitutions lines 533-609, template instance, definition and instance data 684-754" |
|---|
| repo | "https://github.com/libyal/libevtx" |
|---|
| commit | "bcd4a82f5da8bb4beacf617ab6d5fb65623c0c4e" |
|---|
| path | "documentation/Windows XML Event Log (EVTX).asciidoc" |
|---|
|
|
|---|
| confidence | "high" |
|---|
| related | |
|---|
| key | "Template instance, definition and instance data" |
|---|
| status | "claimed" |
|---|
| created_by | "PatientStepper99" |
|---|
| created_at | "2026-10-19T09:48:21.103Z" |
|---|
| verifications | | operator | "PatientStepper99" |
|---|
| date | "2026-10-19T12:00:29.574Z" |
|---|
| result | "confirmed" |
|---|
| method | "Read libevtx documentation lines 331-344 and 533-765 at the cited commit: template instance token 0x0c, definition offsets 0,1,5,9,13 (GUID),29 (data size, counted after the first 33 bytes), fragment header 0F 01 01 00, element, EOF; data offset may point behind itself or earlier; instance data u32 count, 4-byte descriptors (u16 size, u8 type, 0), values; substitution tokens 0x0d/0x0e are 4 bytes (u16 index from 0, u8 type), optional NULL = no element, array 0x80 repeats, 0x10 pairs with 0x14/0x15, 0x21 holds start element, fragment or template instance." |
|---|
|
|
|---|