<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://www.theiphonewiki.com/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Chopin4g</id>
	<title>The iPhone Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://www.theiphonewiki.com/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Chopin4g"/>
	<link rel="alternate" type="text/html" href="https://www.theiphonewiki.com/wiki/Special:Contributions/Chopin4g"/>
	<updated>2026-05-25T17:25:42Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.31.14</generator>
	<entry>
		<id>https://www.theiphonewiki.com/w/index.php?title=ITunes_Backup&amp;diff=31824</id>
		<title>ITunes Backup</title>
		<link rel="alternate" type="text/html" href="https://www.theiphonewiki.com/w/index.php?title=ITunes_Backup&amp;diff=31824"/>
		<updated>2013-04-16T06:08:44Z</updated>

		<summary type="html">&lt;p&gt;Chopin4g: /* Record (variable size) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{lowercase}}&lt;br /&gt;
The following description is to describe the '''backup system of [[iTunes]]''', which is often used for forensic analysis of iDevices. This description is for the format used in the latest iTunes 10.5.3 - older versions are slightly different (see [[Understanding iPhone Backup Files|old article]]). The description is only for non-encrypted backups.&lt;br /&gt;
&lt;br /&gt;
On the iDevice there is a file &amp;lt;code&amp;gt;/System/Library/Backup/Domains.plist&amp;lt;/code&amp;gt; which determines what files to backup. There is a differentiation between &amp;quot;domains&amp;quot; and relative files.&lt;br /&gt;
&lt;br /&gt;
In the backup location (see below) there are all backups that iTunes has made so far. Every backup folder has a name made of 20 bytes in hex numbers (lower case) for a full backup. A differential backup has the same folder name, but appened with a dash and the ISO date of the backup (8 digit yyyymmdd) and a dash and the time in 24-hour format with seconds.&lt;br /&gt;
&lt;br /&gt;
In each backup, there are four files with infos, which are described later:&lt;br /&gt;
*Info.plist&lt;br /&gt;
*Manifest.mdbd&lt;br /&gt;
*Manifest.plist&lt;br /&gt;
*Status.plist&lt;br /&gt;
There are also the files themselves, but with a new file name.&lt;br /&gt;
&lt;br /&gt;
The file names are made by a SHA-1 hash of their name, together with their path and domain. Between the domain and the path there is a dash. Example:&lt;br /&gt;
 SHA1('HomeDomain-Library/SMS/sms.db') = 3d0d7e5fb2ce288813306e4d4636395e047a3d28&lt;br /&gt;
It is not clear what would happen in case of hash collisions. Probably Apple assumes it won't happen.&lt;br /&gt;
&lt;br /&gt;
The data itself is encrypted with AES-256 CBC.&lt;br /&gt;
&lt;br /&gt;
===iTunes backup location===&lt;br /&gt;
*Windows XP: &amp;lt;code&amp;gt;%HOMEPATH%\Application Data\Apple Computer\MobileSync\Backup\{UDID}&amp;lt;/code&amp;gt;&lt;br /&gt;
*Windows Vista/7/8: &amp;lt;code&amp;gt;%HOMEPATH%\AppData\Roaming\Apple Computer\MobileSync\Backup\{UDID}&amp;lt;/code&amp;gt;&lt;br /&gt;
*OS X: &amp;lt;code&amp;gt;~/Library/Application Support/MobileSync/Backup/{UDID}&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Info.plist ===&lt;br /&gt;
This is a plaintext plist that contains the following dict:&lt;br /&gt;
*Build Version (string): 9A406 (iOS build version of the device that was backed up)&lt;br /&gt;
*Device Name (string): (name of the device that was backed up)&lt;br /&gt;
*Display Name (string): (name of the device that was backed up)&lt;br /&gt;
*GUID (string): unknown 16-byte GUID without any dashes&lt;br /&gt;
*ICCID (string)&lt;br /&gt;
*IMEI (string)&lt;br /&gt;
*Last Backup Date (date): format &amp;quot;yyyy-mm-ddThh:mm:ssZ&amp;quot;&lt;br /&gt;
*Phone Number (string)&lt;br /&gt;
*Product Type (string): iPhone4,1&lt;br /&gt;
*Product Version (string): 5.0.1&lt;br /&gt;
*Serial Number (string)&lt;br /&gt;
*Sync Settings (dict):&lt;br /&gt;
**Calendar Day Limit (integer): 30&lt;br /&gt;
**Calendars Collections: (array of dict, 1 element):&lt;br /&gt;
***AMSCollectionDisplayName (string): Calendar&lt;br /&gt;
***AMSCollectionFiltered (bool): false&lt;br /&gt;
***AMSCollectionName (string): Calendar&lt;br /&gt;
***AMSCollectionReadOnly (bool): false&lt;br /&gt;
**Data Class Info: (array of dict, 5 elements)&lt;br /&gt;
***[0] dict:&lt;br /&gt;
****kAMSDataClassEnabled (bool): false&lt;br /&gt;
****kAMSDataClassName (string): com.apple.Bookmarks&lt;br /&gt;
****kAMSDataClassReset (bool): false&lt;br /&gt;
***[1] dict:&lt;br /&gt;
****kAMSDataClassEnabled (bool): false&lt;br /&gt;
****kAMSDataClassName (string): com.apple.Calendars&lt;br /&gt;
****kAMSDataClassReset (bool): false&lt;br /&gt;
***[2] dict:&lt;br /&gt;
****kAMSDataClassEnabled (bool): false&lt;br /&gt;
****kAMSDataClassName (string): com.apple.Accounts&lt;br /&gt;
****kAMSDataClassReset (bool): false&lt;br /&gt;
***[3] dict:&lt;br /&gt;
****kAMSDataClassEnabled (bool): false&lt;br /&gt;
****kAMSDataClassName (string): com.apple.MailAccounts&lt;br /&gt;
****kAMSDataClassReset (bool): false&lt;br /&gt;
***[4] dict:&lt;br /&gt;
****kAMSDataClassEnabled (bool): true&lt;br /&gt;
****kAMSDataClassName (string): com.apple.Notes&lt;br /&gt;
****kAMSDataClassReset (bool): false&lt;br /&gt;
**New Record Calendar Name (string): Home&lt;br /&gt;
**iTunes User ID (string): (8-byte hex code)&lt;br /&gt;
*Target Identifier (string): 20-byte hex code&lt;br /&gt;
*Terget Type (string): Device&lt;br /&gt;
*Unique Identifier (string): same 20-byte hex code&lt;br /&gt;
*iBooks Data 2 (data): (base-64 encoded blob, see below)&lt;br /&gt;
*iTunes Files (dict):&lt;br /&gt;
**IC-Info.siv (data): (base-64 encoded blob, see below)&lt;br /&gt;
**PhotosFolderAlbums (data): (base-64 encoded blob, see below)&lt;br /&gt;
**PhotosFolderName (data): (base-64 encoded blob, see below)&lt;br /&gt;
**PhotosFolderPrefs (data): (base-64 encoded blob, see below)&lt;br /&gt;
**ShowMarketing (data): (empty)&lt;br /&gt;
**iTunesPrefs (data): (base-64 encoded blob, see below)&lt;br /&gt;
**iTunesPrefs.plist (data): (base-64 encoded blob, see below)&lt;br /&gt;
*iTunes Settings (dict):&lt;br /&gt;
**LibraryApplications (array of string): The array of string contains the identification string of each application, for example &amp;lt;code&amp;gt;com.apple.store.caseprogram&amp;lt;/code&amp;gt;&lt;br /&gt;
*iTunes Version (string): 10.5.3&lt;br /&gt;
&lt;br /&gt;
==== iBooks Data 2 ====&lt;br /&gt;
This blob is actually another plist (dict):&lt;br /&gt;
*1.2 (dict):&lt;br /&gt;
**BKBookmark (array of dict):&lt;br /&gt;
***[0] dict:&lt;br /&gt;
****bookDatabaseKey (string)&lt;br /&gt;
****date (integer)&lt;br /&gt;
****deletedFlag (bool)&lt;br /&gt;
****highlightColor (integer)&lt;br /&gt;
****lastModification (integer)&lt;br /&gt;
****locationBPlist (data): (base-64 encoded blob, see below)&lt;br /&gt;
****ordinal (integer)&lt;br /&gt;
****serverSyncUniqueId (string): Reading Location&lt;br /&gt;
****type (integer): 1&lt;br /&gt;
*CollectionsData-1.2 (dict):&lt;br /&gt;
**BKCollection (array of 2 dict):&lt;br /&gt;
***[0] dict:&lt;br /&gt;
****databaseKeys (array): (empty)&lt;br /&gt;
****lastModification_Since1970 (integer)&lt;br /&gt;
****ServerSyncUniqueId (string): Pdfs_Collenction_ID&lt;br /&gt;
****sortKey (integer): -2&lt;br /&gt;
****title (string): PDFs&lt;br /&gt;
***[1] dict:&lt;br /&gt;
****databaseKeys (array): (empty)&lt;br /&gt;
****lastModification_Since1970 (integer)&lt;br /&gt;
****ServerSyncUniqueId (string): Pdfs_Collenction_ID&lt;br /&gt;
****sortKey (integer): -1&lt;br /&gt;
****title (string): Books&lt;br /&gt;
**rolling_version (integer): 17&lt;br /&gt;
&lt;br /&gt;
===== Location BPList =====&lt;br /&gt;
This is actually a binary plist with the following content (dict): (example):&lt;br /&gt;
*class (string): BKEpubLocation&lt;br /&gt;
*endOffset (real): 0,0&lt;br /&gt;
*endPath (array of dict):&lt;br /&gt;
**[0] dict&lt;br /&gt;
***id (string): seeAlsoSection&lt;br /&gt;
***index (integer): 32&lt;br /&gt;
***tagName (string): div&lt;br /&gt;
**[1] dcit&lt;br /&gt;
***index (integer): 3&lt;br /&gt;
***tagName (string): p&lt;br /&gt;
*startOffset (real): 0.0&lt;br /&gt;
*startPath (array of dict):&lt;br /&gt;
**[0] dict:&lt;br /&gt;
***id (string): seeAlsoSection&lt;br /&gt;
***index (integer): 32&lt;br /&gt;
***tagName (string): div&lt;br /&gt;
**[1] dict:&lt;br /&gt;
***index (integer): 3&lt;br /&gt;
***tagName (string): p&lt;br /&gt;
*super (dict):&lt;br /&gt;
**class (string): BKLocation&lt;br /&gt;
**ordinal (integer): 3&lt;br /&gt;
&lt;br /&gt;
==== IC-Info.siv ====&lt;br /&gt;
binary file, content unknown&lt;br /&gt;
&lt;br /&gt;
==== PhotosFolderAlbums ====&lt;br /&gt;
[[frpd]] binary file. Starts with 0x66 0x72 0x70 0x64 ('frpd'). Then only very few bytes and the content is mostly zero. Then at 0x68 and 0x26C, 0x470, 0x674, etc. there are folder names (in unicode, starting with the name length).&lt;br /&gt;
&lt;br /&gt;
==== PhotosFolderName ====&lt;br /&gt;
A 0x200 byte long file, starting with the text &amp;quot;Pictures&amp;quot; (in unicode) and the name length before it. Rest filled with zeroes.&lt;br /&gt;
&lt;br /&gt;
==== iTunesPrefs ====&lt;br /&gt;
This is another [[frpd]] file. It contains names of computers found on the network, like iPodPrefs below.&lt;br /&gt;
&lt;br /&gt;
==== iTunesPrefs.plist ====&lt;br /&gt;
plist with this content (dict):&lt;br /&gt;
*ApplicationIDs (array of string): list of applications (like &amp;lt;code&amp;gt;com.apple.iBooks&amp;lt;/code&amp;gt;&lt;br /&gt;
*AudiobookPlaylistIDs (array): (empty)&lt;br /&gt;
*AudioTrackIDs (array): (empty)&lt;br /&gt;
*BookTrackIDs (array of integer): (signed long integer values)&lt;br /&gt;
*LibraryBookTrackIDs (array of integer): (signed long integer values)&lt;br /&gt;
*MoviePlaylistIDs (array): (empty)&lt;br /&gt;
*MovieTrackIDs (array): (empty)&lt;br /&gt;
*MusicAlbumIDs (array): (empty)&lt;br /&gt;
*MusicArtistIDs (array): (empty)&lt;br /&gt;
*MusicGenreNames (array): (empty)&lt;br /&gt;
*MusicPlaylistIDs (array of integer): (signed long integer values)&lt;br /&gt;
*MusicTrackIDs (array): (empty)&lt;br /&gt;
*PodcastChannelIDs (array): (empty)&lt;br /&gt;
*PodcastPlaylistIDs (array): (empty)&lt;br /&gt;
*PodcastTrackIDs (array of integer): (signed long integer values)&lt;br /&gt;
*RingtoneTrackIDs (array): (empty)&lt;br /&gt;
*TVShowAlbumIDs (array): (empty)&lt;br /&gt;
*TVShowNames (array): (empty)&lt;br /&gt;
*TVShowPlaylistIDs (array): (empty)&lt;br /&gt;
*TVShowTrackIDs (array): (empty)&lt;br /&gt;
*iPodPrefs (data): (base-64 encoded blob, see below)&lt;br /&gt;
*iTunesUChannelIDs (array): (empty)&lt;br /&gt;
*iTunesUPlaylistIDs (array): (empty)&lt;br /&gt;
*iTunesUTrackIDs (array): (empty)&lt;br /&gt;
&lt;br /&gt;
===== iPodPrefs =====&lt;br /&gt;
[[frpd]] file, content unknown, but it contains server names on the network it was sync'd to, like iTunesPrefs above.&lt;br /&gt;
&lt;br /&gt;
=== Manifest.mbdb ===&lt;br /&gt;
Binary file containing many text strings. Probably a database of file names in the backup. Format (from [http://code.google.com/p/iphonebackupbrowser/wiki/MbdbMbdxFormat here]):&lt;br /&gt;
==== Header ====&lt;br /&gt;
 6 bytes: 'mbdb\5\0'&lt;br /&gt;
==== Record (variable size) ====&lt;br /&gt;
 string Domain        Backup domain (one of&lt;br /&gt;
                        &amp;quot;AppDomain-com.some.user.installed.app&amp;quot;,&lt;br /&gt;
                        &amp;quot;CameraRollDomain&amp;quot;,&lt;br /&gt;
                        &amp;quot;DatabaseDomain&amp;quot;&lt;br /&gt;
                        &amp;quot;HomeDomain&amp;quot;,&lt;br /&gt;
                        &amp;quot;KeychainDomain&amp;quot;,&lt;br /&gt;
                        &amp;quot;ManagedPreferencesDomain&amp;quot;,&lt;br /&gt;
                        &amp;quot;MediaDomain&amp;quot;,&lt;br /&gt;
                        &amp;quot;MobileDeviceDomain&amp;quot;,&lt;br /&gt;
                        &amp;quot;RootDomain&amp;quot;,&lt;br /&gt;
                        &amp;quot;SystemPreferencesDomain&amp;quot;,&lt;br /&gt;
                        &amp;quot;WirelessDomain&amp;quot;,&lt;br /&gt;
                        ... others?&lt;br /&gt;
 string Path              &lt;br /&gt;
 string LinkTarget    absolute path&lt;br /&gt;
 string DataHash      SHA-1 of file contents, actual file objects only&lt;br /&gt;
 string encryptionKey      Encryption key for encrypted backups&lt;br /&gt;
 uint16 Mode           Unix file permissions. See /usr/include/stat.h  and stat(2)&lt;br /&gt;
                                file mode: 0xAxxx symbolic link (aka S_IFLNK or 00120000)&lt;br /&gt;
                                 0x4xxx directory (aka S_IFDIR or 0040000)&lt;br /&gt;
                                 0x8xxx regular file (aka S_IFREG or 0100000)&lt;br /&gt;
                                Mask out ~ 0xf000 (aka S_IFMT) for file permissions&lt;br /&gt;
 uint32 inode         inode number&lt;br /&gt;
 uint32 uid             owner    &lt;br /&gt;
 uint32 gid             group&lt;br /&gt;
 uint32 mtime        time of last modification&lt;br /&gt;
 uint32 atime         time of last access&lt;br /&gt;
 uint32 ctime         time of last change of status&lt;br /&gt;
 uint64 length        file size (always 0 for link or directory)&lt;br /&gt;
 uint8  protectionclass         unknown&lt;br /&gt;
 uint8  PropertyCount number of properties following&lt;br /&gt;
Property is a couple of strings:&lt;br /&gt;
 string name&lt;br /&gt;
 string value         can be a string or aa binary content&lt;br /&gt;
All values are big endian, strings are composed of a uint16 that contains the length or 0xffff for NULL, then the characters in UTF-8 with canonical decomposition (Unicode normalization form D).&lt;br /&gt;
&lt;br /&gt;
To determine the actual filename corresponding to a record (this will be the actual file in the mobile backup directory), calculate a sha-1 checksum of the Domain and Path seperated by '-' as follows:&lt;br /&gt;
        SHA1(&amp;lt;Domain&amp;gt;-&amp;lt;Path&amp;gt;)&lt;br /&gt;
&lt;br /&gt;
It is possible to modify files in a mobile backup by understanding this structure as well. If you change the file contents, update the DataHash and length&lt;br /&gt;
&lt;br /&gt;
=== Manifest.plist ===&lt;br /&gt;
Binary plist with the following content (dict):&lt;br /&gt;
*Applications (dict):&lt;br /&gt;
**com.apple.iBooks (dict)&lt;br /&gt;
***CFBundleIdentifier (string): com.apple.iBooks&lt;br /&gt;
***CFBundleVersion (string): 804&lt;br /&gt;
***Path (string): /private/var/mobile/Applications/[GUID]/iBooks.app&lt;br /&gt;
**etc. for other apps&lt;br /&gt;
*BackupKeyBag (data): (base-64 encoded blob, see below)&lt;br /&gt;
*Date (date): yyyy-mm-ddThh:mm:ssZ&lt;br /&gt;
*IsEncrypted (bool): false&lt;br /&gt;
*Lockdown (dict):&lt;br /&gt;
**BuildVersion (string): 9A406&lt;br /&gt;
**DeviceName (string)&lt;br /&gt;
**ProductType (string): iPhone4,1&lt;br /&gt;
**ProductVersion (string): 5.0.1&lt;br /&gt;
**SerialNumber (string)&lt;br /&gt;
**UniqueDeviceID (string): 20-byte hex&lt;br /&gt;
**com.apple.Accessibility (dict):&lt;br /&gt;
***InvertDisplayEnabledByiTunes (bool): false&lt;br /&gt;
***MonoAudioEnabledByiTunes (bool): false&lt;br /&gt;
***VoiceOverTouchEnabledByiTunes (bool): false&lt;br /&gt;
***ZoomTouchEnabledByiTunes (bool): false&lt;br /&gt;
**com.apple.MobileDeviceCrashCopy (dict):&lt;br /&gt;
***ShouldPrompt (bool): false&lt;br /&gt;
***ShouldSubmit (bool): false&lt;br /&gt;
**com.apple.TerminalFlashr (dict): (empty)&lt;br /&gt;
**com.apple.iTunes.backup (dict):&lt;br /&gt;
***LastBackupComputerName (string)&lt;br /&gt;
***LastBackupComputerType (string): PC&lt;br /&gt;
**com.apple.itunesstored (dict):&lt;br /&gt;
***AccountAvailableServiceTypes (integer): 0&lt;br /&gt;
***AccountKind (integer): 0&lt;br /&gt;
***AccountServiceTypes (integer): 0&lt;br /&gt;
***AccountSocialEnabled (bool): false&lt;br /&gt;
***AccountStoreFront (string): (unknown text string)&lt;br /&gt;
***AccountURLBagType (string): production&lt;br /&gt;
***AppleID (string)&lt;br /&gt;
***CreditDisplayString (string): (empty string)&lt;br /&gt;
***DSPersonID (integer)&lt;br /&gt;
***TempStorefront (string): (unknown text string)&lt;br /&gt;
**com.apple.mobile.data_sync (dict):&lt;br /&gt;
***Bookmarks (dict):&lt;br /&gt;
****AccountNames (array of string, 1 element): iCloud&lt;br /&gt;
****Sources (array of string, 1 element): iCloud&lt;br /&gt;
***Calendars (dict):&lt;br /&gt;
****AccountNames (array of string, 1 element): iCloud&lt;br /&gt;
****Sources (array of string, 1 element): iCloud&lt;br /&gt;
***Contacts (dict):&lt;br /&gt;
****AccountNames (array of string, 1 element): iCloud&lt;br /&gt;
****Sources (array of string, 1 element): iCloud&lt;br /&gt;
**com.apple.mobile.iTunes.accessories (dict): (empty)&lt;br /&gt;
**com.apple.mobile.wireless_lockdown (dict): (empty)&lt;br /&gt;
*SystemDomainsVersion (string): 12.0&lt;br /&gt;
*Version (string): 9.0&lt;br /&gt;
*WasPasscodeSet (bool): false&lt;br /&gt;
&lt;br /&gt;
==== BackupKeyBag ====&lt;br /&gt;
Binary file in the following format:&lt;br /&gt;
*4-byte block identifier&lt;br /&gt;
*4-byte block length (most significant byte first), length 4 means total block length of 0xC bytes.&lt;br /&gt;
*data&lt;br /&gt;
First block is &amp;quot;VERS&amp;quot; with a version number of 3. There are a lot of block types: VERS, TYPE, UUID, HMCK, WRAP, SALT, ITER, UUID, CLAS, WRAP, KTYP, WPKY, etc.&lt;br /&gt;
&lt;br /&gt;
=== Status.plist ===&lt;br /&gt;
Binary plist with the following content (dict):&lt;br /&gt;
*BackupState (string): new&lt;br /&gt;
*Date (date): &amp;quot;yyyy-mm-ddThh:mm:ssZ&amp;quot;&lt;br /&gt;
*IsFullBackup (bool): false&lt;br /&gt;
*SnapshotState (string): finished&lt;br /&gt;
*UUID (string)&lt;br /&gt;
*Version (string): 2.4&lt;br /&gt;
&lt;br /&gt;
== Files ==&lt;br /&gt;
Here is a list of commonly used files:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;font-size: small; text-align: center; table-layout: fixed; border-collapse: collapse;&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!domain&lt;br /&gt;
!path and file name&lt;br /&gt;
!SHA-1 backup file name&lt;br /&gt;
|-&lt;br /&gt;
|HomeDomain&lt;br /&gt;
|Library/SMS/sms.db&lt;br /&gt;
|3d0d7e5fb2ce288813306e4d4636395e047a3d28&lt;br /&gt;
|-&lt;br /&gt;
|HomeDomain&lt;br /&gt;
|Library/AddressBook/AddressBook.sqlitedb&lt;br /&gt;
|31bb7ba8914766d4ba40d6dfb6113c8b614be442&lt;br /&gt;
|-&lt;br /&gt;
|HomeDomain&lt;br /&gt;
|Library/Notes/notes.sqlite&lt;br /&gt;
|ca3bc056d4da0bbf88b5fb3be254f3b7147e639c&lt;br /&gt;
|-&lt;br /&gt;
|WirelessDomain&lt;br /&gt;
|Library/CallHistory/call_history.db&lt;br /&gt;
|2b2b0084a1bc3a5ac8c27afdf14afb42c61a19ca&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
*[[:/System/Library/Backup]]&lt;br /&gt;
*[[Backup the iPhone Flash for restore without iTunes]]&lt;br /&gt;
*[[Understanding iPhone Backup Files]]&lt;br /&gt;
*[http://www.ssddfj.org/papers/SSDDFJ_V4_1_Bader_Bagilli.pdf iPhone 3GS Forensics]&lt;br /&gt;
*[http://www.scip.ch/?labs.20110512 SCIP backup infos (german only)]&lt;br /&gt;
*[http://stackoverflow.com/questions/6569004/how-to-parse-the-manifest-mbdb-file-in-an-ios-5-0-beta-2-without-manifest-mbdx SHA-1 hash generation]&lt;br /&gt;
*[http://code.google.com/p/iphonebackupbrowser/wiki/MbdbMbdxFormat description of mbdx and mbdb files]&lt;/div&gt;</summary>
		<author><name>Chopin4g</name></author>
		
	</entry>
	<entry>
		<id>https://www.theiphonewiki.com/w/index.php?title=ITunes_Backup&amp;diff=31823</id>
		<title>ITunes Backup</title>
		<link rel="alternate" type="text/html" href="https://www.theiphonewiki.com/w/index.php?title=ITunes_Backup&amp;diff=31823"/>
		<updated>2013-04-16T06:03:48Z</updated>

		<summary type="html">&lt;p&gt;Chopin4g: /* Manifest.mbdb */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{lowercase}}&lt;br /&gt;
The following description is to describe the '''backup system of [[iTunes]]''', which is often used for forensic analysis of iDevices. This description is for the format used in the latest iTunes 10.5.3 - older versions are slightly different (see [[Understanding iPhone Backup Files|old article]]). The description is only for non-encrypted backups.&lt;br /&gt;
&lt;br /&gt;
On the iDevice there is a file &amp;lt;code&amp;gt;/System/Library/Backup/Domains.plist&amp;lt;/code&amp;gt; which determines what files to backup. There is a differentiation between &amp;quot;domains&amp;quot; and relative files.&lt;br /&gt;
&lt;br /&gt;
In the backup location (see below) there are all backups that iTunes has made so far. Every backup folder has a name made of 20 bytes in hex numbers (lower case) for a full backup. A differential backup has the same folder name, but appened with a dash and the ISO date of the backup (8 digit yyyymmdd) and a dash and the time in 24-hour format with seconds.&lt;br /&gt;
&lt;br /&gt;
In each backup, there are four files with infos, which are described later:&lt;br /&gt;
*Info.plist&lt;br /&gt;
*Manifest.mdbd&lt;br /&gt;
*Manifest.plist&lt;br /&gt;
*Status.plist&lt;br /&gt;
There are also the files themselves, but with a new file name.&lt;br /&gt;
&lt;br /&gt;
The file names are made by a SHA-1 hash of their name, together with their path and domain. Between the domain and the path there is a dash. Example:&lt;br /&gt;
 SHA1('HomeDomain-Library/SMS/sms.db') = 3d0d7e5fb2ce288813306e4d4636395e047a3d28&lt;br /&gt;
It is not clear what would happen in case of hash collisions. Probably Apple assumes it won't happen.&lt;br /&gt;
&lt;br /&gt;
The data itself is encrypted with AES-256 CBC.&lt;br /&gt;
&lt;br /&gt;
===iTunes backup location===&lt;br /&gt;
*Windows XP: &amp;lt;code&amp;gt;%HOMEPATH%\Application Data\Apple Computer\MobileSync\Backup\{UDID}&amp;lt;/code&amp;gt;&lt;br /&gt;
*Windows Vista/7/8: &amp;lt;code&amp;gt;%HOMEPATH%\AppData\Roaming\Apple Computer\MobileSync\Backup\{UDID}&amp;lt;/code&amp;gt;&lt;br /&gt;
*OS X: &amp;lt;code&amp;gt;~/Library/Application Support/MobileSync/Backup/{UDID}&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Info.plist ===&lt;br /&gt;
This is a plaintext plist that contains the following dict:&lt;br /&gt;
*Build Version (string): 9A406 (iOS build version of the device that was backed up)&lt;br /&gt;
*Device Name (string): (name of the device that was backed up)&lt;br /&gt;
*Display Name (string): (name of the device that was backed up)&lt;br /&gt;
*GUID (string): unknown 16-byte GUID without any dashes&lt;br /&gt;
*ICCID (string)&lt;br /&gt;
*IMEI (string)&lt;br /&gt;
*Last Backup Date (date): format &amp;quot;yyyy-mm-ddThh:mm:ssZ&amp;quot;&lt;br /&gt;
*Phone Number (string)&lt;br /&gt;
*Product Type (string): iPhone4,1&lt;br /&gt;
*Product Version (string): 5.0.1&lt;br /&gt;
*Serial Number (string)&lt;br /&gt;
*Sync Settings (dict):&lt;br /&gt;
**Calendar Day Limit (integer): 30&lt;br /&gt;
**Calendars Collections: (array of dict, 1 element):&lt;br /&gt;
***AMSCollectionDisplayName (string): Calendar&lt;br /&gt;
***AMSCollectionFiltered (bool): false&lt;br /&gt;
***AMSCollectionName (string): Calendar&lt;br /&gt;
***AMSCollectionReadOnly (bool): false&lt;br /&gt;
**Data Class Info: (array of dict, 5 elements)&lt;br /&gt;
***[0] dict:&lt;br /&gt;
****kAMSDataClassEnabled (bool): false&lt;br /&gt;
****kAMSDataClassName (string): com.apple.Bookmarks&lt;br /&gt;
****kAMSDataClassReset (bool): false&lt;br /&gt;
***[1] dict:&lt;br /&gt;
****kAMSDataClassEnabled (bool): false&lt;br /&gt;
****kAMSDataClassName (string): com.apple.Calendars&lt;br /&gt;
****kAMSDataClassReset (bool): false&lt;br /&gt;
***[2] dict:&lt;br /&gt;
****kAMSDataClassEnabled (bool): false&lt;br /&gt;
****kAMSDataClassName (string): com.apple.Accounts&lt;br /&gt;
****kAMSDataClassReset (bool): false&lt;br /&gt;
***[3] dict:&lt;br /&gt;
****kAMSDataClassEnabled (bool): false&lt;br /&gt;
****kAMSDataClassName (string): com.apple.MailAccounts&lt;br /&gt;
****kAMSDataClassReset (bool): false&lt;br /&gt;
***[4] dict:&lt;br /&gt;
****kAMSDataClassEnabled (bool): true&lt;br /&gt;
****kAMSDataClassName (string): com.apple.Notes&lt;br /&gt;
****kAMSDataClassReset (bool): false&lt;br /&gt;
**New Record Calendar Name (string): Home&lt;br /&gt;
**iTunes User ID (string): (8-byte hex code)&lt;br /&gt;
*Target Identifier (string): 20-byte hex code&lt;br /&gt;
*Terget Type (string): Device&lt;br /&gt;
*Unique Identifier (string): same 20-byte hex code&lt;br /&gt;
*iBooks Data 2 (data): (base-64 encoded blob, see below)&lt;br /&gt;
*iTunes Files (dict):&lt;br /&gt;
**IC-Info.siv (data): (base-64 encoded blob, see below)&lt;br /&gt;
**PhotosFolderAlbums (data): (base-64 encoded blob, see below)&lt;br /&gt;
**PhotosFolderName (data): (base-64 encoded blob, see below)&lt;br /&gt;
**PhotosFolderPrefs (data): (base-64 encoded blob, see below)&lt;br /&gt;
**ShowMarketing (data): (empty)&lt;br /&gt;
**iTunesPrefs (data): (base-64 encoded blob, see below)&lt;br /&gt;
**iTunesPrefs.plist (data): (base-64 encoded blob, see below)&lt;br /&gt;
*iTunes Settings (dict):&lt;br /&gt;
**LibraryApplications (array of string): The array of string contains the identification string of each application, for example &amp;lt;code&amp;gt;com.apple.store.caseprogram&amp;lt;/code&amp;gt;&lt;br /&gt;
*iTunes Version (string): 10.5.3&lt;br /&gt;
&lt;br /&gt;
==== iBooks Data 2 ====&lt;br /&gt;
This blob is actually another plist (dict):&lt;br /&gt;
*1.2 (dict):&lt;br /&gt;
**BKBookmark (array of dict):&lt;br /&gt;
***[0] dict:&lt;br /&gt;
****bookDatabaseKey (string)&lt;br /&gt;
****date (integer)&lt;br /&gt;
****deletedFlag (bool)&lt;br /&gt;
****highlightColor (integer)&lt;br /&gt;
****lastModification (integer)&lt;br /&gt;
****locationBPlist (data): (base-64 encoded blob, see below)&lt;br /&gt;
****ordinal (integer)&lt;br /&gt;
****serverSyncUniqueId (string): Reading Location&lt;br /&gt;
****type (integer): 1&lt;br /&gt;
*CollectionsData-1.2 (dict):&lt;br /&gt;
**BKCollection (array of 2 dict):&lt;br /&gt;
***[0] dict:&lt;br /&gt;
****databaseKeys (array): (empty)&lt;br /&gt;
****lastModification_Since1970 (integer)&lt;br /&gt;
****ServerSyncUniqueId (string): Pdfs_Collenction_ID&lt;br /&gt;
****sortKey (integer): -2&lt;br /&gt;
****title (string): PDFs&lt;br /&gt;
***[1] dict:&lt;br /&gt;
****databaseKeys (array): (empty)&lt;br /&gt;
****lastModification_Since1970 (integer)&lt;br /&gt;
****ServerSyncUniqueId (string): Pdfs_Collenction_ID&lt;br /&gt;
****sortKey (integer): -1&lt;br /&gt;
****title (string): Books&lt;br /&gt;
**rolling_version (integer): 17&lt;br /&gt;
&lt;br /&gt;
===== Location BPList =====&lt;br /&gt;
This is actually a binary plist with the following content (dict): (example):&lt;br /&gt;
*class (string): BKEpubLocation&lt;br /&gt;
*endOffset (real): 0,0&lt;br /&gt;
*endPath (array of dict):&lt;br /&gt;
**[0] dict&lt;br /&gt;
***id (string): seeAlsoSection&lt;br /&gt;
***index (integer): 32&lt;br /&gt;
***tagName (string): div&lt;br /&gt;
**[1] dcit&lt;br /&gt;
***index (integer): 3&lt;br /&gt;
***tagName (string): p&lt;br /&gt;
*startOffset (real): 0.0&lt;br /&gt;
*startPath (array of dict):&lt;br /&gt;
**[0] dict:&lt;br /&gt;
***id (string): seeAlsoSection&lt;br /&gt;
***index (integer): 32&lt;br /&gt;
***tagName (string): div&lt;br /&gt;
**[1] dict:&lt;br /&gt;
***index (integer): 3&lt;br /&gt;
***tagName (string): p&lt;br /&gt;
*super (dict):&lt;br /&gt;
**class (string): BKLocation&lt;br /&gt;
**ordinal (integer): 3&lt;br /&gt;
&lt;br /&gt;
==== IC-Info.siv ====&lt;br /&gt;
binary file, content unknown&lt;br /&gt;
&lt;br /&gt;
==== PhotosFolderAlbums ====&lt;br /&gt;
[[frpd]] binary file. Starts with 0x66 0x72 0x70 0x64 ('frpd'). Then only very few bytes and the content is mostly zero. Then at 0x68 and 0x26C, 0x470, 0x674, etc. there are folder names (in unicode, starting with the name length).&lt;br /&gt;
&lt;br /&gt;
==== PhotosFolderName ====&lt;br /&gt;
A 0x200 byte long file, starting with the text &amp;quot;Pictures&amp;quot; (in unicode) and the name length before it. Rest filled with zeroes.&lt;br /&gt;
&lt;br /&gt;
==== iTunesPrefs ====&lt;br /&gt;
This is another [[frpd]] file. It contains names of computers found on the network, like iPodPrefs below.&lt;br /&gt;
&lt;br /&gt;
==== iTunesPrefs.plist ====&lt;br /&gt;
plist with this content (dict):&lt;br /&gt;
*ApplicationIDs (array of string): list of applications (like &amp;lt;code&amp;gt;com.apple.iBooks&amp;lt;/code&amp;gt;&lt;br /&gt;
*AudiobookPlaylistIDs (array): (empty)&lt;br /&gt;
*AudioTrackIDs (array): (empty)&lt;br /&gt;
*BookTrackIDs (array of integer): (signed long integer values)&lt;br /&gt;
*LibraryBookTrackIDs (array of integer): (signed long integer values)&lt;br /&gt;
*MoviePlaylistIDs (array): (empty)&lt;br /&gt;
*MovieTrackIDs (array): (empty)&lt;br /&gt;
*MusicAlbumIDs (array): (empty)&lt;br /&gt;
*MusicArtistIDs (array): (empty)&lt;br /&gt;
*MusicGenreNames (array): (empty)&lt;br /&gt;
*MusicPlaylistIDs (array of integer): (signed long integer values)&lt;br /&gt;
*MusicTrackIDs (array): (empty)&lt;br /&gt;
*PodcastChannelIDs (array): (empty)&lt;br /&gt;
*PodcastPlaylistIDs (array): (empty)&lt;br /&gt;
*PodcastTrackIDs (array of integer): (signed long integer values)&lt;br /&gt;
*RingtoneTrackIDs (array): (empty)&lt;br /&gt;
*TVShowAlbumIDs (array): (empty)&lt;br /&gt;
*TVShowNames (array): (empty)&lt;br /&gt;
*TVShowPlaylistIDs (array): (empty)&lt;br /&gt;
*TVShowTrackIDs (array): (empty)&lt;br /&gt;
*iPodPrefs (data): (base-64 encoded blob, see below)&lt;br /&gt;
*iTunesUChannelIDs (array): (empty)&lt;br /&gt;
*iTunesUPlaylistIDs (array): (empty)&lt;br /&gt;
*iTunesUTrackIDs (array): (empty)&lt;br /&gt;
&lt;br /&gt;
===== iPodPrefs =====&lt;br /&gt;
[[frpd]] file, content unknown, but it contains server names on the network it was sync'd to, like iTunesPrefs above.&lt;br /&gt;
&lt;br /&gt;
=== Manifest.mbdb ===&lt;br /&gt;
Binary file containing many text strings. Probably a database of file names in the backup. Format (from [http://code.google.com/p/iphonebackupbrowser/wiki/MbdbMbdxFormat here]):&lt;br /&gt;
==== Header ====&lt;br /&gt;
 6 bytes: 'mbdb\5\0'&lt;br /&gt;
==== Record (variable size) ====&lt;br /&gt;
 string Domain        Backup domain (one of&lt;br /&gt;
                        &amp;quot;AppDomain-com.some.user.installed.app&amp;quot;,&lt;br /&gt;
                        &amp;quot;CameraRollDomain&amp;quot;,&lt;br /&gt;
                        &amp;quot;DatabaseDomain&amp;quot;&lt;br /&gt;
                        &amp;quot;HomeDomain&amp;quot;,&lt;br /&gt;
                        &amp;quot;KeychainDomain&amp;quot;,&lt;br /&gt;
                        &amp;quot;ManagedPreferencesDomain&amp;quot;,&lt;br /&gt;
                        &amp;quot;MediaDomain&amp;quot;,&lt;br /&gt;
                        &amp;quot;MobileDeviceDomain&amp;quot;,&lt;br /&gt;
                        &amp;quot;RootDomain&amp;quot;,&lt;br /&gt;
                        &amp;quot;SystemPreferencesDomain&amp;quot;,&lt;br /&gt;
                        &amp;quot;WirelessDomain&amp;quot;,&lt;br /&gt;
                        ... others?&lt;br /&gt;
 string Path              &lt;br /&gt;
 string LinkTarget    absolute path&lt;br /&gt;
 string DataHash      SHA-1, some files only&lt;br /&gt;
 string encryptionKey      Encryption key for encrypted backups&lt;br /&gt;
 uint16 Mode           Unix file permissions. See /usr/include/stat.h  and stat(2)&lt;br /&gt;
                                file mode: 0xAxxx symbolic link (aka S_IFLNK or 00120000)&lt;br /&gt;
                                 0x4xxx directory (aka S_IFDIR or 0040000)&lt;br /&gt;
                                 0x8xxx regular file (aka S_IFREG or 0100000)&lt;br /&gt;
                                Mask out ~ 0xf000 (aka S_IFMT) for file permissions&lt;br /&gt;
 uint32 inode         inode number&lt;br /&gt;
 uint32 uid             owner    &lt;br /&gt;
 uint32 gid             group&lt;br /&gt;
 uint32 mtime        time of last modification&lt;br /&gt;
 uint32 atime         time of last access&lt;br /&gt;
 uint32 ctime         time of last change of status&lt;br /&gt;
 uint64 length        file size (always 0 for link or directory)&lt;br /&gt;
 uint8  protectionclass         unknown&lt;br /&gt;
 uint8  PropertyCount number of properties following&lt;br /&gt;
Property is a couple of strings:&lt;br /&gt;
 string name&lt;br /&gt;
 string value         can be a string or aa binary content&lt;br /&gt;
All values are big endian, strings are composed of a uint16 that contains the length or 0xffff for NULL, then the characters in UTF-8 with canonical decomposition (Unicode normalization form D).&lt;br /&gt;
&lt;br /&gt;
To determine the actual filename corresponding to a record (this will be the actual file in the mobile backup directory), calculate a sha-1 checksum of the Domain and Path seperated by '-' as follows:&lt;br /&gt;
        SHA1(&amp;lt;Domain&amp;gt;-&amp;lt;Path&amp;gt;)&lt;br /&gt;
&lt;br /&gt;
=== Manifest.plist ===&lt;br /&gt;
Binary plist with the following content (dict):&lt;br /&gt;
*Applications (dict):&lt;br /&gt;
**com.apple.iBooks (dict)&lt;br /&gt;
***CFBundleIdentifier (string): com.apple.iBooks&lt;br /&gt;
***CFBundleVersion (string): 804&lt;br /&gt;
***Path (string): /private/var/mobile/Applications/[GUID]/iBooks.app&lt;br /&gt;
**etc. for other apps&lt;br /&gt;
*BackupKeyBag (data): (base-64 encoded blob, see below)&lt;br /&gt;
*Date (date): yyyy-mm-ddThh:mm:ssZ&lt;br /&gt;
*IsEncrypted (bool): false&lt;br /&gt;
*Lockdown (dict):&lt;br /&gt;
**BuildVersion (string): 9A406&lt;br /&gt;
**DeviceName (string)&lt;br /&gt;
**ProductType (string): iPhone4,1&lt;br /&gt;
**ProductVersion (string): 5.0.1&lt;br /&gt;
**SerialNumber (string)&lt;br /&gt;
**UniqueDeviceID (string): 20-byte hex&lt;br /&gt;
**com.apple.Accessibility (dict):&lt;br /&gt;
***InvertDisplayEnabledByiTunes (bool): false&lt;br /&gt;
***MonoAudioEnabledByiTunes (bool): false&lt;br /&gt;
***VoiceOverTouchEnabledByiTunes (bool): false&lt;br /&gt;
***ZoomTouchEnabledByiTunes (bool): false&lt;br /&gt;
**com.apple.MobileDeviceCrashCopy (dict):&lt;br /&gt;
***ShouldPrompt (bool): false&lt;br /&gt;
***ShouldSubmit (bool): false&lt;br /&gt;
**com.apple.TerminalFlashr (dict): (empty)&lt;br /&gt;
**com.apple.iTunes.backup (dict):&lt;br /&gt;
***LastBackupComputerName (string)&lt;br /&gt;
***LastBackupComputerType (string): PC&lt;br /&gt;
**com.apple.itunesstored (dict):&lt;br /&gt;
***AccountAvailableServiceTypes (integer): 0&lt;br /&gt;
***AccountKind (integer): 0&lt;br /&gt;
***AccountServiceTypes (integer): 0&lt;br /&gt;
***AccountSocialEnabled (bool): false&lt;br /&gt;
***AccountStoreFront (string): (unknown text string)&lt;br /&gt;
***AccountURLBagType (string): production&lt;br /&gt;
***AppleID (string)&lt;br /&gt;
***CreditDisplayString (string): (empty string)&lt;br /&gt;
***DSPersonID (integer)&lt;br /&gt;
***TempStorefront (string): (unknown text string)&lt;br /&gt;
**com.apple.mobile.data_sync (dict):&lt;br /&gt;
***Bookmarks (dict):&lt;br /&gt;
****AccountNames (array of string, 1 element): iCloud&lt;br /&gt;
****Sources (array of string, 1 element): iCloud&lt;br /&gt;
***Calendars (dict):&lt;br /&gt;
****AccountNames (array of string, 1 element): iCloud&lt;br /&gt;
****Sources (array of string, 1 element): iCloud&lt;br /&gt;
***Contacts (dict):&lt;br /&gt;
****AccountNames (array of string, 1 element): iCloud&lt;br /&gt;
****Sources (array of string, 1 element): iCloud&lt;br /&gt;
**com.apple.mobile.iTunes.accessories (dict): (empty)&lt;br /&gt;
**com.apple.mobile.wireless_lockdown (dict): (empty)&lt;br /&gt;
*SystemDomainsVersion (string): 12.0&lt;br /&gt;
*Version (string): 9.0&lt;br /&gt;
*WasPasscodeSet (bool): false&lt;br /&gt;
&lt;br /&gt;
==== BackupKeyBag ====&lt;br /&gt;
Binary file in the following format:&lt;br /&gt;
*4-byte block identifier&lt;br /&gt;
*4-byte block length (most significant byte first), length 4 means total block length of 0xC bytes.&lt;br /&gt;
*data&lt;br /&gt;
First block is &amp;quot;VERS&amp;quot; with a version number of 3. There are a lot of block types: VERS, TYPE, UUID, HMCK, WRAP, SALT, ITER, UUID, CLAS, WRAP, KTYP, WPKY, etc.&lt;br /&gt;
&lt;br /&gt;
=== Status.plist ===&lt;br /&gt;
Binary plist with the following content (dict):&lt;br /&gt;
*BackupState (string): new&lt;br /&gt;
*Date (date): &amp;quot;yyyy-mm-ddThh:mm:ssZ&amp;quot;&lt;br /&gt;
*IsFullBackup (bool): false&lt;br /&gt;
*SnapshotState (string): finished&lt;br /&gt;
*UUID (string)&lt;br /&gt;
*Version (string): 2.4&lt;br /&gt;
&lt;br /&gt;
== Files ==&lt;br /&gt;
Here is a list of commonly used files:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;font-size: small; text-align: center; table-layout: fixed; border-collapse: collapse;&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!domain&lt;br /&gt;
!path and file name&lt;br /&gt;
!SHA-1 backup file name&lt;br /&gt;
|-&lt;br /&gt;
|HomeDomain&lt;br /&gt;
|Library/SMS/sms.db&lt;br /&gt;
|3d0d7e5fb2ce288813306e4d4636395e047a3d28&lt;br /&gt;
|-&lt;br /&gt;
|HomeDomain&lt;br /&gt;
|Library/AddressBook/AddressBook.sqlitedb&lt;br /&gt;
|31bb7ba8914766d4ba40d6dfb6113c8b614be442&lt;br /&gt;
|-&lt;br /&gt;
|HomeDomain&lt;br /&gt;
|Library/Notes/notes.sqlite&lt;br /&gt;
|ca3bc056d4da0bbf88b5fb3be254f3b7147e639c&lt;br /&gt;
|-&lt;br /&gt;
|WirelessDomain&lt;br /&gt;
|Library/CallHistory/call_history.db&lt;br /&gt;
|2b2b0084a1bc3a5ac8c27afdf14afb42c61a19ca&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
*[[:/System/Library/Backup]]&lt;br /&gt;
*[[Backup the iPhone Flash for restore without iTunes]]&lt;br /&gt;
*[[Understanding iPhone Backup Files]]&lt;br /&gt;
*[http://www.ssddfj.org/papers/SSDDFJ_V4_1_Bader_Bagilli.pdf iPhone 3GS Forensics]&lt;br /&gt;
*[http://www.scip.ch/?labs.20110512 SCIP backup infos (german only)]&lt;br /&gt;
*[http://stackoverflow.com/questions/6569004/how-to-parse-the-manifest-mbdb-file-in-an-ios-5-0-beta-2-without-manifest-mbdx SHA-1 hash generation]&lt;br /&gt;
*[http://code.google.com/p/iphonebackupbrowser/wiki/MbdbMbdxFormat description of mbdx and mbdb files]&lt;/div&gt;</summary>
		<author><name>Chopin4g</name></author>
		
	</entry>
	<entry>
		<id>https://www.theiphonewiki.com/w/index.php?title=ITunes_Backup&amp;diff=31822</id>
		<title>ITunes Backup</title>
		<link rel="alternate" type="text/html" href="https://www.theiphonewiki.com/w/index.php?title=ITunes_Backup&amp;diff=31822"/>
		<updated>2013-04-16T06:00:53Z</updated>

		<summary type="html">&lt;p&gt;Chopin4g: /* Record (variable size) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{lowercase}}&lt;br /&gt;
The following description is to describe the '''backup system of [[iTunes]]''', which is often used for forensic analysis of iDevices. This description is for the format used in the latest iTunes 10.5.3 - older versions are slightly different (see [[Understanding iPhone Backup Files|old article]]). The description is only for non-encrypted backups.&lt;br /&gt;
&lt;br /&gt;
On the iDevice there is a file &amp;lt;code&amp;gt;/System/Library/Backup/Domains.plist&amp;lt;/code&amp;gt; which determines what files to backup. There is a differentiation between &amp;quot;domains&amp;quot; and relative files.&lt;br /&gt;
&lt;br /&gt;
In the backup location (see below) there are all backups that iTunes has made so far. Every backup folder has a name made of 20 bytes in hex numbers (lower case) for a full backup. A differential backup has the same folder name, but appened with a dash and the ISO date of the backup (8 digit yyyymmdd) and a dash and the time in 24-hour format with seconds.&lt;br /&gt;
&lt;br /&gt;
In each backup, there are four files with infos, which are described later:&lt;br /&gt;
*Info.plist&lt;br /&gt;
*Manifest.mdbd&lt;br /&gt;
*Manifest.plist&lt;br /&gt;
*Status.plist&lt;br /&gt;
There are also the files themselves, but with a new file name.&lt;br /&gt;
&lt;br /&gt;
The file names are made by a SHA-1 hash of their name, together with their path and domain. Between the domain and the path there is a dash. Example:&lt;br /&gt;
 SHA1('HomeDomain-Library/SMS/sms.db') = 3d0d7e5fb2ce288813306e4d4636395e047a3d28&lt;br /&gt;
It is not clear what would happen in case of hash collisions. Probably Apple assumes it won't happen.&lt;br /&gt;
&lt;br /&gt;
The data itself is encrypted with AES-256 CBC.&lt;br /&gt;
&lt;br /&gt;
===iTunes backup location===&lt;br /&gt;
*Windows XP: &amp;lt;code&amp;gt;%HOMEPATH%\Application Data\Apple Computer\MobileSync\Backup\{UDID}&amp;lt;/code&amp;gt;&lt;br /&gt;
*Windows Vista/7/8: &amp;lt;code&amp;gt;%HOMEPATH%\AppData\Roaming\Apple Computer\MobileSync\Backup\{UDID}&amp;lt;/code&amp;gt;&lt;br /&gt;
*OS X: &amp;lt;code&amp;gt;~/Library/Application Support/MobileSync/Backup/{UDID}&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Info.plist ===&lt;br /&gt;
This is a plaintext plist that contains the following dict:&lt;br /&gt;
*Build Version (string): 9A406 (iOS build version of the device that was backed up)&lt;br /&gt;
*Device Name (string): (name of the device that was backed up)&lt;br /&gt;
*Display Name (string): (name of the device that was backed up)&lt;br /&gt;
*GUID (string): unknown 16-byte GUID without any dashes&lt;br /&gt;
*ICCID (string)&lt;br /&gt;
*IMEI (string)&lt;br /&gt;
*Last Backup Date (date): format &amp;quot;yyyy-mm-ddThh:mm:ssZ&amp;quot;&lt;br /&gt;
*Phone Number (string)&lt;br /&gt;
*Product Type (string): iPhone4,1&lt;br /&gt;
*Product Version (string): 5.0.1&lt;br /&gt;
*Serial Number (string)&lt;br /&gt;
*Sync Settings (dict):&lt;br /&gt;
**Calendar Day Limit (integer): 30&lt;br /&gt;
**Calendars Collections: (array of dict, 1 element):&lt;br /&gt;
***AMSCollectionDisplayName (string): Calendar&lt;br /&gt;
***AMSCollectionFiltered (bool): false&lt;br /&gt;
***AMSCollectionName (string): Calendar&lt;br /&gt;
***AMSCollectionReadOnly (bool): false&lt;br /&gt;
**Data Class Info: (array of dict, 5 elements)&lt;br /&gt;
***[0] dict:&lt;br /&gt;
****kAMSDataClassEnabled (bool): false&lt;br /&gt;
****kAMSDataClassName (string): com.apple.Bookmarks&lt;br /&gt;
****kAMSDataClassReset (bool): false&lt;br /&gt;
***[1] dict:&lt;br /&gt;
****kAMSDataClassEnabled (bool): false&lt;br /&gt;
****kAMSDataClassName (string): com.apple.Calendars&lt;br /&gt;
****kAMSDataClassReset (bool): false&lt;br /&gt;
***[2] dict:&lt;br /&gt;
****kAMSDataClassEnabled (bool): false&lt;br /&gt;
****kAMSDataClassName (string): com.apple.Accounts&lt;br /&gt;
****kAMSDataClassReset (bool): false&lt;br /&gt;
***[3] dict:&lt;br /&gt;
****kAMSDataClassEnabled (bool): false&lt;br /&gt;
****kAMSDataClassName (string): com.apple.MailAccounts&lt;br /&gt;
****kAMSDataClassReset (bool): false&lt;br /&gt;
***[4] dict:&lt;br /&gt;
****kAMSDataClassEnabled (bool): true&lt;br /&gt;
****kAMSDataClassName (string): com.apple.Notes&lt;br /&gt;
****kAMSDataClassReset (bool): false&lt;br /&gt;
**New Record Calendar Name (string): Home&lt;br /&gt;
**iTunes User ID (string): (8-byte hex code)&lt;br /&gt;
*Target Identifier (string): 20-byte hex code&lt;br /&gt;
*Terget Type (string): Device&lt;br /&gt;
*Unique Identifier (string): same 20-byte hex code&lt;br /&gt;
*iBooks Data 2 (data): (base-64 encoded blob, see below)&lt;br /&gt;
*iTunes Files (dict):&lt;br /&gt;
**IC-Info.siv (data): (base-64 encoded blob, see below)&lt;br /&gt;
**PhotosFolderAlbums (data): (base-64 encoded blob, see below)&lt;br /&gt;
**PhotosFolderName (data): (base-64 encoded blob, see below)&lt;br /&gt;
**PhotosFolderPrefs (data): (base-64 encoded blob, see below)&lt;br /&gt;
**ShowMarketing (data): (empty)&lt;br /&gt;
**iTunesPrefs (data): (base-64 encoded blob, see below)&lt;br /&gt;
**iTunesPrefs.plist (data): (base-64 encoded blob, see below)&lt;br /&gt;
*iTunes Settings (dict):&lt;br /&gt;
**LibraryApplications (array of string): The array of string contains the identification string of each application, for example &amp;lt;code&amp;gt;com.apple.store.caseprogram&amp;lt;/code&amp;gt;&lt;br /&gt;
*iTunes Version (string): 10.5.3&lt;br /&gt;
&lt;br /&gt;
==== iBooks Data 2 ====&lt;br /&gt;
This blob is actually another plist (dict):&lt;br /&gt;
*1.2 (dict):&lt;br /&gt;
**BKBookmark (array of dict):&lt;br /&gt;
***[0] dict:&lt;br /&gt;
****bookDatabaseKey (string)&lt;br /&gt;
****date (integer)&lt;br /&gt;
****deletedFlag (bool)&lt;br /&gt;
****highlightColor (integer)&lt;br /&gt;
****lastModification (integer)&lt;br /&gt;
****locationBPlist (data): (base-64 encoded blob, see below)&lt;br /&gt;
****ordinal (integer)&lt;br /&gt;
****serverSyncUniqueId (string): Reading Location&lt;br /&gt;
****type (integer): 1&lt;br /&gt;
*CollectionsData-1.2 (dict):&lt;br /&gt;
**BKCollection (array of 2 dict):&lt;br /&gt;
***[0] dict:&lt;br /&gt;
****databaseKeys (array): (empty)&lt;br /&gt;
****lastModification_Since1970 (integer)&lt;br /&gt;
****ServerSyncUniqueId (string): Pdfs_Collenction_ID&lt;br /&gt;
****sortKey (integer): -2&lt;br /&gt;
****title (string): PDFs&lt;br /&gt;
***[1] dict:&lt;br /&gt;
****databaseKeys (array): (empty)&lt;br /&gt;
****lastModification_Since1970 (integer)&lt;br /&gt;
****ServerSyncUniqueId (string): Pdfs_Collenction_ID&lt;br /&gt;
****sortKey (integer): -1&lt;br /&gt;
****title (string): Books&lt;br /&gt;
**rolling_version (integer): 17&lt;br /&gt;
&lt;br /&gt;
===== Location BPList =====&lt;br /&gt;
This is actually a binary plist with the following content (dict): (example):&lt;br /&gt;
*class (string): BKEpubLocation&lt;br /&gt;
*endOffset (real): 0,0&lt;br /&gt;
*endPath (array of dict):&lt;br /&gt;
**[0] dict&lt;br /&gt;
***id (string): seeAlsoSection&lt;br /&gt;
***index (integer): 32&lt;br /&gt;
***tagName (string): div&lt;br /&gt;
**[1] dcit&lt;br /&gt;
***index (integer): 3&lt;br /&gt;
***tagName (string): p&lt;br /&gt;
*startOffset (real): 0.0&lt;br /&gt;
*startPath (array of dict):&lt;br /&gt;
**[0] dict:&lt;br /&gt;
***id (string): seeAlsoSection&lt;br /&gt;
***index (integer): 32&lt;br /&gt;
***tagName (string): div&lt;br /&gt;
**[1] dict:&lt;br /&gt;
***index (integer): 3&lt;br /&gt;
***tagName (string): p&lt;br /&gt;
*super (dict):&lt;br /&gt;
**class (string): BKLocation&lt;br /&gt;
**ordinal (integer): 3&lt;br /&gt;
&lt;br /&gt;
==== IC-Info.siv ====&lt;br /&gt;
binary file, content unknown&lt;br /&gt;
&lt;br /&gt;
==== PhotosFolderAlbums ====&lt;br /&gt;
[[frpd]] binary file. Starts with 0x66 0x72 0x70 0x64 ('frpd'). Then only very few bytes and the content is mostly zero. Then at 0x68 and 0x26C, 0x470, 0x674, etc. there are folder names (in unicode, starting with the name length).&lt;br /&gt;
&lt;br /&gt;
==== PhotosFolderName ====&lt;br /&gt;
A 0x200 byte long file, starting with the text &amp;quot;Pictures&amp;quot; (in unicode) and the name length before it. Rest filled with zeroes.&lt;br /&gt;
&lt;br /&gt;
==== iTunesPrefs ====&lt;br /&gt;
This is another [[frpd]] file. It contains names of computers found on the network, like iPodPrefs below.&lt;br /&gt;
&lt;br /&gt;
==== iTunesPrefs.plist ====&lt;br /&gt;
plist with this content (dict):&lt;br /&gt;
*ApplicationIDs (array of string): list of applications (like &amp;lt;code&amp;gt;com.apple.iBooks&amp;lt;/code&amp;gt;&lt;br /&gt;
*AudiobookPlaylistIDs (array): (empty)&lt;br /&gt;
*AudioTrackIDs (array): (empty)&lt;br /&gt;
*BookTrackIDs (array of integer): (signed long integer values)&lt;br /&gt;
*LibraryBookTrackIDs (array of integer): (signed long integer values)&lt;br /&gt;
*MoviePlaylistIDs (array): (empty)&lt;br /&gt;
*MovieTrackIDs (array): (empty)&lt;br /&gt;
*MusicAlbumIDs (array): (empty)&lt;br /&gt;
*MusicArtistIDs (array): (empty)&lt;br /&gt;
*MusicGenreNames (array): (empty)&lt;br /&gt;
*MusicPlaylistIDs (array of integer): (signed long integer values)&lt;br /&gt;
*MusicTrackIDs (array): (empty)&lt;br /&gt;
*PodcastChannelIDs (array): (empty)&lt;br /&gt;
*PodcastPlaylistIDs (array): (empty)&lt;br /&gt;
*PodcastTrackIDs (array of integer): (signed long integer values)&lt;br /&gt;
*RingtoneTrackIDs (array): (empty)&lt;br /&gt;
*TVShowAlbumIDs (array): (empty)&lt;br /&gt;
*TVShowNames (array): (empty)&lt;br /&gt;
*TVShowPlaylistIDs (array): (empty)&lt;br /&gt;
*TVShowTrackIDs (array): (empty)&lt;br /&gt;
*iPodPrefs (data): (base-64 encoded blob, see below)&lt;br /&gt;
*iTunesUChannelIDs (array): (empty)&lt;br /&gt;
*iTunesUPlaylistIDs (array): (empty)&lt;br /&gt;
*iTunesUTrackIDs (array): (empty)&lt;br /&gt;
&lt;br /&gt;
===== iPodPrefs =====&lt;br /&gt;
[[frpd]] file, content unknown, but it contains server names on the network it was sync'd to, like iTunesPrefs above.&lt;br /&gt;
&lt;br /&gt;
=== Manifest.mbdb ===&lt;br /&gt;
Binary file containing many text strings. Probably a database of file names in the backup. Format (from [http://code.google.com/p/iphonebackupbrowser/wiki/MbdbMbdxFormat here]):&lt;br /&gt;
==== Header ====&lt;br /&gt;
 6 bytes: 'mbdb\5\0'&lt;br /&gt;
==== Record (variable size) ====&lt;br /&gt;
 string Domain        Backup domain (one of&lt;br /&gt;
                        &amp;quot;AppDomain-com.some.user.installed.app&amp;quot;,&lt;br /&gt;
                        &amp;quot;CameraRollDomain&amp;quot;,&lt;br /&gt;
                        &amp;quot;DatabaseDomain&amp;quot;&lt;br /&gt;
                        &amp;quot;HomeDomain&amp;quot;,&lt;br /&gt;
                        &amp;quot;KeychainDomain&amp;quot;,&lt;br /&gt;
                        &amp;quot;ManagedPreferencesDomain&amp;quot;,&lt;br /&gt;
                        &amp;quot;MediaDomain&amp;quot;,&lt;br /&gt;
                        &amp;quot;MobileDeviceDomain&amp;quot;,&lt;br /&gt;
                        &amp;quot;RootDomain&amp;quot;,&lt;br /&gt;
                        &amp;quot;SystemPreferencesDomain&amp;quot;,&lt;br /&gt;
                        &amp;quot;WirelessDomain&amp;quot;,&lt;br /&gt;
                        ... others?&lt;br /&gt;
 string Path              &lt;br /&gt;
 string LinkTarget    absolute path&lt;br /&gt;
 string DataHash      SHA-1, some files only&lt;br /&gt;
 string encryptionKey      Encryption key for encrypted backups&lt;br /&gt;
 uint16 Mode           Unix file permissions. See /usr/include/stat.h  and stat(2)&lt;br /&gt;
                                file mode: 0xAxxx symbolic link (aka S_IFLNK or 00120000)&lt;br /&gt;
                                 0x4xxx directory (aka S_IFDIR or 0040000)&lt;br /&gt;
                                 0x8xxx regular file (aka S_IFREG or 0100000)&lt;br /&gt;
                                Mask out ~ 0xf000 (aka S_IFMT) for file permissions&lt;br /&gt;
 uint32 inode         inode number&lt;br /&gt;
 uint32 uid             owner    &lt;br /&gt;
 uint32 gid             group&lt;br /&gt;
 uint32 mtime        time of last modification&lt;br /&gt;
 uint32 atime         time of last access&lt;br /&gt;
 uint32 ctime         time of last change of status&lt;br /&gt;
 uint64 length        file size (always 0 for link or directory)&lt;br /&gt;
 uint8  protectionclass         unknown&lt;br /&gt;
 uint8  PropertyCount number of properties following&lt;br /&gt;
Property is a couple of strings:&lt;br /&gt;
 string name&lt;br /&gt;
 string value         can be a string or aa binary content&lt;br /&gt;
All values are big endian, strings are composed of a uint16 that contains the length or 0xffff for NULL, then the characters in UTF-8 with canonical decomposition (Unicode normalization form D).&lt;br /&gt;
&lt;br /&gt;
=== Manifest.plist ===&lt;br /&gt;
Binary plist with the following content (dict):&lt;br /&gt;
*Applications (dict):&lt;br /&gt;
**com.apple.iBooks (dict)&lt;br /&gt;
***CFBundleIdentifier (string): com.apple.iBooks&lt;br /&gt;
***CFBundleVersion (string): 804&lt;br /&gt;
***Path (string): /private/var/mobile/Applications/[GUID]/iBooks.app&lt;br /&gt;
**etc. for other apps&lt;br /&gt;
*BackupKeyBag (data): (base-64 encoded blob, see below)&lt;br /&gt;
*Date (date): yyyy-mm-ddThh:mm:ssZ&lt;br /&gt;
*IsEncrypted (bool): false&lt;br /&gt;
*Lockdown (dict):&lt;br /&gt;
**BuildVersion (string): 9A406&lt;br /&gt;
**DeviceName (string)&lt;br /&gt;
**ProductType (string): iPhone4,1&lt;br /&gt;
**ProductVersion (string): 5.0.1&lt;br /&gt;
**SerialNumber (string)&lt;br /&gt;
**UniqueDeviceID (string): 20-byte hex&lt;br /&gt;
**com.apple.Accessibility (dict):&lt;br /&gt;
***InvertDisplayEnabledByiTunes (bool): false&lt;br /&gt;
***MonoAudioEnabledByiTunes (bool): false&lt;br /&gt;
***VoiceOverTouchEnabledByiTunes (bool): false&lt;br /&gt;
***ZoomTouchEnabledByiTunes (bool): false&lt;br /&gt;
**com.apple.MobileDeviceCrashCopy (dict):&lt;br /&gt;
***ShouldPrompt (bool): false&lt;br /&gt;
***ShouldSubmit (bool): false&lt;br /&gt;
**com.apple.TerminalFlashr (dict): (empty)&lt;br /&gt;
**com.apple.iTunes.backup (dict):&lt;br /&gt;
***LastBackupComputerName (string)&lt;br /&gt;
***LastBackupComputerType (string): PC&lt;br /&gt;
**com.apple.itunesstored (dict):&lt;br /&gt;
***AccountAvailableServiceTypes (integer): 0&lt;br /&gt;
***AccountKind (integer): 0&lt;br /&gt;
***AccountServiceTypes (integer): 0&lt;br /&gt;
***AccountSocialEnabled (bool): false&lt;br /&gt;
***AccountStoreFront (string): (unknown text string)&lt;br /&gt;
***AccountURLBagType (string): production&lt;br /&gt;
***AppleID (string)&lt;br /&gt;
***CreditDisplayString (string): (empty string)&lt;br /&gt;
***DSPersonID (integer)&lt;br /&gt;
***TempStorefront (string): (unknown text string)&lt;br /&gt;
**com.apple.mobile.data_sync (dict):&lt;br /&gt;
***Bookmarks (dict):&lt;br /&gt;
****AccountNames (array of string, 1 element): iCloud&lt;br /&gt;
****Sources (array of string, 1 element): iCloud&lt;br /&gt;
***Calendars (dict):&lt;br /&gt;
****AccountNames (array of string, 1 element): iCloud&lt;br /&gt;
****Sources (array of string, 1 element): iCloud&lt;br /&gt;
***Contacts (dict):&lt;br /&gt;
****AccountNames (array of string, 1 element): iCloud&lt;br /&gt;
****Sources (array of string, 1 element): iCloud&lt;br /&gt;
**com.apple.mobile.iTunes.accessories (dict): (empty)&lt;br /&gt;
**com.apple.mobile.wireless_lockdown (dict): (empty)&lt;br /&gt;
*SystemDomainsVersion (string): 12.0&lt;br /&gt;
*Version (string): 9.0&lt;br /&gt;
*WasPasscodeSet (bool): false&lt;br /&gt;
&lt;br /&gt;
==== BackupKeyBag ====&lt;br /&gt;
Binary file in the following format:&lt;br /&gt;
*4-byte block identifier&lt;br /&gt;
*4-byte block length (most significant byte first), length 4 means total block length of 0xC bytes.&lt;br /&gt;
*data&lt;br /&gt;
First block is &amp;quot;VERS&amp;quot; with a version number of 3. There are a lot of block types: VERS, TYPE, UUID, HMCK, WRAP, SALT, ITER, UUID, CLAS, WRAP, KTYP, WPKY, etc.&lt;br /&gt;
&lt;br /&gt;
=== Status.plist ===&lt;br /&gt;
Binary plist with the following content (dict):&lt;br /&gt;
*BackupState (string): new&lt;br /&gt;
*Date (date): &amp;quot;yyyy-mm-ddThh:mm:ssZ&amp;quot;&lt;br /&gt;
*IsFullBackup (bool): false&lt;br /&gt;
*SnapshotState (string): finished&lt;br /&gt;
*UUID (string)&lt;br /&gt;
*Version (string): 2.4&lt;br /&gt;
&lt;br /&gt;
== Files ==&lt;br /&gt;
Here is a list of commonly used files:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;font-size: small; text-align: center; table-layout: fixed; border-collapse: collapse;&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!domain&lt;br /&gt;
!path and file name&lt;br /&gt;
!SHA-1 backup file name&lt;br /&gt;
|-&lt;br /&gt;
|HomeDomain&lt;br /&gt;
|Library/SMS/sms.db&lt;br /&gt;
|3d0d7e5fb2ce288813306e4d4636395e047a3d28&lt;br /&gt;
|-&lt;br /&gt;
|HomeDomain&lt;br /&gt;
|Library/AddressBook/AddressBook.sqlitedb&lt;br /&gt;
|31bb7ba8914766d4ba40d6dfb6113c8b614be442&lt;br /&gt;
|-&lt;br /&gt;
|HomeDomain&lt;br /&gt;
|Library/Notes/notes.sqlite&lt;br /&gt;
|ca3bc056d4da0bbf88b5fb3be254f3b7147e639c&lt;br /&gt;
|-&lt;br /&gt;
|WirelessDomain&lt;br /&gt;
|Library/CallHistory/call_history.db&lt;br /&gt;
|2b2b0084a1bc3a5ac8c27afdf14afb42c61a19ca&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
*[[:/System/Library/Backup]]&lt;br /&gt;
*[[Backup the iPhone Flash for restore without iTunes]]&lt;br /&gt;
*[[Understanding iPhone Backup Files]]&lt;br /&gt;
*[http://www.ssddfj.org/papers/SSDDFJ_V4_1_Bader_Bagilli.pdf iPhone 3GS Forensics]&lt;br /&gt;
*[http://www.scip.ch/?labs.20110512 SCIP backup infos (german only)]&lt;br /&gt;
*[http://stackoverflow.com/questions/6569004/how-to-parse-the-manifest-mbdb-file-in-an-ios-5-0-beta-2-without-manifest-mbdx SHA-1 hash generation]&lt;br /&gt;
*[http://code.google.com/p/iphonebackupbrowser/wiki/MbdbMbdxFormat description of mbdx and mbdb files]&lt;/div&gt;</summary>
		<author><name>Chopin4g</name></author>
		
	</entry>
	<entry>
		<id>https://www.theiphonewiki.com/w/index.php?title=Kernel&amp;diff=28266</id>
		<title>Kernel</title>
		<link rel="alternate" type="text/html" href="https://www.theiphonewiki.com/w/index.php?title=Kernel&amp;diff=28266"/>
		<updated>2012-11-25T02:49:23Z</updated>

		<summary type="html">&lt;p&gt;Chopin4g: added uname/build info for 4.3.5&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The '''kernel''' of [[iOS]] is the [[wikipedia:XNU|XNU]] kernel. Pre-2.0, it was vulnerable to the [[Ramdisk Hack]] and may still be, but iBoot doesn't allow boot-args to be passed anymore. It is mapped to memory at 0x80000000, forcing a 2/2GB address separation, similar to Windows 32-bit model. On older iOS the separation was 3/1 (mapping the kernel at 0xC0000000), closer to the Linux model.&lt;br /&gt;
&lt;br /&gt;
Note, that this is NOT like 32-bit OS X, wherein the kernel resides in its own address space, but more like OS X 64-bit, wherein CR3 is shared (albeit an address space larger by several orders of magnitude). See the appropriate [[#64-bit|section]]&lt;br /&gt;
&lt;br /&gt;
== [[ASLR]] ==&lt;br /&gt;
{{main|Kernel ASLR}}&lt;br /&gt;
As of [[iOS]] 6, the kernel is subject to ASLR, much akin to Mountain Lion (OS X 10.8). This make exploitation harder as the location of kernel code cannot be known.&lt;br /&gt;
&lt;br /&gt;
On production devices, the kernel is always stored as a statically linked [[kernelcache|cache]] stored at [[/System/Library/Caches/com.apple.kernelcaches/kernelcache]] that is decompressed and run on startup. On development devices the kernel is stored in the same location as OS X, at [[/mach_kernel]].&lt;br /&gt;
&lt;br /&gt;
== Stack ==&lt;br /&gt;
The kernel maintains its stack at &amp;lt;code&amp;gt;0xd2000000&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Boot-Args ==&lt;br /&gt;
Like its OS X counterpart, iOS's XNU accepts command line arguments (though the actual passing of arguments is done by iBoot, which as of late refuses to do so). Arguments may be directed at the kernel proper, or any one of the many KExts (discussed below). The arguments of the kernel are largely the same as those of OS X.&lt;br /&gt;
&lt;br /&gt;
KExts use boot-args as well, as can be seen when disassembly by calls to PE_parse_boot_argn (usually exported, @0x80240800 on the iOS 5 iPod 4g kernel). Finding references (using IDA) reveals hundreds places in the code wherein arguments are parsed in modules, pertaining to Flash, HDMI, and [[AppleMobileFileIntegrity|AMFI]].&lt;br /&gt;
&lt;br /&gt;
== Versions ==&lt;br /&gt;
iOS has consistently maintained a higher kernel version than the corresponding version of OS X. At the time of writing, OS X Mountain Lion's XNU is 20xx, whereas iOS is 21xx. This is not surprising, considering that iOS has novel features (such as KASLR, the default freezer, and various security hardening features) which are first incorporated in it, and only later make it to OS X. The following demonstrates the two OS versions at present:&lt;br /&gt;
&lt;br /&gt;
OS X Mountain Lion:&lt;br /&gt;
&lt;br /&gt;
 Darwin Kernel Version 12.2.0: Sat Aug 25 00:48:52 PDT 2012; root:xnu-2050.18.24~1/RELEASE_X86_64 x86_64&lt;br /&gt;
	&lt;br /&gt;
iOS 6:&lt;br /&gt;
		&lt;br /&gt;
 Darwin Kernel Version 13.0.0: Sun Aug 19 00:31:06 PDT 2012; root:xnu-2107.2.33~4/RELEASE_ARM_S5L8950X&lt;br /&gt;
&lt;br /&gt;
Note: The RELEASE_ARM_xxxxxxxx file obviously differs on device / CPU.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; style=&amp;quot;font-size: smaller; text-align: center;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! width=&amp;quot;40&amp;quot; | Version&lt;br /&gt;
! width=&amp;quot;400&amp;quot; | Build&lt;br /&gt;
! width=&amp;quot;220&amp;quot; | Comment&lt;br /&gt;
|-&lt;br /&gt;
| [[Alpine 1A420 (iPhone)|1A420]]&lt;br /&gt;
| Darwin Kernel Version 4.4.2-Purple-19: Thu Mar 8 01:43:04 PST 2007; root:xnu-933.0.14~46/RELEASE_ARM_S5L8900XRB&lt;br /&gt;
| from prototype - not sure if 100% correct.&lt;br /&gt;
|-&lt;br /&gt;
| 1.0.0&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 1.0.1&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 1.0.2&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 1.1.1&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 1.1.2&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 1.1.3&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 1.1.4&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 2.0&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 2.0.1&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 2.0.2&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 2.1&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 2.2&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 2.2.1&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 3.0&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 3.0.1&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 3.1&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 3.1.2&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 3.1.3&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 3.2&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 3.2.1&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 3.2.2&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 4.0&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 4.0.1&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 4.0.2&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 4.1&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 4.2.1&lt;br /&gt;
| Darwin Kernel Version 10.4.0: Wed Oct 20 20:14:45 PDT 2010; root:xnu-1504.58.28~3/RELEASE_ARM_S5L8930X&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 4.3&lt;br /&gt;
| &lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 4.3.1&lt;br /&gt;
| &lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 4.3.2&lt;br /&gt;
| &lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 4.3.3&lt;br /&gt;
| Darwin Kernel Version 11.0.0: Wed Mar 30 18:44:45 PDT 2011; root:xnu-1735.46~10/RELEASE_ARM_[[S5L8920]]X&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 4.3.4&lt;br /&gt;
| &lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 4.3.5&lt;br /&gt;
| Darwin Kernel Version 11.0.0: Sat Jul  9 00:59:43 PDT 2011; root:xnu-1735.47~1/RELEASE_ARM_[[S5L8930]]X&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 5.0&lt;br /&gt;
| Darwin Kernel Version 11.0.0: Thu Sep 15 23:34:43 PDT 2011; root:xnu-1878.4.43~2/RELEASE_ARM_[[S5L8940]]X&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 5.0.1&lt;br /&gt;
| Darwin Kernel Version 11.0.0: Tue Nov 1 20:34:16 PDT 2011; root:xnu-1878.4.46~1/RELEASE_ARM_[[S5L8940]]X&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 5.1&lt;br /&gt;
| Darwin Kernel Version 11.0.0: Wed Feb 1 23:18:07 PST 2012; root:xnu-1878.11.8~1/RELEASE_ARM_[[S5L8945]]X&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 5.1.1&lt;br /&gt;
| Darwin Kernel Version 11.0.0: Sun Apr 8 21:51:26 PDT 2012; root:xnu-1878.11.10~1/RELEASE_ARM_[[S5L8930]]X &lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 6.0&lt;br /&gt;
| Darwin Kernel Version 13.0.0: Sun Aug 19 00:31:06 PDT 2012; root:xnu-2107.2.33~4/RELEASE_ARM_[[S5L8950]]X&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 6.0.1&lt;br /&gt;
| Darwin Kernel Version 13.0.0: Wed Oct 10 23:29:02 PDT 2012; root:xnu-2107.2.34~2/RELEASE_ARM_[[S5L8930]]X&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This constant version scheme makes parsing with regex dead simple:&lt;br /&gt;
 Darwin Kernel Version ([0-9]+)\.([0-9]+)\.([0-9]+): (Sun|Mon|Tue|Wed|Thu|Fri|Sat) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ([0-9]{2}) ([0-9]{2}):([0-9]{2}):([0-9]{2}) ([A-Z]{3}) ([0-9]{4}); root:xnu-([0-9]+)\.([0-9]+)\.([0-9]+)~([0-9]+)/RELEASE_ARM_S5L([0-9]{4})X&lt;br /&gt;
with the results as:&lt;br /&gt;
 Darwin Kernel Version $1\.$2\.$3: $4 $5 $6 $7:$8:$9 $10 $11; root:xnu-$12.$13.$14~$15/RELEASE_ARM_S5L$16X&lt;br /&gt;
&lt;br /&gt;
== Source Code ==&lt;br /&gt;
As XNU is based off of the [[wikipedia:Berkeley Software Distribution|BSD kernel]], it is [http://opensource.apple.com/source/xnu open source]. The source is under a [http://opensource.apple.com/license/bsd/ 3-clause BSD License] for the original BSD portions with the portions added by Apple under the [http://opensource.apple.com/license/apsl/ Apple Public Source License]. The [[#Versions|versions contained in iOS]] are not available, instead only versions used in ''OS X'' are available. This does not appear to be legal as per &amp;amp;#x00A7;2.3 in the APSL:&lt;br /&gt;
 2.3     Distribution of Executable Versions.  In addition, if You Externally Deploy Covered&lt;br /&gt;
 Code (Original Code and/or Modifications) in object code, executable form only, '''You must'''&lt;br /&gt;
 '''include a prominent notice''', in the code itself as well as in related documentation, '''stating'''&lt;br /&gt;
 '''that Source Code of the Covered Code is available''' under the terms of this License '''with'''&lt;br /&gt;
 '''information on how and where to obtain such Source Code'''.&lt;br /&gt;
with ''Source Code'' defined in &amp;amp;#x00A7;1.8:&lt;br /&gt;
 1.8     &amp;quot;Source Code&amp;quot; means the human readable form of a program or other work that is&lt;br /&gt;
 suitable for making modifications to it, including all modules it contains, plus any&lt;br /&gt;
 associated interface definition files, scripts used to control compilation and installation&lt;br /&gt;
 of an executable (object code).&lt;br /&gt;
&lt;br /&gt;
It is worth noting that Apple does ''not'' list XNU as being an open source component of [[iOS]]. This can be seen by viewing [http://opensource.apple.com/ opensource.apple.com] and selecting ''any'' iOS version. As far as can be told, ''none'' of the versions of XNU are available in source version.&lt;br /&gt;
&lt;br /&gt;
There are many other open souce components that iOS uses that are ''not'' listed, such as:&lt;br /&gt;
* [http://opensource.apple.com/source/CF/ CF] ([https://developer.apple.com/library/mac/#documentation/CoreFoundation/Reference/CoreFoundation_Collection/_index.html CoreFoundation] - Cocoa)&lt;br /&gt;
* [http://opensource.apple.com/source/SQLite/ SQLite] ([http://www.sqlite.org/ SQLite] - database utility)&lt;br /&gt;
* [http://opensource.apple.com/source/TimeZoneData/ TimeZoneData] ([[wikipedia:tz database|tz database]] - [[/usr/share/zoneinfo]])&lt;br /&gt;
* [http://opensource.apple.com/source/curl/ curl](?) ([http://curl.haxx.se/ libcurl] - various HTTP operations)&lt;br /&gt;
* [http://opensource.apple.com/source/hfs/ hfs] (hfs - [[wikipedia:Hierarchical File System|HFS]] driver)&lt;br /&gt;
* [http://opensource.apple.com/source/launchd/ launchd] ([[launchd]] - launch daemon)&lt;br /&gt;
* [http://opensource.apple.com/source/libxml2/ libxml2](?) ([http://www.xmlsoft.org/ libxml2] - parser for [[wikipedia:XML|XML]] [[Property List|plist]]s)&amp;lt;!-- or does CF handle the parsing? --&amp;gt;&lt;br /&gt;
* [http://opensource.apple.com/source/xnu/ xnu] (XNU - Kernel)&lt;br /&gt;
* [http://opensource.apple.com/source/zip/ zip] (zip - extraction of various files)&lt;br /&gt;
It does ''not'' appear that Apple assumes what you see in the ''OS X'' pages are also on ''iOS''&amp;lt;!-- reword needed --&amp;gt; as [http://opensource.apple.com/source/JavaScriptCore/ JavaScriptCore], [http://opensource.apple.com/source/WebCore/ WebCore], among others are listed on both [http://opensource.apple.com/release/mac-os-x-108/ OS X] (10.8) and [http://opensource.apple.com/release/ios-60/ iOS] (6.0), albeit different versions.&lt;br /&gt;
&lt;br /&gt;
It is also worth noting that [http://opensource.apple.com/source/gdb/ gdb] ([[wikipedia:GNU Compiler Collection|GCC]] debugger) and [http://opensource.apple.com/source/ld64/ ld64] are listed as components in [http://opensource.apple.com/release/ios-60/ iOS 6.0]. Why there are present is a mystery as they are not present on unaltered devices, but only through [[Cydia.app|Cydia]] or [[Xcode]]'s &amp;lt;code&amp;gt;DeveloperImage.dmg&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Kernel Extensions ==&lt;br /&gt;
iOS, sadly, does ''not'' have [[Kernel Extension|kext]]s floating around the [[/|file system]], but they are indeed present. The [[kernelcache]] can be unpacked to show the kernel proper, along with the kexts (all packed in the __PRELINK_TEXT section) and their [[Property List|plist]]s (in the __PRELINK_INFO section).&lt;br /&gt;
&lt;br /&gt;
The Cydia supplied [[kextstat]] does not work on [[iOS]]. Sadly, the reason is that kextstat relies on &amp;lt;code&amp;gt;kmod_get_info(...)&amp;lt;/code&amp;gt;, which is a deprecated (and recently removed) API in recent&amp;lt;!-- how recent? --&amp;gt; iOS and OS X versions. With that said, the [[Kernel Extension|kext]]s ''do'' exist. The alternative, [[kextstat#jkextstat|jkextstat]], ''does'' work on recent iOS versions. jkextstat can cause some confusion as it uses the executable name &amp;lt;code&amp;gt;kextstat&amp;lt;/code&amp;gt;, similar to how calling &amp;lt;code&amp;gt;g++&amp;lt;/code&amp;gt; just launches &amp;lt;code&amp;gt;gcc&amp;lt;/code&amp;gt; but with parameters to treat all &amp;lt;code&amp;gt;.c&amp;lt;/code&amp;gt; files as C++ files.&lt;br /&gt;
&lt;br /&gt;
The following is the output from [[kextstat#jkextstat|jkextstat]] on an [[n81ap|iPod touch 4G]] running [[iOS]] 6(?):&lt;br /&gt;
&lt;br /&gt;
 Podicum:~ root# ./kextstat &lt;br /&gt;
   0 __kernel__ &lt;br /&gt;
   1 kpi.bsd &lt;br /&gt;
   2 kpi.dsep &lt;br /&gt;
   3 kpi.iokit &lt;br /&gt;
   4 kpi.libkern &lt;br /&gt;
   5 kpi.mach &lt;br /&gt;
   6 kpi.private &lt;br /&gt;
   7 kpi.unsupported &lt;br /&gt;
   8 driver.AppleARMPlatform &amp;lt;1 3 4 5 6 7&amp;gt;&lt;br /&gt;
   9 iokit.IOStorageFamily &amp;lt;1 3 4 5 6 7&amp;gt;&lt;br /&gt;
  10 driver.DiskImages &amp;lt;1 3 4 5 6 7 9&amp;gt;&lt;br /&gt;
  11 driver.FairPlayIOKit &amp;lt;1 3 4 5 6 7&amp;gt;&lt;br /&gt;
  12 driver.IOSlaveProcessor &amp;lt;3 4&amp;gt;&lt;br /&gt;
  13 driver.IOP_s5l8930x_firmware &amp;lt;3 4 12&amp;gt;&lt;br /&gt;
  14 iokit.AppleProfileFamily &amp;lt;1 3 4 5 6 7&amp;gt;&lt;br /&gt;
  15 iokit.IOCryptoAcceleratorFamily &amp;lt;1 3 4 5 7&amp;gt;&lt;br /&gt;
  16 driver.AppleMobileFileIntegrity &amp;lt;1 2 3 4 5 6 7 15&amp;gt;&lt;br /&gt;
  17 iokit.IONetworkingFamily &amp;lt;1 3 4 5 6 7&amp;gt;&lt;br /&gt;
  18 iokit.IOUserEthernet &amp;lt;1 3 4 5 6 16 17&amp;gt;&lt;br /&gt;
  19 platform.AppleKernelStorage &amp;lt;3 4 7&amp;gt;&lt;br /&gt;
  20 iokit.IOSurface &amp;lt;1 3 4 5 6 7 8&amp;gt;&lt;br /&gt;
  21 iokit.IOStreamFamily &amp;lt;3 4 5&amp;gt;&lt;br /&gt;
  22 iokit.IOAudio2Family &amp;lt;1 3 4 5 21&amp;gt;&lt;br /&gt;
  23 driver.AppleAC3Passthrough &amp;lt;1 3 4 5 7 8 11 21 22&amp;gt;&lt;br /&gt;
  24 iokit.EncryptedBlockStorage &amp;lt;1 3 4 5 9 15&amp;gt;&lt;br /&gt;
  25 iokit.IOFlashStorage &amp;lt;1 3 4 5 7 9 24&amp;gt;&lt;br /&gt;
  26 driver.AppleEffaceableStorage &amp;lt;1 3 4 5 7 8 25&amp;gt;&lt;br /&gt;
  27 driver.AppleKeyStore &amp;lt;1 3 4 5 6 7 15 16 26&amp;gt;&lt;br /&gt;
  28 kext.AppleMatch &amp;lt;1 4&amp;gt;&lt;br /&gt;
  29 security.sandbox &amp;lt;1 2 3 4 5 6 7 16 28&amp;gt;&lt;br /&gt;
  30 driver.AppleS5L8930X &amp;lt;1 3 4 5 7 8&amp;gt;&lt;br /&gt;
  31 iokit.IOHIDFamily &amp;lt;1 3 4 5 6 7 16&amp;gt;&lt;br /&gt;
  32 driver.AppleM68Buttons &amp;lt;1 3 4 5 7 8 31&amp;gt;&lt;br /&gt;
  33 iokit.IOUSBDeviceFamily &amp;lt;1 3 4 5&amp;gt;&lt;br /&gt;
  34 iokit.IOSerialFamily &amp;lt;1 3 4 5 6 7&amp;gt;&lt;br /&gt;
  35 driver.AppleOnboardSerial &amp;lt;1 3 4 5 7 34&amp;gt;&lt;br /&gt;
  36 iokit.IOAccessoryManager &amp;lt;3 4 5 7 8 33 34 35&amp;gt;&lt;br /&gt;
  37 driver.AppleProfileTimestampAction &amp;lt;1 3 4 5 14&amp;gt;&lt;br /&gt;
  38 driver.AppleProfileThreadInfoAction &amp;lt;1 3 4 6 14&amp;gt;&lt;br /&gt;
  39 driver.AppleProfileKEventAction &amp;lt;1 3 4 14&amp;gt;&lt;br /&gt;
  40 driver.AppleProfileRegisterStateAction &amp;lt;1 3 4 14&amp;gt;&lt;br /&gt;
  41 driver.AppleProfileCallstackAction &amp;lt;1 3 4 5 6 14&amp;gt;&lt;br /&gt;
  42 driver.AppleProfileReadCounterAction &amp;lt;3 4 6 14&amp;gt;&lt;br /&gt;
  43 driver.AppleARMPL192VIC &amp;lt;3 4 5 7 8&amp;gt;&lt;br /&gt;
  44 driver.AppleCDMA &amp;lt;1 3 4 5 7 8 15&amp;gt;&lt;br /&gt;
  45 driver.IODARTFamily &amp;lt;3 4 5&amp;gt;&lt;br /&gt;
  46 driver.AppleS5L8930XDART &amp;lt;1 3 4 5 7 8 45&amp;gt;&lt;br /&gt;
  47 iokit.IOSDIOFamily &amp;lt;1 3 4 5 7&amp;gt;&lt;br /&gt;
  48 driver.AppleIOPSDIO &amp;lt;1 3 4 5 7 8 12 47&amp;gt;&lt;br /&gt;
  49 driver.AppleIOPFMI &amp;lt;1 3 4 5 7 8 12 25&amp;gt;&lt;br /&gt;
  50 driver.AppleSamsungSPI &amp;lt;1 3 4 5 7 8&amp;gt;&lt;br /&gt;
  51 driver.AppleSamsungSerial &amp;lt;1 3 4 5 7 8 34 35&amp;gt;&lt;br /&gt;
  52 driver.AppleSamsungPKE &amp;lt;3 4 5 7 8 15&amp;gt;&lt;br /&gt;
  53 driver.AppleS5L8920X &amp;lt;1 3 4 5 7 8&amp;gt;&lt;br /&gt;
  54 driver.AppleSamsungI2S &amp;lt;1 3 4 5 7 8&amp;gt;&lt;br /&gt;
  55 driver.AppleEmbeddedUSB &amp;lt;1 3 4 5 7 8&amp;gt;&lt;br /&gt;
  56 driver.AppleS5L8930XUSBPhy &amp;lt;1 3 4 5 7 8 55&amp;gt;&lt;br /&gt;
  57 iokit.IOUSBFamily &amp;lt;1 3 4 5 7&amp;gt;&lt;br /&gt;
  58 driver.AppleUSBEHCI &amp;lt;1 3 4 5 7 57&amp;gt;&lt;br /&gt;
  59 driver.AppleUSBComposite &amp;lt;1 3 4 57&amp;gt;&lt;br /&gt;
  60 driver.AppleEmbeddedUSBHost &amp;lt;1 3 4 5 7 55 57 59&amp;gt;&lt;br /&gt;
  61 driver.AppleUSBOHCI &amp;lt;1 3 4 5 57&amp;gt;&lt;br /&gt;
  62 driver.AppleUSBOHCIARM &amp;lt;3 4 5 8 55 57 60 61&amp;gt;&lt;br /&gt;
  63 driver.AppleUSBHub &amp;lt;1 3 4 5 57&amp;gt;&lt;br /&gt;
  64 driver.AppleUSBEHCIARM &amp;lt;3 4 5 8 55 57 58 60 63&amp;gt;&lt;br /&gt;
  65 driver.AppleS5L8930XUSB &amp;lt;1 3 4 5 7 8 55 57 58 60 61 62 64&amp;gt;&lt;br /&gt;
  66 driver.AppleARM7M &amp;lt;3 4 8 12&amp;gt;&lt;br /&gt;
  67 driver.EmbeddedIOP &amp;lt;3 4 5 12&amp;gt;&lt;br /&gt;
  68 driver.AppleVXD375 &amp;lt;1 3 4 5 7 8 11&amp;gt;&lt;br /&gt;
  69 driver.AppleD1815PMU &amp;lt;1 3 4 5 7 8 31&amp;gt;&lt;br /&gt;
  70 iokit.AppleARMIISAudio &amp;lt;1 3 4 5 7 22&amp;gt;&lt;br /&gt;
  71 driver.AppleEmbeddedAudio &amp;lt;1 3 4 5 7 8 22 31 70&amp;gt;&lt;br /&gt;
  72 driver.AppleCS42L59Audio &amp;lt;3 4 5 8 22 31 70 71&amp;gt;&lt;br /&gt;
  73 driver.AppleEmbeddedAccelerometer &amp;lt;3 4 5 7 8 31&amp;gt;&lt;br /&gt;
  74 driver.AppleEmbeddedGyro &amp;lt;1 3 4 5 7 8 31&amp;gt;&lt;br /&gt;
  75 driver.AppleEmbeddedLightSensor &amp;lt;3 4 5 7 8 31&amp;gt;&lt;br /&gt;
  76 iokit.IOAcceleratorFamily &amp;lt;1 3 4 5 7 8&amp;gt;&lt;br /&gt;
  77 IMGSGX535 &amp;lt;1 3 4 5 7 8 76&amp;gt;&lt;br /&gt;
  78 driver.H2H264VideoEncoderDriver &amp;lt;1 3 4 5 7 8&amp;gt;&lt;br /&gt;
  79 driver.AppleJPEGDriver &amp;lt;1 3 4 5 7 8&amp;gt;&lt;br /&gt;
  80 driver.AppleH3CameraInterface &amp;lt;1 3 4 5 7 8&amp;gt;&lt;br /&gt;
  81 driver.AppleM2ScalerCSCDriver &amp;lt;1 3 4 5 7 8 45&amp;gt;&lt;br /&gt;
  82 iokit.IOMobileGraphicsFamily &amp;lt;1 3 4 5 7 8&amp;gt;&lt;br /&gt;
  83 driver.AppleDisplayPipe &amp;lt;1 3 4 5 7 8 82&amp;gt;&lt;br /&gt;
  84 driver.AppleCLCD &amp;lt;1 3 4 5 7 8 82 83&amp;gt;&lt;br /&gt;
  85 driver.AppleSamsungMIPIDSI &amp;lt;1 3 4 5 7 8&amp;gt;&lt;br /&gt;
  86 driver.ApplePinotLCD &amp;lt;1 3 4 5 7 8&amp;gt;&lt;br /&gt;
  87 driver.AppleSamsungSWI &amp;lt;1 3 4 5 7 8&amp;gt;&lt;br /&gt;
  88 iokit.IODisplayPortFamily &amp;lt;1 3 4 5 6 7 22&amp;gt;&lt;br /&gt;
  89 driver.AppleRGBOUT &amp;lt;1 3 4 5 7 8 82 83 88&amp;gt;&lt;br /&gt;
  90 driver.AppleTVOut &amp;lt;1 3 4 5 7 8&amp;gt;&lt;br /&gt;
  91 driver.AppleAMC_r2 &amp;lt;1 3 4 5 7 8 11 21 22&amp;gt;&lt;br /&gt;
  92 driver.AppleSamsungDPTX &amp;lt;3 4 5 7 8 88&amp;gt;&lt;br /&gt;
  93 driver.AppleSynopsysOTGDevice &amp;lt;1 3 4 5 7 8 33 55&amp;gt;&lt;br /&gt;
  94 driver.AppleNANDFTL &amp;lt;1 3 4 5 7 9 25&amp;gt;&lt;br /&gt;
  95 driver.AppleNANDLegacyFTL &amp;lt;1 3 4 5 9 25 94&amp;gt;&lt;br /&gt;
  96 AppleFSCompression.AppleFSCompressionTypeZlib &amp;lt;1 2 3 4 6&amp;gt;&lt;br /&gt;
  97 IOTextEncryptionFamily &amp;lt;1 3 4 5 7 11&amp;gt;&lt;br /&gt;
  98 driver.AppleBSDKextStarter &amp;lt;3 4&amp;gt;&lt;br /&gt;
  99 nke.ppp &amp;lt;1 3 4 5 6 7&amp;gt;&lt;br /&gt;
 100 nke.l2tp &amp;lt;1 3 4 5 6 7 99&amp;gt;&lt;br /&gt;
 101 nke.pptp &amp;lt;1 3 4 5 6 7 99&amp;gt;&lt;br /&gt;
 102 iokit.IO80211Family &amp;lt;1 3 4 5 6 7 17&amp;gt;&lt;br /&gt;
 103 driver.AppleBCMWLANCore &amp;lt;1 3 4 5 6 7 8 17 102&amp;gt;&lt;br /&gt;
 104 driver.AppleBCMWLANBusInterfaceSDIO &amp;lt;1 3 4 5 6 7 8 47 103&amp;gt;&lt;br /&gt;
 105 driver.AppleDiagnosticDataAccessReadOnly &amp;lt;1 3 4 5 7 8 94&amp;gt;&lt;br /&gt;
 106 driver.LightweightVolumeManager &amp;lt;1 3 4 5 9 15 24 26&amp;gt;&lt;br /&gt;
 107 driver.IOFlashNVRAM &amp;lt;1 3 4 5 6 7 25&amp;gt;&lt;br /&gt;
 108 driver.AppleNANDFirmware &amp;lt;1 3 4 5 25&amp;gt;&lt;br /&gt;
 109 driver.AppleImage3NORAccess &amp;lt;1 3 4 5 7 8 15 108&amp;gt;&lt;br /&gt;
 110 driver.AppleBluetooth &amp;lt;1 3 4 5 7 8&amp;gt;&lt;br /&gt;
 111 driver.AppleMultitouchSPI &amp;lt;1 3 4 5 7 8&amp;gt;&lt;br /&gt;
 112 driver.AppleUSBMike &amp;lt;1 3 4 5 8 22 33&amp;gt;&lt;br /&gt;
 113 driver.AppleUSBDeviceMux &amp;lt;1 3 4 5 6 7 33&amp;gt;&lt;br /&gt;
 114 driver.AppleUSBEthernetDevice &amp;lt;1 3 4 5 6 8 17 33&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For a specific extension, e.g. SandBox, the full information (including the handy load address) is also accessible:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;root# ./jkextstat -b sandbox  -x&amp;lt;/code&amp;gt;:&lt;br /&gt;
 &amp;lt;plist&amp;gt;&lt;br /&gt;
 &amp;lt;dict&amp;gt;&lt;br /&gt;
         &amp;lt;key&amp;gt;CFBundleIdentifier&amp;lt;/key&amp;gt;&lt;br /&gt;
         &amp;lt;string&amp;gt;com.apple.security.sandbox&amp;lt;/string&amp;gt;&lt;br /&gt;
         &amp;lt;key&amp;gt;CFBundleVersion&amp;lt;/key&amp;gt;&lt;br /&gt;
         &amp;lt;string&amp;gt;154.7&amp;lt;/string&amp;gt;&lt;br /&gt;
         &amp;lt;key&amp;gt;OSBundleCPUSubtype&amp;lt;/key&amp;gt;&lt;br /&gt;
         &amp;lt;integer&amp;gt;9&amp;lt;/integer&amp;gt;&lt;br /&gt;
         &amp;lt;key&amp;gt;OSBundleCPUType&amp;lt;/key&amp;gt;&lt;br /&gt;
         &amp;lt;integer&amp;gt;12&amp;lt;/integer&amp;gt;&lt;br /&gt;
         &amp;lt;key&amp;gt;OSBundleDependencies&amp;lt;/key&amp;gt;&lt;br /&gt;
         &amp;lt;array&amp;gt;&lt;br /&gt;
                 &amp;lt;integer&amp;gt;6&amp;lt;/integer&amp;gt;&lt;br /&gt;
                 &amp;lt;integer&amp;gt;7&amp;lt;/integer&amp;gt;&lt;br /&gt;
                 &amp;lt;integer&amp;gt;5&amp;lt;/integer&amp;gt;&lt;br /&gt;
                 &amp;lt;integer&amp;gt;3&amp;lt;/integer&amp;gt;&lt;br /&gt;
                 &amp;lt;integer&amp;gt;28&amp;lt;/integer&amp;gt;&lt;br /&gt;
                 &amp;lt;integer&amp;gt;1&amp;lt;/integer&amp;gt;&lt;br /&gt;
                 &amp;lt;integer&amp;gt;4&amp;lt;/integer&amp;gt;&lt;br /&gt;
                 &amp;lt;integer&amp;gt;16&amp;lt;/integer&amp;gt;&lt;br /&gt;
                 &amp;lt;integer&amp;gt;2&amp;lt;/integer&amp;gt;&lt;br /&gt;
         &amp;lt;/array&amp;gt;&lt;br /&gt;
         &amp;lt;key&amp;gt;OSBundleExecutablePath&amp;lt;/key&amp;gt;&lt;br /&gt;
         &amp;lt;string&amp;gt;/System/Library/Extensions/Sandbox.kext/Sandbox&amp;lt;/string&amp;gt;&lt;br /&gt;
         &amp;lt;key&amp;gt;OSBundleIsInterface&amp;lt;/key&amp;gt;&lt;br /&gt;
         &amp;lt;false/&amp;gt;&lt;br /&gt;
         &amp;lt;key&amp;gt;OSBundleLoadAddress&amp;lt;/key&amp;gt;&lt;br /&gt;
         &amp;lt;integer&amp;gt;2153734144&amp;lt;/integer&amp;gt;&lt;br /&gt;
         &amp;lt;key&amp;gt;OSBundleLoadSize&amp;lt;/key&amp;gt;&lt;br /&gt;
         &amp;lt;integer&amp;gt;36864&amp;lt;/integer&amp;gt;&lt;br /&gt;
         &amp;lt;key&amp;gt;OSBundleLoadTag&amp;lt;/key&amp;gt;&lt;br /&gt;
         &amp;lt;integer&amp;gt;29&amp;lt;/integer&amp;gt;&lt;br /&gt;
         &amp;lt;key&amp;gt;OSBundleMachOHeaders&amp;lt;/key&amp;gt;&lt;br /&gt;
         &amp;lt;data&amp;gt;&lt;br /&gt;
         zvrt/gwAAAAJAAAACwAAAAMAAAAgAgAAAQAAAAEAAAAEAQAAX19URVhUAAAAAAAAAAAA&lt;br /&gt;
         AABgX4AAgAAAAAAAAACAAAAHAAAABwAAAAMAAAAAAAAAX190ZXh0AAAAAAAAAAAAAF9f&lt;br /&gt;
         VEVYVAAAAAAAAAAAAADMbV+AKGEAAMwNAAACAAAAAAAAAAAAAAAABwCAAAAAAAAAAABf&lt;br /&gt;
         X2NzdHJpbmcAAAAAAAAAX19URVhUAAAAAAAAAAAAAPTOX4DLDQAA9G4AAAAAAAAAAAAA&lt;br /&gt;
         AAAAAAIAAAAAAAAAAAAAAF9fY29uc3QAAAAAAAAAAABfX1RFWFQAAAAAAAAAAAAAwNxf&lt;br /&gt;
         gDEDAADAfAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAQBAABfX0RBVEEAAAAA&lt;br /&gt;
         AAAAAAAAAOBfgAAQAAAAgAAAABAAAAcAAAAHAAAAAwAAAAAAAABfX2RhdGEAAAAAAAAA&lt;br /&gt;
         AAAAX19EQVRBAAAAAAAAAAAAAADgX4C0BgAAAIAAAAQAAAAAAAAAAAAAAAAAAAAAAAAA&lt;br /&gt;
         AAAAAF9fYnNzAAAAAAAAAAAAAABfX0RBVEEAAAAAAAAAAAAAwOZfgHgAAAAAAAAABAAA&lt;br /&gt;
         AAAAAAAAAAAAAQAAAAAAAAAAAAAAX19jb21tb24AAAAAAAAAAF9fREFUQQAAAAAAAAAA&lt;br /&gt;
         AAA451+AGAAAAAAAAAACAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAbAAAAGAAAABasg7Y2&lt;br /&gt;
         TzkVrtqsgOViBQ0=&lt;br /&gt;
         &amp;lt;/data&amp;gt;&lt;br /&gt;
         &amp;lt;key&amp;gt;OSBundlePath&amp;lt;/key&amp;gt;&lt;br /&gt;
         &amp;lt;string&amp;gt;/System/Library/Extensions/Sandbox.kext&amp;lt;/string&amp;gt;&lt;br /&gt;
         &amp;lt;key&amp;gt;OSBundlePrelinked&amp;lt;/key&amp;gt;&lt;br /&gt;
         &amp;lt;true/&amp;gt;&lt;br /&gt;
         &amp;lt;key&amp;gt;OSBundleRetainCount&amp;lt;/key&amp;gt;&lt;br /&gt;
         &amp;lt;integer&amp;gt;0&amp;lt;/integer&amp;gt;&lt;br /&gt;
         &amp;lt;key&amp;gt;OSBundleStarted&amp;lt;/key&amp;gt;&lt;br /&gt;
         &amp;lt;true/&amp;gt;&lt;br /&gt;
         &amp;lt;key&amp;gt;OSBundleUUID&amp;lt;/key&amp;gt;&lt;br /&gt;
         &amp;lt;data&amp;gt;&lt;br /&gt;
         FqyDtjZPORWu2qyA5WIFDQ==&lt;br /&gt;
         &amp;lt;/data&amp;gt;&lt;br /&gt;
         &amp;lt;key&amp;gt;OSBundleWiredSize&amp;lt;/key&amp;gt;&lt;br /&gt;
         &amp;lt;integer&amp;gt;36864&amp;lt;/integer&amp;gt;&lt;br /&gt;
         &amp;lt;key&amp;gt;OSKernelResource&amp;lt;/key&amp;gt;&lt;br /&gt;
         &amp;lt;false/&amp;gt;&lt;br /&gt;
 &amp;lt;/dict&amp;gt;&lt;br /&gt;
 &amp;lt;/plist&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It's also worth mentioning that, in the above listing, the OSBundleMachOHeaders (base-64 encoded binary headers) leak kernel addresses in iOS 6.0.0, allowing for its jailbreak, which has yet to be made public. This has been quickly fixed in iOS 6.0.1, effectively locking down iOS for the foreseeable future, thanks to security researcher mdowd.&lt;br /&gt;
&lt;br /&gt;
== External Links ==&lt;br /&gt;
Article by [[I0n1c|Stefan Esser]] about [https://media.blackhat.com/bh-us-11/Esser/BH_US_11_Esser_Exploiting_The_iOS_Kernel_Slides.pdf exploiting the kernel]&lt;br /&gt;
&lt;br /&gt;
Basic Source code of [http://newosxbook.com/src.jl?tree=listings&amp;amp;file=18-1-JKextstat.c  jkextstat] from the [http://www.amazon.com/gp/product/1118057651/ref=as_li_ss_tl?ie=UTF8&amp;amp;camp=1789&amp;amp;creative=390957&amp;amp;creativeASIN=1118057651&amp;amp;linkCode=as2&amp;amp;tag=newosxbookcom-20  OSX/iOS internals book].&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
* [[Kernel Syscalls]]&lt;br /&gt;
* [[Kernel Sysctls]]&lt;br /&gt;
* [[Kernel Task]]&lt;br /&gt;
* [[Kernel Symbols]]&lt;br /&gt;
* [[kdebug]]&lt;br /&gt;
&lt;br /&gt;
== External Links ==&lt;br /&gt;
* [http://opensource.apple.com/source/xnu XNU Source] (up to latest **OS X** version)&lt;/div&gt;</summary>
		<author><name>Chopin4g</name></author>
		
	</entry>
	<entry>
		<id>https://www.theiphonewiki.com/w/index.php?title=Kernel&amp;diff=28265</id>
		<title>Kernel</title>
		<link rel="alternate" type="text/html" href="https://www.theiphonewiki.com/w/index.php?title=Kernel&amp;diff=28265"/>
		<updated>2012-11-25T02:47:36Z</updated>

		<summary type="html">&lt;p&gt;Chopin4g: added uname/build info for 6.0.1&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The '''kernel''' of [[iOS]] is the [[wikipedia:XNU|XNU]] kernel. Pre-2.0, it was vulnerable to the [[Ramdisk Hack]] and may still be, but iBoot doesn't allow boot-args to be passed anymore. It is mapped to memory at 0x80000000, forcing a 2/2GB address separation, similar to Windows 32-bit model. On older iOS the separation was 3/1 (mapping the kernel at 0xC0000000), closer to the Linux model.&lt;br /&gt;
&lt;br /&gt;
Note, that this is NOT like 32-bit OS X, wherein the kernel resides in its own address space, but more like OS X 64-bit, wherein CR3 is shared (albeit an address space larger by several orders of magnitude). See the appropriate [[#64-bit|section]]&lt;br /&gt;
&lt;br /&gt;
== [[ASLR]] ==&lt;br /&gt;
{{main|Kernel ASLR}}&lt;br /&gt;
As of [[iOS]] 6, the kernel is subject to ASLR, much akin to Mountain Lion (OS X 10.8). This make exploitation harder as the location of kernel code cannot be known.&lt;br /&gt;
&lt;br /&gt;
On production devices, the kernel is always stored as a statically linked [[kernelcache|cache]] stored at [[/System/Library/Caches/com.apple.kernelcaches/kernelcache]] that is decompressed and run on startup. On development devices the kernel is stored in the same location as OS X, at [[/mach_kernel]].&lt;br /&gt;
&lt;br /&gt;
== Stack ==&lt;br /&gt;
The kernel maintains its stack at &amp;lt;code&amp;gt;0xd2000000&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Boot-Args ==&lt;br /&gt;
Like its OS X counterpart, iOS's XNU accepts command line arguments (though the actual passing of arguments is done by iBoot, which as of late refuses to do so). Arguments may be directed at the kernel proper, or any one of the many KExts (discussed below). The arguments of the kernel are largely the same as those of OS X.&lt;br /&gt;
&lt;br /&gt;
KExts use boot-args as well, as can be seen when disassembly by calls to PE_parse_boot_argn (usually exported, @0x80240800 on the iOS 5 iPod 4g kernel). Finding references (using IDA) reveals hundreds places in the code wherein arguments are parsed in modules, pertaining to Flash, HDMI, and [[AppleMobileFileIntegrity|AMFI]].&lt;br /&gt;
&lt;br /&gt;
== Versions ==&lt;br /&gt;
iOS has consistently maintained a higher kernel version than the corresponding version of OS X. At the time of writing, OS X Mountain Lion's XNU is 20xx, whereas iOS is 21xx. This is not surprising, considering that iOS has novel features (such as KASLR, the default freezer, and various security hardening features) which are first incorporated in it, and only later make it to OS X. The following demonstrates the two OS versions at present:&lt;br /&gt;
&lt;br /&gt;
OS X Mountain Lion:&lt;br /&gt;
&lt;br /&gt;
 Darwin Kernel Version 12.2.0: Sat Aug 25 00:48:52 PDT 2012; root:xnu-2050.18.24~1/RELEASE_X86_64 x86_64&lt;br /&gt;
	&lt;br /&gt;
iOS 6:&lt;br /&gt;
		&lt;br /&gt;
 Darwin Kernel Version 13.0.0: Sun Aug 19 00:31:06 PDT 2012; root:xnu-2107.2.33~4/RELEASE_ARM_S5L8950X&lt;br /&gt;
&lt;br /&gt;
Note: The RELEASE_ARM_xxxxxxxx file obviously differs on device / CPU.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable sortable&amp;quot; style=&amp;quot;font-size: smaller; text-align: center;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! width=&amp;quot;40&amp;quot; | Version&lt;br /&gt;
! width=&amp;quot;400&amp;quot; | Build&lt;br /&gt;
! width=&amp;quot;220&amp;quot; | Comment&lt;br /&gt;
|-&lt;br /&gt;
| [[Alpine 1A420 (iPhone)|1A420]]&lt;br /&gt;
| Darwin Kernel Version 4.4.2-Purple-19: Thu Mar 8 01:43:04 PST 2007; root:xnu-933.0.14~46/RELEASE_ARM_S5L8900XRB&lt;br /&gt;
| from prototype - not sure if 100% correct.&lt;br /&gt;
|-&lt;br /&gt;
| 1.0.0&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 1.0.1&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 1.0.2&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 1.1.1&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 1.1.2&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 1.1.3&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 1.1.4&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 2.0&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 2.0.1&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 2.0.2&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 2.1&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 2.2&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 2.2.1&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 3.0&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 3.0.1&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 3.1&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 3.1.2&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 3.1.3&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 3.2&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 3.2.1&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 3.2.2&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 4.0&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 4.0.1&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 4.0.2&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 4.1&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 4.2.1&lt;br /&gt;
| Darwin Kernel Version 10.4.0: Wed Oct 20 20:14:45 PDT 2010; root:xnu-1504.58.28~3/RELEASE_ARM_S5L8930X&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 4.3&lt;br /&gt;
| &lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 4.3.1&lt;br /&gt;
| &lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 4.3.2&lt;br /&gt;
| &lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 4.3.3&lt;br /&gt;
| Darwin Kernel Version 11.0.0: Wed Mar 30 18:44:45 PDT 2011; root:xnu-1735.46~10/RELEASE_ARM_[[S5L8920]]X&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 4.3.4&lt;br /&gt;
| &lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 4.3.5&lt;br /&gt;
| &lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 5.0&lt;br /&gt;
| Darwin Kernel Version 11.0.0: Thu Sep 15 23:34:43 PDT 2011; root:xnu-1878.4.43~2/RELEASE_ARM_[[S5L8940]]X&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 5.0.1&lt;br /&gt;
| Darwin Kernel Version 11.0.0: Tue Nov 1 20:34:16 PDT 2011; root:xnu-1878.4.46~1/RELEASE_ARM_[[S5L8940]]X&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 5.1&lt;br /&gt;
| Darwin Kernel Version 11.0.0: Wed Feb 1 23:18:07 PST 2012; root:xnu-1878.11.8~1/RELEASE_ARM_[[S5L8945]]X&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 5.1.1&lt;br /&gt;
| Darwin Kernel Version 11.0.0: Sun Apr 8 21:51:26 PDT 2012; root:xnu-1878.11.10~1/RELEASE_ARM_[[S5L8930]]X &lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 6.0&lt;br /&gt;
| Darwin Kernel Version 13.0.0: Sun Aug 19 00:31:06 PDT 2012; root:xnu-2107.2.33~4/RELEASE_ARM_[[S5L8950]]X&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| 6.0.1&lt;br /&gt;
| Darwin Kernel Version 13.0.0: Wed Oct 10 23:29:02 PDT 2012; root:xnu-2107.2.34~2/RELEASE_ARM_[[S5L8930]]X&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
This constant version scheme makes parsing with regex dead simple:&lt;br /&gt;
 Darwin Kernel Version ([0-9]+)\.([0-9]+)\.([0-9]+): (Sun|Mon|Tue|Wed|Thu|Fri|Sat) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ([0-9]{2}) ([0-9]{2}):([0-9]{2}):([0-9]{2}) ([A-Z]{3}) ([0-9]{4}); root:xnu-([0-9]+)\.([0-9]+)\.([0-9]+)~([0-9]+)/RELEASE_ARM_S5L([0-9]{4})X&lt;br /&gt;
with the results as:&lt;br /&gt;
 Darwin Kernel Version $1\.$2\.$3: $4 $5 $6 $7:$8:$9 $10 $11; root:xnu-$12.$13.$14~$15/RELEASE_ARM_S5L$16X&lt;br /&gt;
&lt;br /&gt;
== Source Code ==&lt;br /&gt;
As XNU is based off of the [[wikipedia:Berkeley Software Distribution|BSD kernel]], it is [http://opensource.apple.com/source/xnu open source]. The source is under a [http://opensource.apple.com/license/bsd/ 3-clause BSD License] for the original BSD portions with the portions added by Apple under the [http://opensource.apple.com/license/apsl/ Apple Public Source License]. The [[#Versions|versions contained in iOS]] are not available, instead only versions used in ''OS X'' are available. This does not appear to be legal as per &amp;amp;#x00A7;2.3 in the APSL:&lt;br /&gt;
 2.3     Distribution of Executable Versions.  In addition, if You Externally Deploy Covered&lt;br /&gt;
 Code (Original Code and/or Modifications) in object code, executable form only, '''You must'''&lt;br /&gt;
 '''include a prominent notice''', in the code itself as well as in related documentation, '''stating'''&lt;br /&gt;
 '''that Source Code of the Covered Code is available''' under the terms of this License '''with'''&lt;br /&gt;
 '''information on how and where to obtain such Source Code'''.&lt;br /&gt;
with ''Source Code'' defined in &amp;amp;#x00A7;1.8:&lt;br /&gt;
 1.8     &amp;quot;Source Code&amp;quot; means the human readable form of a program or other work that is&lt;br /&gt;
 suitable for making modifications to it, including all modules it contains, plus any&lt;br /&gt;
 associated interface definition files, scripts used to control compilation and installation&lt;br /&gt;
 of an executable (object code).&lt;br /&gt;
&lt;br /&gt;
It is worth noting that Apple does ''not'' list XNU as being an open source component of [[iOS]]. This can be seen by viewing [http://opensource.apple.com/ opensource.apple.com] and selecting ''any'' iOS version. As far as can be told, ''none'' of the versions of XNU are available in source version.&lt;br /&gt;
&lt;br /&gt;
There are many other open souce components that iOS uses that are ''not'' listed, such as:&lt;br /&gt;
* [http://opensource.apple.com/source/CF/ CF] ([https://developer.apple.com/library/mac/#documentation/CoreFoundation/Reference/CoreFoundation_Collection/_index.html CoreFoundation] - Cocoa)&lt;br /&gt;
* [http://opensource.apple.com/source/SQLite/ SQLite] ([http://www.sqlite.org/ SQLite] - database utility)&lt;br /&gt;
* [http://opensource.apple.com/source/TimeZoneData/ TimeZoneData] ([[wikipedia:tz database|tz database]] - [[/usr/share/zoneinfo]])&lt;br /&gt;
* [http://opensource.apple.com/source/curl/ curl](?) ([http://curl.haxx.se/ libcurl] - various HTTP operations)&lt;br /&gt;
* [http://opensource.apple.com/source/hfs/ hfs] (hfs - [[wikipedia:Hierarchical File System|HFS]] driver)&lt;br /&gt;
* [http://opensource.apple.com/source/launchd/ launchd] ([[launchd]] - launch daemon)&lt;br /&gt;
* [http://opensource.apple.com/source/libxml2/ libxml2](?) ([http://www.xmlsoft.org/ libxml2] - parser for [[wikipedia:XML|XML]] [[Property List|plist]]s)&amp;lt;!-- or does CF handle the parsing? --&amp;gt;&lt;br /&gt;
* [http://opensource.apple.com/source/xnu/ xnu] (XNU - Kernel)&lt;br /&gt;
* [http://opensource.apple.com/source/zip/ zip] (zip - extraction of various files)&lt;br /&gt;
It does ''not'' appear that Apple assumes what you see in the ''OS X'' pages are also on ''iOS''&amp;lt;!-- reword needed --&amp;gt; as [http://opensource.apple.com/source/JavaScriptCore/ JavaScriptCore], [http://opensource.apple.com/source/WebCore/ WebCore], among others are listed on both [http://opensource.apple.com/release/mac-os-x-108/ OS X] (10.8) and [http://opensource.apple.com/release/ios-60/ iOS] (6.0), albeit different versions.&lt;br /&gt;
&lt;br /&gt;
It is also worth noting that [http://opensource.apple.com/source/gdb/ gdb] ([[wikipedia:GNU Compiler Collection|GCC]] debugger) and [http://opensource.apple.com/source/ld64/ ld64] are listed as components in [http://opensource.apple.com/release/ios-60/ iOS 6.0]. Why there are present is a mystery as they are not present on unaltered devices, but only through [[Cydia.app|Cydia]] or [[Xcode]]'s &amp;lt;code&amp;gt;DeveloperImage.dmg&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Kernel Extensions ==&lt;br /&gt;
iOS, sadly, does ''not'' have [[Kernel Extension|kext]]s floating around the [[/|file system]], but they are indeed present. The [[kernelcache]] can be unpacked to show the kernel proper, along with the kexts (all packed in the __PRELINK_TEXT section) and their [[Property List|plist]]s (in the __PRELINK_INFO section).&lt;br /&gt;
&lt;br /&gt;
The Cydia supplied [[kextstat]] does not work on [[iOS]]. Sadly, the reason is that kextstat relies on &amp;lt;code&amp;gt;kmod_get_info(...)&amp;lt;/code&amp;gt;, which is a deprecated (and recently removed) API in recent&amp;lt;!-- how recent? --&amp;gt; iOS and OS X versions. With that said, the [[Kernel Extension|kext]]s ''do'' exist. The alternative, [[kextstat#jkextstat|jkextstat]], ''does'' work on recent iOS versions. jkextstat can cause some confusion as it uses the executable name &amp;lt;code&amp;gt;kextstat&amp;lt;/code&amp;gt;, similar to how calling &amp;lt;code&amp;gt;g++&amp;lt;/code&amp;gt; just launches &amp;lt;code&amp;gt;gcc&amp;lt;/code&amp;gt; but with parameters to treat all &amp;lt;code&amp;gt;.c&amp;lt;/code&amp;gt; files as C++ files.&lt;br /&gt;
&lt;br /&gt;
The following is the output from [[kextstat#jkextstat|jkextstat]] on an [[n81ap|iPod touch 4G]] running [[iOS]] 6(?):&lt;br /&gt;
&lt;br /&gt;
 Podicum:~ root# ./kextstat &lt;br /&gt;
   0 __kernel__ &lt;br /&gt;
   1 kpi.bsd &lt;br /&gt;
   2 kpi.dsep &lt;br /&gt;
   3 kpi.iokit &lt;br /&gt;
   4 kpi.libkern &lt;br /&gt;
   5 kpi.mach &lt;br /&gt;
   6 kpi.private &lt;br /&gt;
   7 kpi.unsupported &lt;br /&gt;
   8 driver.AppleARMPlatform &amp;lt;1 3 4 5 6 7&amp;gt;&lt;br /&gt;
   9 iokit.IOStorageFamily &amp;lt;1 3 4 5 6 7&amp;gt;&lt;br /&gt;
  10 driver.DiskImages &amp;lt;1 3 4 5 6 7 9&amp;gt;&lt;br /&gt;
  11 driver.FairPlayIOKit &amp;lt;1 3 4 5 6 7&amp;gt;&lt;br /&gt;
  12 driver.IOSlaveProcessor &amp;lt;3 4&amp;gt;&lt;br /&gt;
  13 driver.IOP_s5l8930x_firmware &amp;lt;3 4 12&amp;gt;&lt;br /&gt;
  14 iokit.AppleProfileFamily &amp;lt;1 3 4 5 6 7&amp;gt;&lt;br /&gt;
  15 iokit.IOCryptoAcceleratorFamily &amp;lt;1 3 4 5 7&amp;gt;&lt;br /&gt;
  16 driver.AppleMobileFileIntegrity &amp;lt;1 2 3 4 5 6 7 15&amp;gt;&lt;br /&gt;
  17 iokit.IONetworkingFamily &amp;lt;1 3 4 5 6 7&amp;gt;&lt;br /&gt;
  18 iokit.IOUserEthernet &amp;lt;1 3 4 5 6 16 17&amp;gt;&lt;br /&gt;
  19 platform.AppleKernelStorage &amp;lt;3 4 7&amp;gt;&lt;br /&gt;
  20 iokit.IOSurface &amp;lt;1 3 4 5 6 7 8&amp;gt;&lt;br /&gt;
  21 iokit.IOStreamFamily &amp;lt;3 4 5&amp;gt;&lt;br /&gt;
  22 iokit.IOAudio2Family &amp;lt;1 3 4 5 21&amp;gt;&lt;br /&gt;
  23 driver.AppleAC3Passthrough &amp;lt;1 3 4 5 7 8 11 21 22&amp;gt;&lt;br /&gt;
  24 iokit.EncryptedBlockStorage &amp;lt;1 3 4 5 9 15&amp;gt;&lt;br /&gt;
  25 iokit.IOFlashStorage &amp;lt;1 3 4 5 7 9 24&amp;gt;&lt;br /&gt;
  26 driver.AppleEffaceableStorage &amp;lt;1 3 4 5 7 8 25&amp;gt;&lt;br /&gt;
  27 driver.AppleKeyStore &amp;lt;1 3 4 5 6 7 15 16 26&amp;gt;&lt;br /&gt;
  28 kext.AppleMatch &amp;lt;1 4&amp;gt;&lt;br /&gt;
  29 security.sandbox &amp;lt;1 2 3 4 5 6 7 16 28&amp;gt;&lt;br /&gt;
  30 driver.AppleS5L8930X &amp;lt;1 3 4 5 7 8&amp;gt;&lt;br /&gt;
  31 iokit.IOHIDFamily &amp;lt;1 3 4 5 6 7 16&amp;gt;&lt;br /&gt;
  32 driver.AppleM68Buttons &amp;lt;1 3 4 5 7 8 31&amp;gt;&lt;br /&gt;
  33 iokit.IOUSBDeviceFamily &amp;lt;1 3 4 5&amp;gt;&lt;br /&gt;
  34 iokit.IOSerialFamily &amp;lt;1 3 4 5 6 7&amp;gt;&lt;br /&gt;
  35 driver.AppleOnboardSerial &amp;lt;1 3 4 5 7 34&amp;gt;&lt;br /&gt;
  36 iokit.IOAccessoryManager &amp;lt;3 4 5 7 8 33 34 35&amp;gt;&lt;br /&gt;
  37 driver.AppleProfileTimestampAction &amp;lt;1 3 4 5 14&amp;gt;&lt;br /&gt;
  38 driver.AppleProfileThreadInfoAction &amp;lt;1 3 4 6 14&amp;gt;&lt;br /&gt;
  39 driver.AppleProfileKEventAction &amp;lt;1 3 4 14&amp;gt;&lt;br /&gt;
  40 driver.AppleProfileRegisterStateAction &amp;lt;1 3 4 14&amp;gt;&lt;br /&gt;
  41 driver.AppleProfileCallstackAction &amp;lt;1 3 4 5 6 14&amp;gt;&lt;br /&gt;
  42 driver.AppleProfileReadCounterAction &amp;lt;3 4 6 14&amp;gt;&lt;br /&gt;
  43 driver.AppleARMPL192VIC &amp;lt;3 4 5 7 8&amp;gt;&lt;br /&gt;
  44 driver.AppleCDMA &amp;lt;1 3 4 5 7 8 15&amp;gt;&lt;br /&gt;
  45 driver.IODARTFamily &amp;lt;3 4 5&amp;gt;&lt;br /&gt;
  46 driver.AppleS5L8930XDART &amp;lt;1 3 4 5 7 8 45&amp;gt;&lt;br /&gt;
  47 iokit.IOSDIOFamily &amp;lt;1 3 4 5 7&amp;gt;&lt;br /&gt;
  48 driver.AppleIOPSDIO &amp;lt;1 3 4 5 7 8 12 47&amp;gt;&lt;br /&gt;
  49 driver.AppleIOPFMI &amp;lt;1 3 4 5 7 8 12 25&amp;gt;&lt;br /&gt;
  50 driver.AppleSamsungSPI &amp;lt;1 3 4 5 7 8&amp;gt;&lt;br /&gt;
  51 driver.AppleSamsungSerial &amp;lt;1 3 4 5 7 8 34 35&amp;gt;&lt;br /&gt;
  52 driver.AppleSamsungPKE &amp;lt;3 4 5 7 8 15&amp;gt;&lt;br /&gt;
  53 driver.AppleS5L8920X &amp;lt;1 3 4 5 7 8&amp;gt;&lt;br /&gt;
  54 driver.AppleSamsungI2S &amp;lt;1 3 4 5 7 8&amp;gt;&lt;br /&gt;
  55 driver.AppleEmbeddedUSB &amp;lt;1 3 4 5 7 8&amp;gt;&lt;br /&gt;
  56 driver.AppleS5L8930XUSBPhy &amp;lt;1 3 4 5 7 8 55&amp;gt;&lt;br /&gt;
  57 iokit.IOUSBFamily &amp;lt;1 3 4 5 7&amp;gt;&lt;br /&gt;
  58 driver.AppleUSBEHCI &amp;lt;1 3 4 5 7 57&amp;gt;&lt;br /&gt;
  59 driver.AppleUSBComposite &amp;lt;1 3 4 57&amp;gt;&lt;br /&gt;
  60 driver.AppleEmbeddedUSBHost &amp;lt;1 3 4 5 7 55 57 59&amp;gt;&lt;br /&gt;
  61 driver.AppleUSBOHCI &amp;lt;1 3 4 5 57&amp;gt;&lt;br /&gt;
  62 driver.AppleUSBOHCIARM &amp;lt;3 4 5 8 55 57 60 61&amp;gt;&lt;br /&gt;
  63 driver.AppleUSBHub &amp;lt;1 3 4 5 57&amp;gt;&lt;br /&gt;
  64 driver.AppleUSBEHCIARM &amp;lt;3 4 5 8 55 57 58 60 63&amp;gt;&lt;br /&gt;
  65 driver.AppleS5L8930XUSB &amp;lt;1 3 4 5 7 8 55 57 58 60 61 62 64&amp;gt;&lt;br /&gt;
  66 driver.AppleARM7M &amp;lt;3 4 8 12&amp;gt;&lt;br /&gt;
  67 driver.EmbeddedIOP &amp;lt;3 4 5 12&amp;gt;&lt;br /&gt;
  68 driver.AppleVXD375 &amp;lt;1 3 4 5 7 8 11&amp;gt;&lt;br /&gt;
  69 driver.AppleD1815PMU &amp;lt;1 3 4 5 7 8 31&amp;gt;&lt;br /&gt;
  70 iokit.AppleARMIISAudio &amp;lt;1 3 4 5 7 22&amp;gt;&lt;br /&gt;
  71 driver.AppleEmbeddedAudio &amp;lt;1 3 4 5 7 8 22 31 70&amp;gt;&lt;br /&gt;
  72 driver.AppleCS42L59Audio &amp;lt;3 4 5 8 22 31 70 71&amp;gt;&lt;br /&gt;
  73 driver.AppleEmbeddedAccelerometer &amp;lt;3 4 5 7 8 31&amp;gt;&lt;br /&gt;
  74 driver.AppleEmbeddedGyro &amp;lt;1 3 4 5 7 8 31&amp;gt;&lt;br /&gt;
  75 driver.AppleEmbeddedLightSensor &amp;lt;3 4 5 7 8 31&amp;gt;&lt;br /&gt;
  76 iokit.IOAcceleratorFamily &amp;lt;1 3 4 5 7 8&amp;gt;&lt;br /&gt;
  77 IMGSGX535 &amp;lt;1 3 4 5 7 8 76&amp;gt;&lt;br /&gt;
  78 driver.H2H264VideoEncoderDriver &amp;lt;1 3 4 5 7 8&amp;gt;&lt;br /&gt;
  79 driver.AppleJPEGDriver &amp;lt;1 3 4 5 7 8&amp;gt;&lt;br /&gt;
  80 driver.AppleH3CameraInterface &amp;lt;1 3 4 5 7 8&amp;gt;&lt;br /&gt;
  81 driver.AppleM2ScalerCSCDriver &amp;lt;1 3 4 5 7 8 45&amp;gt;&lt;br /&gt;
  82 iokit.IOMobileGraphicsFamily &amp;lt;1 3 4 5 7 8&amp;gt;&lt;br /&gt;
  83 driver.AppleDisplayPipe &amp;lt;1 3 4 5 7 8 82&amp;gt;&lt;br /&gt;
  84 driver.AppleCLCD &amp;lt;1 3 4 5 7 8 82 83&amp;gt;&lt;br /&gt;
  85 driver.AppleSamsungMIPIDSI &amp;lt;1 3 4 5 7 8&amp;gt;&lt;br /&gt;
  86 driver.ApplePinotLCD &amp;lt;1 3 4 5 7 8&amp;gt;&lt;br /&gt;
  87 driver.AppleSamsungSWI &amp;lt;1 3 4 5 7 8&amp;gt;&lt;br /&gt;
  88 iokit.IODisplayPortFamily &amp;lt;1 3 4 5 6 7 22&amp;gt;&lt;br /&gt;
  89 driver.AppleRGBOUT &amp;lt;1 3 4 5 7 8 82 83 88&amp;gt;&lt;br /&gt;
  90 driver.AppleTVOut &amp;lt;1 3 4 5 7 8&amp;gt;&lt;br /&gt;
  91 driver.AppleAMC_r2 &amp;lt;1 3 4 5 7 8 11 21 22&amp;gt;&lt;br /&gt;
  92 driver.AppleSamsungDPTX &amp;lt;3 4 5 7 8 88&amp;gt;&lt;br /&gt;
  93 driver.AppleSynopsysOTGDevice &amp;lt;1 3 4 5 7 8 33 55&amp;gt;&lt;br /&gt;
  94 driver.AppleNANDFTL &amp;lt;1 3 4 5 7 9 25&amp;gt;&lt;br /&gt;
  95 driver.AppleNANDLegacyFTL &amp;lt;1 3 4 5 9 25 94&amp;gt;&lt;br /&gt;
  96 AppleFSCompression.AppleFSCompressionTypeZlib &amp;lt;1 2 3 4 6&amp;gt;&lt;br /&gt;
  97 IOTextEncryptionFamily &amp;lt;1 3 4 5 7 11&amp;gt;&lt;br /&gt;
  98 driver.AppleBSDKextStarter &amp;lt;3 4&amp;gt;&lt;br /&gt;
  99 nke.ppp &amp;lt;1 3 4 5 6 7&amp;gt;&lt;br /&gt;
 100 nke.l2tp &amp;lt;1 3 4 5 6 7 99&amp;gt;&lt;br /&gt;
 101 nke.pptp &amp;lt;1 3 4 5 6 7 99&amp;gt;&lt;br /&gt;
 102 iokit.IO80211Family &amp;lt;1 3 4 5 6 7 17&amp;gt;&lt;br /&gt;
 103 driver.AppleBCMWLANCore &amp;lt;1 3 4 5 6 7 8 17 102&amp;gt;&lt;br /&gt;
 104 driver.AppleBCMWLANBusInterfaceSDIO &amp;lt;1 3 4 5 6 7 8 47 103&amp;gt;&lt;br /&gt;
 105 driver.AppleDiagnosticDataAccessReadOnly &amp;lt;1 3 4 5 7 8 94&amp;gt;&lt;br /&gt;
 106 driver.LightweightVolumeManager &amp;lt;1 3 4 5 9 15 24 26&amp;gt;&lt;br /&gt;
 107 driver.IOFlashNVRAM &amp;lt;1 3 4 5 6 7 25&amp;gt;&lt;br /&gt;
 108 driver.AppleNANDFirmware &amp;lt;1 3 4 5 25&amp;gt;&lt;br /&gt;
 109 driver.AppleImage3NORAccess &amp;lt;1 3 4 5 7 8 15 108&amp;gt;&lt;br /&gt;
 110 driver.AppleBluetooth &amp;lt;1 3 4 5 7 8&amp;gt;&lt;br /&gt;
 111 driver.AppleMultitouchSPI &amp;lt;1 3 4 5 7 8&amp;gt;&lt;br /&gt;
 112 driver.AppleUSBMike &amp;lt;1 3 4 5 8 22 33&amp;gt;&lt;br /&gt;
 113 driver.AppleUSBDeviceMux &amp;lt;1 3 4 5 6 7 33&amp;gt;&lt;br /&gt;
 114 driver.AppleUSBEthernetDevice &amp;lt;1 3 4 5 6 8 17 33&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For a specific extension, e.g. SandBox, the full information (including the handy load address) is also accessible:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;root# ./jkextstat -b sandbox  -x&amp;lt;/code&amp;gt;:&lt;br /&gt;
 &amp;lt;plist&amp;gt;&lt;br /&gt;
 &amp;lt;dict&amp;gt;&lt;br /&gt;
         &amp;lt;key&amp;gt;CFBundleIdentifier&amp;lt;/key&amp;gt;&lt;br /&gt;
         &amp;lt;string&amp;gt;com.apple.security.sandbox&amp;lt;/string&amp;gt;&lt;br /&gt;
         &amp;lt;key&amp;gt;CFBundleVersion&amp;lt;/key&amp;gt;&lt;br /&gt;
         &amp;lt;string&amp;gt;154.7&amp;lt;/string&amp;gt;&lt;br /&gt;
         &amp;lt;key&amp;gt;OSBundleCPUSubtype&amp;lt;/key&amp;gt;&lt;br /&gt;
         &amp;lt;integer&amp;gt;9&amp;lt;/integer&amp;gt;&lt;br /&gt;
         &amp;lt;key&amp;gt;OSBundleCPUType&amp;lt;/key&amp;gt;&lt;br /&gt;
         &amp;lt;integer&amp;gt;12&amp;lt;/integer&amp;gt;&lt;br /&gt;
         &amp;lt;key&amp;gt;OSBundleDependencies&amp;lt;/key&amp;gt;&lt;br /&gt;
         &amp;lt;array&amp;gt;&lt;br /&gt;
                 &amp;lt;integer&amp;gt;6&amp;lt;/integer&amp;gt;&lt;br /&gt;
                 &amp;lt;integer&amp;gt;7&amp;lt;/integer&amp;gt;&lt;br /&gt;
                 &amp;lt;integer&amp;gt;5&amp;lt;/integer&amp;gt;&lt;br /&gt;
                 &amp;lt;integer&amp;gt;3&amp;lt;/integer&amp;gt;&lt;br /&gt;
                 &amp;lt;integer&amp;gt;28&amp;lt;/integer&amp;gt;&lt;br /&gt;
                 &amp;lt;integer&amp;gt;1&amp;lt;/integer&amp;gt;&lt;br /&gt;
                 &amp;lt;integer&amp;gt;4&amp;lt;/integer&amp;gt;&lt;br /&gt;
                 &amp;lt;integer&amp;gt;16&amp;lt;/integer&amp;gt;&lt;br /&gt;
                 &amp;lt;integer&amp;gt;2&amp;lt;/integer&amp;gt;&lt;br /&gt;
         &amp;lt;/array&amp;gt;&lt;br /&gt;
         &amp;lt;key&amp;gt;OSBundleExecutablePath&amp;lt;/key&amp;gt;&lt;br /&gt;
         &amp;lt;string&amp;gt;/System/Library/Extensions/Sandbox.kext/Sandbox&amp;lt;/string&amp;gt;&lt;br /&gt;
         &amp;lt;key&amp;gt;OSBundleIsInterface&amp;lt;/key&amp;gt;&lt;br /&gt;
         &amp;lt;false/&amp;gt;&lt;br /&gt;
         &amp;lt;key&amp;gt;OSBundleLoadAddress&amp;lt;/key&amp;gt;&lt;br /&gt;
         &amp;lt;integer&amp;gt;2153734144&amp;lt;/integer&amp;gt;&lt;br /&gt;
         &amp;lt;key&amp;gt;OSBundleLoadSize&amp;lt;/key&amp;gt;&lt;br /&gt;
         &amp;lt;integer&amp;gt;36864&amp;lt;/integer&amp;gt;&lt;br /&gt;
         &amp;lt;key&amp;gt;OSBundleLoadTag&amp;lt;/key&amp;gt;&lt;br /&gt;
         &amp;lt;integer&amp;gt;29&amp;lt;/integer&amp;gt;&lt;br /&gt;
         &amp;lt;key&amp;gt;OSBundleMachOHeaders&amp;lt;/key&amp;gt;&lt;br /&gt;
         &amp;lt;data&amp;gt;&lt;br /&gt;
         zvrt/gwAAAAJAAAACwAAAAMAAAAgAgAAAQAAAAEAAAAEAQAAX19URVhUAAAAAAAAAAAA&lt;br /&gt;
         AABgX4AAgAAAAAAAAACAAAAHAAAABwAAAAMAAAAAAAAAX190ZXh0AAAAAAAAAAAAAF9f&lt;br /&gt;
         VEVYVAAAAAAAAAAAAADMbV+AKGEAAMwNAAACAAAAAAAAAAAAAAAABwCAAAAAAAAAAABf&lt;br /&gt;
         X2NzdHJpbmcAAAAAAAAAX19URVhUAAAAAAAAAAAAAPTOX4DLDQAA9G4AAAAAAAAAAAAA&lt;br /&gt;
         AAAAAAIAAAAAAAAAAAAAAF9fY29uc3QAAAAAAAAAAABfX1RFWFQAAAAAAAAAAAAAwNxf&lt;br /&gt;
         gDEDAADAfAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAQBAABfX0RBVEEAAAAA&lt;br /&gt;
         AAAAAAAAAOBfgAAQAAAAgAAAABAAAAcAAAAHAAAAAwAAAAAAAABfX2RhdGEAAAAAAAAA&lt;br /&gt;
         AAAAX19EQVRBAAAAAAAAAAAAAADgX4C0BgAAAIAAAAQAAAAAAAAAAAAAAAAAAAAAAAAA&lt;br /&gt;
         AAAAAF9fYnNzAAAAAAAAAAAAAABfX0RBVEEAAAAAAAAAAAAAwOZfgHgAAAAAAAAABAAA&lt;br /&gt;
         AAAAAAAAAAAAAQAAAAAAAAAAAAAAX19jb21tb24AAAAAAAAAAF9fREFUQQAAAAAAAAAA&lt;br /&gt;
         AAA451+AGAAAAAAAAAACAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAbAAAAGAAAABasg7Y2&lt;br /&gt;
         TzkVrtqsgOViBQ0=&lt;br /&gt;
         &amp;lt;/data&amp;gt;&lt;br /&gt;
         &amp;lt;key&amp;gt;OSBundlePath&amp;lt;/key&amp;gt;&lt;br /&gt;
         &amp;lt;string&amp;gt;/System/Library/Extensions/Sandbox.kext&amp;lt;/string&amp;gt;&lt;br /&gt;
         &amp;lt;key&amp;gt;OSBundlePrelinked&amp;lt;/key&amp;gt;&lt;br /&gt;
         &amp;lt;true/&amp;gt;&lt;br /&gt;
         &amp;lt;key&amp;gt;OSBundleRetainCount&amp;lt;/key&amp;gt;&lt;br /&gt;
         &amp;lt;integer&amp;gt;0&amp;lt;/integer&amp;gt;&lt;br /&gt;
         &amp;lt;key&amp;gt;OSBundleStarted&amp;lt;/key&amp;gt;&lt;br /&gt;
         &amp;lt;true/&amp;gt;&lt;br /&gt;
         &amp;lt;key&amp;gt;OSBundleUUID&amp;lt;/key&amp;gt;&lt;br /&gt;
         &amp;lt;data&amp;gt;&lt;br /&gt;
         FqyDtjZPORWu2qyA5WIFDQ==&lt;br /&gt;
         &amp;lt;/data&amp;gt;&lt;br /&gt;
         &amp;lt;key&amp;gt;OSBundleWiredSize&amp;lt;/key&amp;gt;&lt;br /&gt;
         &amp;lt;integer&amp;gt;36864&amp;lt;/integer&amp;gt;&lt;br /&gt;
         &amp;lt;key&amp;gt;OSKernelResource&amp;lt;/key&amp;gt;&lt;br /&gt;
         &amp;lt;false/&amp;gt;&lt;br /&gt;
 &amp;lt;/dict&amp;gt;&lt;br /&gt;
 &amp;lt;/plist&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It's also worth mentioning that, in the above listing, the OSBundleMachOHeaders (base-64 encoded binary headers) leak kernel addresses in iOS 6.0.0, allowing for its jailbreak, which has yet to be made public. This has been quickly fixed in iOS 6.0.1, effectively locking down iOS for the foreseeable future, thanks to security researcher mdowd.&lt;br /&gt;
&lt;br /&gt;
== External Links ==&lt;br /&gt;
Article by [[I0n1c|Stefan Esser]] about [https://media.blackhat.com/bh-us-11/Esser/BH_US_11_Esser_Exploiting_The_iOS_Kernel_Slides.pdf exploiting the kernel]&lt;br /&gt;
&lt;br /&gt;
Basic Source code of [http://newosxbook.com/src.jl?tree=listings&amp;amp;file=18-1-JKextstat.c  jkextstat] from the [http://www.amazon.com/gp/product/1118057651/ref=as_li_ss_tl?ie=UTF8&amp;amp;camp=1789&amp;amp;creative=390957&amp;amp;creativeASIN=1118057651&amp;amp;linkCode=as2&amp;amp;tag=newosxbookcom-20  OSX/iOS internals book].&lt;br /&gt;
&lt;br /&gt;
== See Also ==&lt;br /&gt;
* [[Kernel Syscalls]]&lt;br /&gt;
* [[Kernel Sysctls]]&lt;br /&gt;
* [[Kernel Task]]&lt;br /&gt;
* [[Kernel Symbols]]&lt;br /&gt;
* [[kdebug]]&lt;br /&gt;
&lt;br /&gt;
== External Links ==&lt;br /&gt;
* [http://opensource.apple.com/source/xnu XNU Source] (up to latest **OS X** version)&lt;/div&gt;</summary>
		<author><name>Chopin4g</name></author>
		
	</entry>
	<entry>
		<id>https://www.theiphonewiki.com/w/index.php?title=Kernel_Symbols&amp;diff=28124</id>
		<title>Kernel Symbols</title>
		<link rel="alternate" type="text/html" href="https://www.theiphonewiki.com/w/index.php?title=Kernel_Symbols&amp;diff=28124"/>
		<updated>2012-11-13T22:20:59Z</updated>

		<summary type="html">&lt;p&gt;Chopin4g: added some symbols from 6.0gm and 6.0.1&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;iOS's XNU is largely stripped, and contains fewer and fewer symbols with its newer versions. Whereas in pre 3.0 most symbols were visible, nowadays only symbols required for KExt linkage remain so.&lt;br /&gt;
&lt;br /&gt;
This page is started in the hopes of bringing together efforts of the various jailbreakers so as to pool already symbolified sections of the kernel. Because addresses change along with the different builds, please add the symbols under the right kernel version (i.e. release + device). If not 100% sure about a symbol, indicate the level of confidence. &lt;br /&gt;
&lt;br /&gt;
Started with [[N81ap|iPod touch 4G]], because this is the main kernel the author has largely (&amp;gt;80%) symbolicated. Please add your own. Even if your build is different, the address space doesn't change that much. Bear in mind that - if Mountain Lion is any indication - iOS will soon introduce kernel level [[ASLR]], as well.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;font-size: smaller; text-align: center; table-layout: fixed; border-collapse: collapse;&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!symbol&lt;br /&gt;
!5.0.x [[N81ap|iPod touch 4G]]&lt;br /&gt;
!5.0.1 iPhone 4S&lt;br /&gt;
!5.1 [[N81ap|iPod touch 4G]]&lt;br /&gt;
!6.0b1 [[N81ap|iPod touch 4G]]&lt;br /&gt;
!6.0 [[N81ap|iPod touch 4G]]&lt;br /&gt;
!6.0.1 [[N81ap|iPod touch 4G]]&lt;br /&gt;
!Notes&lt;br /&gt;
|-&lt;br /&gt;
|_exception_triage&lt;br /&gt;
|0x80016C34&lt;br /&gt;
| ???&lt;br /&gt;
| ...&lt;br /&gt;
| ...&lt;br /&gt;
|0x80018774&lt;br /&gt;
|0x80018774&lt;br /&gt;
|The Mach exception processing logic.&lt;br /&gt;
|-&lt;br /&gt;
|sysent&lt;br /&gt;
|0x802CCBAC&lt;br /&gt;
|0x802CBBAC&lt;br /&gt;
|0x802CCBAC&lt;br /&gt;
|0x802F00B8&lt;br /&gt;
|0x802F00B8&lt;br /&gt;
|0x802F00B8&lt;br /&gt;
|Through this you can obtain all of XNU's 438 system calls, e.g. _exit @0x8019DE04 on iPod, 0x8019D278 on iPhone 4S, etc.&lt;br /&gt;
|-&lt;br /&gt;
|syscall_names&lt;br /&gt;
|0x802D2C6C&lt;br /&gt;
|0x802D1C6C-0x802D2340&lt;br /&gt;
|0x802D2C5C-0x802D4338&lt;br /&gt;
|0x802A6538-0x802A7540&lt;br /&gt;
|0x802E8FB0-0x802E969C&lt;br /&gt;
|0x802E8FB0-0x802E969C&lt;br /&gt;
|The char[][] containing the textual names of all system calls&lt;br /&gt;
|-&lt;br /&gt;
|AppleMobileFileIntegrity_Start&lt;br /&gt;
|0x805E499C&lt;br /&gt;
| ???&lt;br /&gt;
|0x805D5B94&lt;br /&gt;
| ...&lt;br /&gt;
| ...&lt;br /&gt;
| ...&lt;br /&gt;
|Initialization of AMFI, the kext responsible for [[sandbox]] policies and entitlements&lt;br /&gt;
|-&lt;br /&gt;
|bsd_init&lt;br /&gt;
|0x802B77C0&lt;br /&gt;
| ???&lt;br /&gt;
|0x802B8A24&lt;br /&gt;
| ...&lt;br /&gt;
|0x802B85B4&lt;br /&gt;
|0x802B9618&lt;br /&gt;
|BSD layer initialization logic. Branches out to initialize virtually every BSD subsystem. Same as OS X XNU, with minor exception (e.g. kernel_memorystatus/jetsam, iptap..)&lt;br /&gt;
|-&lt;br /&gt;
|ExceptionVectorsBase&lt;br /&gt;
|0x80078000&lt;br /&gt;
|0x80078000&lt;br /&gt;
|0x80078000&lt;br /&gt;
| ...&lt;br /&gt;
| ...&lt;br /&gt;
| ...&lt;br /&gt;
|Address of CPU exception handlers in kernel space: fleh_reset, fleh_undef, fleh_swi, fleh_prefabt, _fleh_dataabt, _fleh_addrexc and fleh_irq can be obtained from here&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Note: For most of the above symbols, a fairly decent source code can be obtained from the public open source XNU at opensource.apple. Bear in mind that ml_, PE_ and other machine specific functions will naturally be implemented quite differently. (but, it's a start!).&lt;/div&gt;</summary>
		<author><name>Chopin4g</name></author>
		
	</entry>
</feed>