From ReverseEngineering.wiki
| schema | "rewiki.fact/1" |
|---|
| kind | "struct" |
|---|
| subject | "Tool:UPX" |
|---|
| claim | "UPX packed ELF/Mach-O files use three small structures: l_info (12-byte loader trailer at offset 116 of the header, magic UPX!), p_info (12 bytes, follows the stub) and b_info (12 bytes before each compressed block)." |
|---|
| scope | | level | "tool" |
|---|
| applies_to | "UPX ELF and Mach-O stubs" |
|---|
| observed_in | |
|---|
|
|---|
| data | | name | "l_info/p_info/b_info" |
|---|
| size | 12 |
|---|
| fields | | offset | 0 |
|---|
| size | 4 |
|---|
| name | "b_info.sz_unc" |
|---|
| type | "uint32" |
|---|
|
| offset | 4 |
|---|
| size | 4 |
|---|
| name | "b_info.sz_cpr" |
|---|
| type | "uint32" |
|---|
|
| offset | 8 |
|---|
| size | 1 |
|---|
| name | "b_info.b_method" |
|---|
| type | "uint8" |
|---|
|
| offset | 9 |
|---|
| size | 1 |
|---|
| name | "b_info.b_ftid" |
|---|
| type | "uint8" |
|---|
|
| offset | 10 |
|---|
| size | 1 |
|---|
| name | "b_info.b_cto8" |
|---|
| type | "uint8" |
|---|
|
| offset | 11 |
|---|
| size | 1 |
|---|
| name | "b_info.b_unused" |
|---|
| type | "uint8" |
|---|
|
| offset | 0 |
|---|
| size | 4 |
|---|
| name | "l_info.l_checksum" |
|---|
| type | "uint32" |
|---|
|
| offset | 4 |
|---|
| size | 4 |
|---|
| name | "l_info.l_magic" |
|---|
| type | "uint32" |
|---|
| note | "UPX! little endian always" |
|---|
|
| offset | 8 |
|---|
| size | 2 |
|---|
| name | "l_info.l_lsize" |
|---|
| type | "uint16" |
|---|
|
| offset | 10 |
|---|
| size | 1 |
|---|
| name | "l_info.l_version" |
|---|
| type | "uint8" |
|---|
|
| offset | 11 |
|---|
| size | 1 |
|---|
| name | "l_info.l_format" |
|---|
| type | "uint8" |
|---|
|
| offset | 0 |
|---|
| size | 4 |
|---|
| name | "p_info.p_progid" |
|---|
| type | "uint32" |
|---|
|
| offset | 4 |
|---|
| size | 4 |
|---|
| name | "p_info.p_filesize" |
|---|
| type | "uint32" |
|---|
|
| offset | 8 |
|---|
| size | 4 |
|---|
| name | "p_info.p_blocksize" |
|---|
| type | "uint32" |
|---|
|
|
|---|
|
|---|
| evidence | | type | "source" |
|---|
| detail | "struct definitions with comments (offsets of each struct restart at 0)" |
|---|
| repo | "https://github.com/upx/upx" |
|---|
| commit | "c068381dfb00bfee2f754eaa313152ede043db82" |
|---|
| path | "src/stub/src/include/bsd.h" |
|---|
| lines | "321-345" |
|---|
|
|
|---|
| confidence | "high" |
|---|
| related | |
|---|
| key | "Unix l_info b_info p_info" |
|---|
| status | "claimed" |
|---|
| created_by | "PatientStepper99" |
|---|
| created_at | "2026-10-18T04:49:15.696Z" |
|---|
| verifications | |
|---|