Difference between pages "Windows SuperFetch Format" and "Mac OS X"

From ForensicsWiki
(Difference between pages)
Jump to: navigation, search
 
(Startup Items)
 
Line 1: Line 1:
{{expand}}
+
{{Expand}}
  
SuperFetch, is a memory management scheme that enhances the least-recently accessed approach with historical information and proactive memory management. [http://technet.microsoft.com/en-us/magazine/2007.03.vistakernel.aspx]
+
Apple Inc.'s Macintosh OS X (pronounced "'''OS Ten'''") is the operating system distributed with Apple computers. It includes heavily used several programs by default, including [[Apple Mail]], a web browser called [[Apple Safari | Safari]], and an [[Apple Address Book]], and [[iCal]].
  
<b>Note that the following format specification are incomplete.</b>
+
== Disk image types ==
  
== SuperFetch DB files ==
+
Mac OS X has support for various disk image types build-in, some of which are:
The <tt>Ag*.db</tt> files are of the SuperFetch file format. E.g.
+
* read-write disk image (.dmg) some of which use the [[Raw Image Format]]
 +
* [[Sparse Image format|Sparse disk image (.spareimage)]]
 +
* [[Sparse Bundle Image format|Sparse bundle disk image (.sparsebundle)]]
 +
 
 +
== Burn Folder ==
 +
 
 +
Mac OS X Burn Folder:
 
<pre>
 
<pre>
AgAppLaunch.db
+
$NAME.fpbf
AgCx_SC*.db
+
AgGlFaultHistory.db
+
AgGlFgAppHistory.db
+
AgGlGlobalHistory.db
+
AgGlUAD_%SID%.db
+
AgGlUAD_P_%SID%.db
+
AgRobust.db
+
 
</pre>
 
</pre>
  
The SuperFetch DB files can be stored in uncompressed or compressed form, where different version of Windows use different compressed forms:
+
This folder normally contains [[Mac OS X Alias Files|alias files]] (similar to LNK files under Windows). Which should have the following signature.
* Compressed SuperFetch DB - MEMO file format; Windows Vista
+
<pre>
* Compressed SuperFetch DB - MEM0 file format; Windows 7
+
00000000 62 6f 6f 6b 00 00 00 00  6d 61 72 6b 00 00 00 00  |book....mark....|
* Compressed SuperFetch DB - MAM file format; Windows 8
+
</pre>
  
=== Compressed SuperFetch DB - MEMO file format ===
+
These [[Mac OS X Alias Files|alias files]] contain additional date and time values.
The MEM file consists of:
+
* file header
+
* compressed blocks
+
  
This format uses the LZNT1 compression method
+
Also check the following files for references to deleted .fpbf paths:
 +
<pre>
 +
/Users/$USERNAME/Library/Preferences/com.apple.finder.plist
 +
/Users/$USERNAME/Library/Preferences/com.apple.sidebarlists.plist
 +
</pre>
  
==== File header ====
+
Actual burning of optical media is logged in:
The file header is 84 bytes of size and consists of:
+
<pre>
{| class="wikitable"
+
/var/log/system.log
|-
+
/Users/$USERNAME/Library/Logs/DiscRecording.log
! Offset
+
/private/var/.logs_exporter/cache/Users/$USERNAME/Library/Logs/DiscRecording.log
! Size
+
</pre>
! Value
+
! Description
+
|-
+
| 0
+
| 4
+
| "MEMO" (0x4d, 0x45, 0x4d, 0x4f)
+
| Signature
+
|-
+
| 4
+
| 4
+
|
+
| Uncompressed (total) data size
+
|-
+
|}
+
  
==== Compressed blocks ====
+
== HFS/HFS+ date and time values ==
The compressed block size is the chunk data size, which is part of the LZNT1 compressed data, + 2 bytes for the size of the chunk header itself.
+
  
The uncompressed block size is 4096 (0x1000) or the remaining uncompressed data size for the last block.
+
In HFS+ date and time values are stored in an unsigned 32-bit integer containing the number of seconds since January 1, 1904 at 00:00:00 (midnight) UTC (GMT). This is slightly different from HFS where the date and time value are stored using the local time. The maximum representable date is February 6, 2040 at 06:28:15 UTC (GMT). The date values do not account for leap seconds. They do include a leap day in every year that is evenly divisible by four. This is sufficient given that the range of representable dates does not contain 1900 or 2100, neither of which have leap days. Also see: [http://web.archive.org/web/20090214212148/http://developer.apple.com/technotes/tn/tn1150.html Technical Note TN1150 - HFS Plus Volume Format]
  
=== Compressed SuperFetch DB - MEM0 file format ===
+
Converting HFS/HFS+ date and time values with Python:
The MEM file consists of:
+
<pre>
* file header
+
import datetime
* compressed blocks
+
  
This format uses the LZXPRESS Huffman compression method
+
print datetime.datetime( 1904, 1, 1 ) + datetime.timedelta( seconds=0xCBDAF25B )
 +
</pre>
  
==== File header ====
+
== Launch Agents ==
The file header is 8 bytes of size and consists of:
+
<pre>
{| class="wikitable"
+
/System/Library/LaunchAgents/
|-
+
</pre>
! Offset
+
! Size
+
! Value
+
! Description
+
|-
+
| 0
+
| 4
+
| "MEM0" (0x4d, 0x45, 0x4d, 0x30)
+
| Signature
+
|-
+
| 4
+
| 4
+
|
+
| Uncompressed (total) data size
+
|-
+
|}
+
  
==== Compressed blocks ====
+
== Launch Daemons ==
The file header is followed by compressed blocks:
+
<pre>
{| class="wikitable"
+
/Library/LaunchDaemons/
|-
+
/System/Library/LaunchDaemons/
! Offset
+
</pre>
! Size
+
! Value
+
! Description
+
|-
+
| 0
+
| 4
+
|
+
| Compressed data size
+
|-
+
| 4
+
| ...
+
|
+
| Compressed data
+
|-
+
|}
+
  
The uncompressed block size is 65536 (0x10000) or the remaining uncompressed data size for the last block.
+
== Startup Items ==
 +
<pre>
 +
/Library/StartupItems/
 +
/System/Library/StartupItems/
 +
</pre>
  
=== Compressed SuperFetch DB - MAM file format ===
+
== Crash Reporter ==
The MAM file consists of:
+
<pre>
* file header
+
/Library/Application Support/CrashReporter
* compressed blocks
+
</pre>
  
This format uses the LZXPRESS Huffman compression method.
+
== Diagnostic Reports ==
 +
<pre>
 +
/Library/Logs/DiagnosticReports
 +
</pre>
  
==== File header ====
+
== Quarantine event database ==
The file header is 12 bytes of size and consists of:
+
See [http://menial.co.uk/blog/2011/06/16/mac-quarantine-event-database/]
{| class="wikitable"
+
|-
+
! Offset
+
! Size
+
! Value
+
! Description
+
|-
+
| 0
+
| 4
+
| "MAM\x84" (0x4d, 0x41, 0x4d, 0x84)
+
| Signature
+
|-
+
| 4
+
| 4
+
|
+
| Uncompressed (total) data size
+
|-
+
| 8
+
| 4
+
|
+
| Unknown (checksum?)
+
|-
+
|}
+
  
==== Compressed blocks ====
+
Snow Leopard and earlier
The uncompressed block size is 65536 (0x10000) or the remaining uncompressed data size for the last block.
+
<pre>
 +
/Users/$USER/Library/Preferences/com.apple.LaunchServices.QuarantineEvents
 +
</pre>
  
Note the LZExpress Huffman variant used differs from one used in the MEM0 format. This variant can refer to uncompressed data stored in the previous compressed block. The compressed blocks are essentially a single compressed stream.
+
<pre>
 +
SELECT datetime(LSQuarantineTimeStamp + 978307200, "unixepoch") as LSQuarantineTimeStamp, LSQuarantineAgentName, LSQuarantineOriginURLString, LSQuarantineDataURLString from LSQuarantineEvent;
 +
</pre>
  
=== Uncompressed SuperFetch DB format ===
+
Lion and later
<b>TODO</b>
+
<pre>
 
+
/Users/$USER/Library/Preferences/com.apple.LaunchServices.QuarantineEventsV2
==== File header ====
+
</pre>
<b>TODO</b>
+
  
{| class="wikitable"
+
== sleepimage ==
|-
+
This file is similar to the hibernation file on Windows.
! Offset
+
! Size
+
! Value
+
! Description
+
|-
+
| 0
+
| 4
+
| 0x0000000e
+
| Unknown (Database type or signature?)
+
|-
+
| 4
+
| 4
+
|
+
| Uncompressed (total) data size
+
|-
+
|}
+
== TRX files ==
+
The <tt>Ag*.db.trx</tt> files are of the TRX file format. E.g.
+
 
<pre>
 
<pre>
AgCx_SC*.db.trx
+
/private/var/vm/sleepimage
 
</pre>
 
</pre>
  
<b>Note that the following format specification is incomplete.</b>
+
Also see: [http://osxdaily.com/2010/10/11/sleepimage-mac/]
  
=== File header ===
+
== Package Files (.PKG) ==
The file header is variable of size and consists of:
+
Package Files (.PKG) are XAR archives [http://en.wikipedia.org/wiki/Xar_(archiver)] that contain a cpio archive and metadata [http://s.sudre.free.fr/Stuff/Ivanhoe/FLAT.html].
{| class="wikitable"
+
|-
+
! Offset
+
! Size
+
! Value
+
! Description
+
|-
+
| 0
+
| 4
+
| 1
+
| Unknown (Version?)
+
|-
+
| 4
+
| 4
+
|
+
| Unknown
+
|-
+
| 8
+
| 4
+
|
+
| File size
+
|-
+
| 12
+
| 4
+
|
+
| Maximum number of records (of the record offsets array)
+
|-
+
| 16
+
| 4
+
|
+
| Number of records
+
|-
+
| 20
+
| ...
+
|
+
| Record offsets array, where the record offset is a 32-bit integer. Unused record offset are set to 0.
+
|-
+
|}
+
  
=== Record ===
+
== Also see ==
<b>TODO describe</b>
+
* [[MacOS Process Monitoring]]
 +
* [[Acquiring a MacOS System with Target Disk Mode]]
 +
* [[Converting Binary Plists]]
 +
* [[FileVault Disk Encryption]]
 +
* [[File Vault]]
  
== See Also ==
+
=== Formats ===
* [[SuperFetch]]
+
* [[Basic Security Module (BSM) file format]]
 +
* [[Property list (plist)]]
  
 
== External Links ==
 
== External Links ==
* [http://technet.microsoft.com/en-us/magazine/2007.03.vistakernel.aspx Inside the Windows Vista Kernel: Part 2], by [[Mark Russinovich]], March 2007
+
* [http://www.apple.com/macosx/ Official website]
* [http://blog.rewolf.pl/blog/?p=214 Windows SuperFetch file format – partial specification], by ReWolf, October 5, 2011
+
* [http://en.wikipedia.org/wiki/OS_X Wikipedia entry on OS X]
 +
* [http://menial.co.uk/blog/2011/06/16/mac-quarantine-event-database/ Quarantine event database]
 +
* [http://www2.tech.purdue.edu/cit/Courses/cit556/readings/MacForensicsCraiger.pdf Mac Forensics: Mac OS X and the HFS+ File System] by P. Craiger
 +
* [http://web.me.com/driley/iWeb/Previous_files/Directory_Services_Overview.pdf Mac OS X Directory Services Integration including Active Directory]
 +
* [http://digitalinvestigation.wordpress.com/2012/04/04/geek-post-nskeyedarchiver-files-what-are-they-and-how-can-i-use-them/ NSKeyedArchiver files – what are they, and how can I use them?]
 +
* [http://krypted.com/mac-os-x/command-line-alf-on-mac-os-x/ Command Line ALF on Mac OS X]
 +
* [http://newosxbook.com/DMG.html Demystifying the DMG File Format]
 +
* [https://code.google.com/p/mac-security-tips/wiki/ALL_THE_TIPS mac-security-tips]
 +
 
 +
=== Apple Examiner ===
 +
* [http://www.appleexaminer.com/ The Apple Examiner]
 +
* [http://www.appleexaminer.com/MacsAndOS/Analysis/USBOSX/USBOSX.html USB Entries on OS X]
 +
* [http://www.appleexaminer.com/Downloads/MacForensics.pdf Macintosh Forensics - A Guide for the Forensically Sound Examination of a Macintosh Computer] by Ryan R. Kubasiak
 +
 
 +
=== iCloud ===
 +
* [http://support.apple.com/kb/HT4865?viewlocale=en_US&locale=en_US iCloud: iCloud security and privacy overview]
  
[[Category:File Formats]]
+
[[Category:Mac OS X]]
 +
[[Category:Operating systems]]

Revision as of 14:07, 12 June 2014

Information icon.png

Please help to improve this article by expanding it.
Further information might be found on the discussion page.

Apple Inc.'s Macintosh OS X (pronounced "OS Ten") is the operating system distributed with Apple computers. It includes heavily used several programs by default, including Apple Mail, a web browser called Safari, and an Apple Address Book, and iCal.

Disk image types

Mac OS X has support for various disk image types build-in, some of which are:

Burn Folder

Mac OS X Burn Folder:

$NAME.fpbf

This folder normally contains alias files (similar to LNK files under Windows). Which should have the following signature.

00000000  62 6f 6f 6b 00 00 00 00  6d 61 72 6b 00 00 00 00  |book....mark....|

These alias files contain additional date and time values.

Also check the following files for references to deleted .fpbf paths:

/Users/$USERNAME/Library/Preferences/com.apple.finder.plist
/Users/$USERNAME/Library/Preferences/com.apple.sidebarlists.plist

Actual burning of optical media is logged in:

/var/log/system.log
/Users/$USERNAME/Library/Logs/DiscRecording.log
/private/var/.logs_exporter/cache/Users/$USERNAME/Library/Logs/DiscRecording.log

HFS/HFS+ date and time values

In HFS+ date and time values are stored in an unsigned 32-bit integer containing the number of seconds since January 1, 1904 at 00:00:00 (midnight) UTC (GMT). This is slightly different from HFS where the date and time value are stored using the local time. The maximum representable date is February 6, 2040 at 06:28:15 UTC (GMT). The date values do not account for leap seconds. They do include a leap day in every year that is evenly divisible by four. This is sufficient given that the range of representable dates does not contain 1900 or 2100, neither of which have leap days. Also see: Technical Note TN1150 - HFS Plus Volume Format

Converting HFS/HFS+ date and time values with Python:

import datetime

print datetime.datetime( 1904, 1, 1 ) + datetime.timedelta( seconds=0xCBDAF25B )

Launch Agents

/System/Library/LaunchAgents/

Launch Daemons

/Library/LaunchDaemons/
/System/Library/LaunchDaemons/

Startup Items

/Library/StartupItems/
/System/Library/StartupItems/

Crash Reporter

/Library/Application Support/CrashReporter

Diagnostic Reports

/Library/Logs/DiagnosticReports

Quarantine event database

See [1]

Snow Leopard and earlier

/Users/$USER/Library/Preferences/com.apple.LaunchServices.QuarantineEvents
SELECT datetime(LSQuarantineTimeStamp + 978307200, "unixepoch") as LSQuarantineTimeStamp, LSQuarantineAgentName, LSQuarantineOriginURLString, LSQuarantineDataURLString from LSQuarantineEvent;

Lion and later

/Users/$USER/Library/Preferences/com.apple.LaunchServices.QuarantineEventsV2

sleepimage

This file is similar to the hibernation file on Windows.

/private/var/vm/sleepimage

Also see: [2]

Package Files (.PKG)

Package Files (.PKG) are XAR archives [3] that contain a cpio archive and metadata [4].

Also see

Formats

External Links

Apple Examiner

iCloud