Difference between pages "PDF" and "Mac OS X"

From ForensicsWiki
(Difference between pages)
Jump to: navigation, search
 
m (EFI boot)
 
Line 1: Line 1:
The '''Portable Document Format''' ('''PDF''') is a document format from [[Adobe]] Inc. It is widely available on the web. Originally developed as a propriety format, version 1.7 was released as an open standard in 2008. The standard is published as ISO/IEC 32000-1:2008. Although an open standard, Adobe still owns patents and copyrights related to the PDF standard. Adobe has granted a worldwide royalty-free license to produce PDF software, but only if the software complies with the PDF standard.
+
{{Expand}}
  
== Format ==
+
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]].
  
It is a common misconception that PDF files are simply a collection of images, one per page.  Certainly a PDF can be formed that way (which is typical of document scanners), but in reality the document structure is much more complex.  A PDF file can contain text streams (which cam be encoded and/or compressed in dozens of ways), vector and raster images, fonts, and various interactive elements.
+
== EFI boot ==
A PDF file comprises sections called "objects." Each object is numbered and can represent a page, a font, a data stream, etc. Each file begins with the string <tt>%PDF</tt>. Each file ends with the letters <tt>%%EOF</tt>, but there can be multiple <tt>EOF</tt>'s in a single file (this often confuses programs like [[foremost]] that search for footers).
+
* Configuration in nvram
  
Adobe's Acrobat software supports "incremental updates."  The standard allows this so that modifications can simply be appended to the file, leaving the original data intact.  Any new or altered object is simply appended to the end of the original file.  Deleted objects are left intact and simply marked deleted. This can potentially cause inadvertent disclosure of sensitive information.
+
The firmware looks for the boot partition in nvram.
  
== Metadata ==
+
Mac OS X EFI boot process supports both MZ-PE/COFF and EFI fat binary type [[Executable executables]].
 +
<pre>
 +
/com.apple.recovery.boot/boot.efi
 +
/System/Library/CoreServices/boot.efi
 +
/usr/standalone/i386/boot.efi
 +
</pre>
  
PDF metadata can be stored in a document information dictionary or as a metadata stream, sometimes both. A metadata stream can describe the entire document or an individual component of a document. Thus, multiple metadata streams may exist in a single document, making it difficult to find all of it. Metadata streams are stored in Adobe's XML based XMP (Extensible Metadata Platform) format. Even if a PDF document is encrypted, the accompanying metadata is not required to be, and often is not, encrypted.
+
== Disk image types ==
  
The metadata (or parts of it) can be extracted with [[pdfinfo]], a utility which is part of the [[xpdf]] package.
+
Mac OS X has support for various disk image types build-in, some of which are:
 +
* 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)]]
  
== Embedded Objects==
+
== Burn Folder ==
  
The PDF standard supports embedding many types of files such as images. Embedded files may contain their own metadata. You can use [[pdfimages]], part of the [[xpdf]], to extract all of the images out of a PDF file and put each in its own file.
+
Mac OS X Burn Folder:
 +
<pre>
 +
$NAME.fpbf
 +
</pre>
  
== Subformats ==
+
This folder normally contains [[Mac OS X Alias Files|alias files]] (similar to LNK files under Windows). Which should have the following signature.
 +
<pre>
 +
00000000  62 6f 6f 6b 00 00 00 00  6d 61 72 6b 00 00 00 00  |book....mark....|
 +
</pre>
  
Several related standards exist that contain subsets or supersets of the PDF standard features. These standards include
+
These [[Mac OS X Alias Files|alias files]] contain additional date and time values.
  
* PDF/A a simpler set of features for archiving documents, allowing for long-term reproducibility. Some scanning software saves documents in PDF/A by default.
+
Also check the following files for references to deleted .fpbf paths:
* PDF/X for graphic arts.
+
<pre>
* PDF/UA for universal accessibility.
+
/Users/$USERNAME/Library/Preferences/com.apple.finder.plist
* PDF/E for engineering drawings.
+
/Users/$USERNAME/Library/Preferences/com.apple.sidebarlists.plist
 +
</pre>
  
==PDF Software==
+
Actual burning of optical media is logged in:
 +
<pre>
 +
/var/log/system.log
 +
/Users/$USERNAME/Library/Logs/DiscRecording.log
 +
/private/var/.logs_exporter/cache/Users/$USERNAME/Library/Logs/DiscRecording.log
 +
</pre>
  
Due to the popularity of the PDF format, there is much software available for viewing and creating PDF documents. However, Adobe maintains a de facto monopoly on software capable of editing PDF documents.  There are quite a few tools that merge or split pdf documents, but few that can make meaningful edits.  Software such as OpenOffice.org and Inkscape can import PDF files into their native formats, where the documents can be edited and then exported back to PDF. Unfortunately, this option can be quite cumbersome.
+
== HFS/HFS+ date and time values ==
  
=== PDF Tools ===
+
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]
These tools are useful for analyzing PDF files:
+
; Origami
+
: http://security-labs.org/origami/
+
: A powerful open source framework and GUI written in Ruby. It allows for parsing and exploring pdf files and graphically browsing its contents.
+
  
; PDF Tools
+
Converting HFS/HFS+ date and time values with Python:
: http://blog.didierstevens.com/programs/pdf-tools/
+
<pre>
: Didier Stevens' pdf-parse and pdfid, written in Python
+
import datetime
  
; pdfresurrect
+
print datetime.datetime( 1904, 1, 1 ) + datetime.timedelta( seconds=0xCBDAF25B )
: http://www.757labs.com/projects/pdfresurrect/#downloads
+
</pre>
: Retrieves previous versions of PDF files that have changes appended with "incremental updates"
+
  
; PDFMiner
+
== Launch Agents ==
: http://www.unixuser.org/~euske/python/pdfminer/index.html
+
System-wide:
: "Python PDF parser and analyzer"
+
<pre>
: Includes '''pdf2txt.py''' command-line tool for extracting text from PDF files, and '''dumppdf.py''' for dumping PDF objects.
+
/Library/LaunchAgents
 +
/System/Library/LaunchAgents
 +
</pre>
  
; pyPdf
+
Per user:
: http://pybrary.net/pyPdf/
+
<pre>
: "A Pure-Python library built as a PDF toolkit."
+
/Users/$USERNAME/Library/LaunchAgents
: Will encrypt and decrypt PDF files.
+
</pre>
  
; QPDF
+
These directories contain  [[Property list (plist)]] files.
: http://sourceforge.net/projects/qpdf/
+
: Open source, cross-platform library and set of programs to inspect and manipulate PDF files. Packaged in recent Debian based distributions.
+
  
These tools are useful for manipulating and generating PDF files:
+
== Launch Daemons ==
; ReportLab Open Source PDF Library
+
System-wide:
: http://www.reportlab.com/software/opensource/
+
<pre>
: "our proven, industry-strength PDF generating software. Programmatically create any kind of PDF document"
+
/Library/LaunchDaemons
 +
/System/Library/LaunchDaemons
 +
</pre>
  
= See Also =
+
These directories contain [[Property list (plist)]] files.
  
* [[Arabic PDFs]]
+
== Startup Items ==
* [[Tools:Document Metadata Extraction]]
+
<pre>
 +
/Library/StartupItems/
 +
/System/Library/StartupItems/
 +
</pre>
  
== External Links ==  
+
== Crash Reporter ==
 +
<pre>
 +
/Library/Application Support/CrashReporter
 +
</pre>
  
* [http://partners.adobe.com/public/developer/pdf/index_reference.html Adobe PDF Reference]
+
Contains text files named .crash, .diag, .spin
* [http://en.wikipedia.org/wiki/PDF Wikipedia: PDF]
+
* [http://www.mactech.com/articles/mactech/Vol.15/15.09/PDFIntro/ Portable Document Format: An Introduction for Programmers], MacTech Magazine, Volume 15, (1999), Issue 9
+
* [http://www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=51502 ISO Standard]
+
* [http://partners.adobe.com/public/developer/support/topic_legal_notices.html Patent Licenses]
+
  
== Tools ==
+
== Diagnostic Reports ==
* [http://blog.didierstevens.com/2008/10/30/pdf-parserpy/ pdf-parser.py], by Didier Stevens
+
<pre>
 +
/Library/Logs/DiagnosticReports
 +
</pre>
  
[[Category:File Formats]]
+
== Internet Plug-Ins ==
 +
System-wide:
 +
<pre>
 +
/Library/Internet Plug-Ins
 +
</pre>
 +
 
 +
Per user:
 +
<pre>
 +
/Users/$USERNAME/Library/Internet Plug-Ins
 +
</pre>
 +
 
 +
== Quarantine event database ==
 +
See [http://menial.co.uk/blog/2011/06/16/mac-quarantine-event-database/]
 +
 
 +
Snow Leopard and earlier
 +
<pre>
 +
/Users/$USER/Library/Preferences/com.apple.LaunchServices.QuarantineEvents
 +
</pre>
 +
 
 +
<pre>
 +
SELECT datetime(LSQuarantineTimeStamp + 978307200, "unixepoch") as LSQuarantineTimeStamp, LSQuarantineAgentName, LSQuarantineOriginURLString, LSQuarantineDataURLString from LSQuarantineEvent;
 +
</pre>
 +
 
 +
Lion and later
 +
<pre>
 +
/Users/$USER/Library/Preferences/com.apple.LaunchServices.QuarantineEventsV2
 +
</pre>
 +
 
 +
== sleepimage ==
 +
This file is similar to the hibernation file on Windows.
 +
<pre>
 +
/private/var/vm/sleepimage
 +
</pre>
 +
 
 +
Also see: [http://osxdaily.com/2010/10/11/sleepimage-mac/]
 +
 
 +
== Last shutdown logs ==
 +
<pre>
 +
/private/var/log/com.apple.launchd/launchd-shutdown.system.log
 +
/private/var/log/com.apple.launchd/launchd-shutdown.system.log.1
 +
</pre>
 +
 
 +
== Package Files (.PKG) ==
 +
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].
 +
 
 +
== Also see ==
 +
* [[MacOS Process Monitoring]]
 +
* [[Acquiring a MacOS System with Target Disk Mode]]
 +
* [[Converting Binary Plists]]
 +
* [[FileVault Disk Encryption]]
 +
* [[File Vault]]
 +
 
 +
=== Formats ===
 +
* [[Basic Security Module (BSM) file format]]
 +
* [[Property list (plist)]]
 +
 
 +
== External Links ==
 +
* [http://www.apple.com/macosx/ Official website]
 +
* [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
 +
 
 +
=== EFI ===
 +
* [http://ho.ax/posts/2012/02/carving-up-efi-fat-binaries/ Carving up EFI fat binaries], by snare, February 24, 2012
 +
 
 +
=== iCloud ===
 +
* [http://support.apple.com/kb/HT4865?viewlocale=en_US&locale=en_US iCloud: iCloud security and privacy overview]
 +
 
 +
[[Category:Mac OS X]]
 +
[[Category:Operating systems]]

Revision as of 05:03, 25 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.

EFI boot

  • Configuration in nvram

The firmware looks for the boot partition in nvram.

Mac OS X EFI boot process supports both MZ-PE/COFF and EFI fat binary type Executable executables.

/com.apple.recovery.boot/boot.efi
/System/Library/CoreServices/boot.efi
/usr/standalone/i386/boot.efi

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-wide:

/Library/LaunchAgents
/System/Library/LaunchAgents

Per user:

/Users/$USERNAME/Library/LaunchAgents

These directories contain Property list (plist) files.

Launch Daemons

System-wide:

/Library/LaunchDaemons
/System/Library/LaunchDaemons

These directories contain Property list (plist) files.

Startup Items

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

Crash Reporter

/Library/Application Support/CrashReporter

Contains text files named .crash, .diag, .spin

Diagnostic Reports

/Library/Logs/DiagnosticReports

Internet Plug-Ins

System-wide:

/Library/Internet Plug-Ins

Per user:

/Users/$USERNAME/Library/Internet Plug-Ins

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]

Last shutdown logs

/private/var/log/com.apple.launchd/launchd-shutdown.system.log
/private/var/log/com.apple.launchd/launchd-shutdown.system.log.1

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

EFI

iCloud