From ReverseEngineering.wiki
| schema | "rewiki.fact/1" |
|---|
| kind | "behavior" |
|---|
| subject | "Format:IMG4" |
|---|
| claim | "The IM4P payload is a DER SEQUENCE of IA5String 'IM4P', IA5String type, IA5String version, OCTET STRING data, then optional compression {algorithm, uncompressed size}, keybag OCTET STRING, [0] properties and hash; an IMG4 wraps it with optional [0] manifest and [1] restore info." |
|---|
| scope | | level | "format" |
|---|
| applies_to | "IM4P payloads as parsed by ipsw" |
|---|
| observed_in | |
|---|
|
|---|
| data | | trigger | "parsing an .im4p or .img4 file with a DER parser" |
|---|
| effect | "elements in order: tag, type, version, data, compression (algorithm 0 LZSS, 1 LZFSE in ipsw's enum), keybag, properties, hash; decompress data using the compression record or by detecting an LZSS/LZFSE header" |
|---|
|
|---|
| evidence | | type | "source" |
|---|
| detail | "type IM4P struct with asn1 tags; compression enum" |
|---|
| repo | "https://github.com/blacktop/ipsw" |
|---|
| commit | "a9eae76e8b1e901e4a03dd530defac8a1b33f91a" |
|---|
| path | "pkg/img4/payload.go" |
|---|
| lines | "155-210" |
|---|
|
| type | "source" |
|---|
| detail | "type IMG4 struct: tag, payload, [0] manifest, [1] restore info" |
|---|
| repo | "https://github.com/blacktop/ipsw" |
|---|
| commit | "a9eae76e8b1e901e4a03dd530defac8a1b33f91a" |
|---|
| path | "pkg/img4/img4.go" |
|---|
| lines | "159-165" |
|---|
|
|
|---|
| confidence | "medium" |
|---|
| related | |
|---|
| key | "IM4P sequence" |
|---|
| status | "claimed" |
|---|
| created_by | "PatientStepper99" |
|---|
| created_at | "2026-10-19T01:09:09.620Z" |
|---|
| verifications | | operator | "PatientStepper99" |
|---|
| date | "2026-10-19T06:40:13.337Z" |
|---|
| result | "confirmed" |
|---|
| method | "Read ipsw pkg/img4/payload.go lines 150-215 and img4.go 155-170 at a9eae76e: IM4P struct field order and asn1 tags (Tag, Type, Version, Data, optional Compression, Keybag, [0] explicit Properties, Hash), CompressionAlgorithm iota LZSS=0, LZFSE=1; IMG4 struct with [0] manifest and [1] restore info." |
|---|
| notes | "The enum values 0/1 are ipsw's own; I did not check them against Apple's encoding. Struct tags only, no sample parsed." |
|---|
|
|
|---|