iOS artifacts · Lesson 2 of 7
Property lists and NSKeyedArchiver
9 min read
Property lists, usually called plists, are the format iOS uses for settings, app metadata, configuration, caches and many small records. You will find them as files ending in .plist and, just as often, as BLOBs inside SQLite databases. Some are simple and readable; others are serialized object graphs produced by NSKeyedArchiver, which look like a jumble of numbered references until you know how to follow them. Plists also carry most of the timestamps you will meet on iOS in Apple's own epoch, Mac absolute time. This lesson explains the formats, shows how to read an archived object by hand, and works through timestamp conversions you will reuse in every later lesson.
What a property list holds
A property list is a tree of a small number of value types:
| Type | Holds | Notes |
|---|---|---|
| Dictionary | Key-value pairs | Keys are always strings |
| Array | Ordered values | Can mix types |
| String | Text | ASCII or UTF-16 in binary form |
| Integer, Real | Numbers | Real values are floating point |
| Boolean | True or false | |
| Date | A point in time | Stored in Mac absolute time in binary form |
| Data | Raw bytes | Often another plist, an image or a protobuf (Protocol Buffers, a compact binary format explained in lesson 4.4) |
| UID | A reference number | Used only by NSKeyedArchiver; unrelated to the hardware UID key of lesson 1.2 |
The Data type matters to examiners: a value inside a plist can itself be a complete binary plist, an archived object or a compressed blob, so decoding often takes more than one step.
XML and binary formats
The same tree can be stored in two main formats.
XML plists start with an XML declaration and a plist element. Keys and values are readable text, and dates are written in ISO 8601 in UTC, for example 2026-03-10T18:05:30Z. Configuration profiles and plists written by some tools are XML.
Binary plists start with the eight bytes 62 70 6C 69 73 74 30 30, the ASCII text bplist00. After the header come an object table, an offset table pointing to each object, and a 32-byte trailer that records the size of the offsets and where the top object is. Integers and dates are stored big-endian. A date is the marker byte 0x33 followed by an eight-byte floating-point number of seconds since 1 January 2001 UTC. Most plists written by iOS itself, including app preferences under Library/Preferences, are binary.
When you search a database or a memory dump, the string bplist00 is a reliable sign that a binary plist starts at that offset. Inside SQLite, look for BLOB columns whose first bytes are bplist00.
Tools for reading plists
- plistutil, part of libplist from the libimobiledevice project, converts between binary and XML on Linux, macOS and Windows, for example plistutil -i com.apple.example.plist -o example.xml.
- plutil on macOS prints a plist (plutil -p file.plist) or converts it (plutil -convert xml1 -o out.xml file.plist).
- Python's plistlib reads both formats and represents NSKeyedArchiver references as plistlib.UID objects.
- ccl_bplist and nska_deserialize are open-source Python libraries that read binary plists and resolve NSKeyedArchiver graphs; iLEAPP uses nska_deserialize.
Always convert a copy, never the original evidence file, and record the tool and version.
A related format: typedstream
Some BLOBs that look like archives are not plists at all. The attributedBody column of sms.db (lesson 4.3) holds an NSAttributedString in the older NSArchiver format, called typedstream, whose short header contains the text streamtyped. Plist tools cannot read it; tools such as iLEAPP and imessage-exporter include dedicated decoders.
Mac absolute time
Apple's frameworks measure time from a reference date of 1 January 2001 00:00:00 UTC. Apple's documentation calls this the absolute reference date, and the type that holds it CFAbsoluteTime; examiners usually say Mac absolute time or Cocoa time. The difference from the Unix epoch (1 January 1970 UTC) is a fixed 978,307,200 seconds.
- Unix seconds = Mac absolute seconds + 978,307,200
- Mac absolute seconds = Unix seconds − 978,307,200
The value is always UTC. Any local time you show must come from a separate time zone source, a topic lesson 6.4 covers in depth.
Units you will meet
Mac absolute time appears in several units, and the unit is the most common source of error:
| Unit | Example artifacts | Recognize it by |
|---|---|---|
| Seconds, often with a fraction | Binary plist dates, NSDate in archives, columns such as ZDATE in Core Data stores (Apple's object storage framework, lesson 4.3), Safari visit_time, knowledgeC ZSTARTDATE | About 9 digits before the decimal point for current dates |
| Nanoseconds | sms.db message.date and related columns on iOS 11 and later | About 18 digits |
| Microseconds | Biome SEGB file names (lesson 4.4) | About 15 digits |
Worked conversions
All values are illustrative. The first is the Day 1 call of the Corvane case on the course calendar (Day 1 is 2026-03-10, and the case's local time is UTC+01:00); the other two use an unrelated date.
- Seconds. A binary plist date holds the bytes 41 C7 B0 4A 75 00 00 00, which as a big-endian double are 794,858,730.0. Adding 978,307,200 gives Unix time 1,773,165,930, which is 2026-03-10 18:05:30 UTC, or 19:05:30 local time in the case.
- Nanoseconds. An sms.db date of 800,998,930,482,113,000 divided by 1,000,000,000 is 800,998,930.482113 seconds, which is 2026-05-20 19:42:10.482113 UTC. Read as seconds, the same number would be absurd, billions of years away, which is how you spot the unit.
- Microseconds. A Biome file name of 800998930123456 divided by 1,000,000 is 800,998,930.123456 seconds, which is 2026-05-20 19:42:10.123456 UTC.
The 31-year error
Because 978,307,200 seconds is exactly 11,323 days, confusing the two epochs moves a current date by 31 years and leaves the clock time unchanged. The month and day are also unchanged or differ by one day, depending on how many leap days fall in the span. The value 794,858,730 read as Unix time gives 1995-03-10 18:05:30; Unix time 1,773,165,930 read as Mac absolute time gives 2057-03-10 18:05:30. If a tool shows a plausible day and time in an implausible year, check the epoch before anything else.
NSKeyedArchiver
Apps and system services often need to save objects that are more than simple values: a dictionary that contains dates, custom classes and references to shared objects. Apple's NSKeyedArchiver class serializes such an object graph into a property list, usually binary. The result is a valid plist, so plist tools open it, but the meaning is hidden behind a layer of indirection.
An archive is a dictionary with four top-level keys:
- $archiver: the name of the archiver class, normally NSKeyedArchiver.
- $version: the format version, 100000.
- $top: a dictionary pointing to the root object, usually under the key root.
- $objects: an array that holds every object in the graph, each one stored once.
Objects refer to each other by UID, here simply an index into $objects. In XML form a UID appears as a small dictionary with the key CF$UID; in binary form it is the UID type. Index 0 always holds the string $null, which stands for a nil value. Objects of a class carry a $class key pointing to a class description with $classname (for example NSDictionary or NSDate) and $classes (the class and its parents).
Foundation classes encode their contents under standard keys. A dictionary stores NS.keys and NS.objects, two arrays of UIDs in matching order. An array stores NS.objects. A date stores NS.time, a double in Mac absolute seconds. A mutable string may store NS.string; plain strings are usually stored directly as plist strings.
A worked decoding example
Suppose a BLOB starts with bplist00 and, once read, contains $top with root pointing to UID 1, and this $objects array:
| Index | Content |
|---|---|
| 0 | $null |
| 1 | Dictionary: NS.keys = [UID 2, UID 3], NS.objects = [UID 4, UID 5], $class = UID 7 |
| 2 | bundleIdentifier |
| 3 | lastUsedDate |
| 4 | net.whatsapp.WhatsApp |
| 5 | Dictionary: NS.time = 800998930.0, $class = UID 6 |
| 6 | $classname = NSDate, $classes = [NSDate, NSObject] |
| 7 | $classname = NSDictionary, $classes = [NSDictionary, NSObject] |
Decode it by following the references:
- $top › root is UID 1, so the root object is index 1.
- Index 1 has $class UID 7, whose $classname is NSDictionary, so the root is a dictionary. Its keys are at indexes 2 and 3, its values at indexes 4 and 5, in that order.
- The first pair is bundleIdentifier = net.whatsapp.WhatsApp.
- The second key is lastUsedDate. Its value, index 5, has $class UID 6, an NSDate, with NS.time 800,998,930.0.
- Converting: 800,998,930 + 978,307,200 = 1,779,306,130 Unix seconds, which is 2026-05-20 19:42:10 UTC.
The decoded object is a dictionary with bundleIdentifier net.whatsapp.WhatsApp and lastUsedDate 2026-05-20 19:42:10 UTC (an illustrative date unrelated to the case). A tool such as nska_deserialize produces the same result in one step; walking at least one archive by hand lets you confirm that the tool did it correctly.
Pitfalls
- Nested encodings. A Data value inside an archive may contain another bplist00, a gzip stream or a protobuf. Decode layer by layer and record each step.
- Custom classes. An app can archive its own classes. Their $classname tells you what the object is (for example a message or a contact class) even when no tool knows its fields, and their keys are usually readable names.
- Missing and null values. A UID pointing to index 0 means the value was nil. A key that is absent from the archive was never encoded. The two can mean different things in an app's logic, so report them as stored.
- Shared objects. An object referenced twice is stored once. Some graphs contain cycles, and naive scripts can loop; mature libraries handle this.
- Tool output that hides structure. Some tools flatten archives into text. When a value matters, go back to the raw plist.
Applying this to the Corvane case
Lesson 4.1 used applicationState.db to map WhatsApp's containers on Lena's iPhone. Its compatibilityInfo value for net.whatsapp.WhatsApp is a BLOB beginning with bplist00; decoding the NSKeyedArchiver graph gives bundleIdentifier, bundlePath and sandboxPath, which the examiner compares with the metadata plists. The examiner also opens WhatsApp's preferences plist in the data container and, wherever a date appears, records both the stored value and its conversion. For each timestamp in the notes the examiner writes down the epoch and unit used, so that a reviewer can repeat the conversion.
Exam focus: Recognize binary plists by the bplist00 header and know how dates are stored in XML and binary plists. Be able to convert Mac absolute time in seconds, nanoseconds and microseconds to UTC and recognize the 31-year error, and be able to walk an NSKeyedArchiver graph from $top through UID references in $objects.
Practice questions
Check your understanding. These questions do not count towards the exam.
Sign in to save your progress and continue where you left off. It is free. Sign in