CNIT 152:
Incident
Response
13 Investigating Mac OS X Systems
Updated 12-2-21
Topics
New: APFS
From wikipedia
New: APFS
HFS+ and File System
Analysis
• Hierarchical File System features:
Nine Structures
1. Boot block
s

2. Volume heade
r

3. Allocation
fi
l
e

4. Extents over
fl
ow
fi
l
e

5. Catalog
fi
l
e

6. Attributes
fi
l
e

7. Startup
fi
l
e

8. Alternate volume heade
r

9. Reserved blocks
CNIT 152 13 Investigating Mac OS X Systems
Nine Structures
1. Boot block
s

• First 1024 bytes of volum
e

• Typically empty on modern system
s

2. Volume Header and Alternate Volume Heade
r

•Located 1024 bytes from the beginning of
the volum
e

•Information about the volume, including the
location of other structures
CNIT 152 13 Investigating Mac OS X Systems
iBored


Disk Editor
for


Mac
Mac Timestamps
•All in local tim
e

•HFS+ Volum
e

•Create date, modify date, backup date,
checked dat
e

•Fil
e

•Access, modify, inode change, inode birth
time (
fi
le creation)
Stat Command
• Shows all four timestamps on Mac
Allocation File
• A bit for
every bloc
k

• 1 = in us
e

• 0 = available
Extents Over
fl
ow File
• "Extents" are
contiguous
allocation
blocks
Catalog File
• Details hierarchy of
fi
les and folders in the syste
m

• Each
fi
le and folder has a unique catalog node ID
(CNID)
Attributes File
• Optiona
l

• Used for named fork
s

• Additional metadata assigned to a
fi
l
e

• Like Microsoft's Alternate Data Stream
s

• Stores origin of
fi
les from the Internet, and tags
like "Green" and "Important"
Startup File
• Not used by Mac OS
X

• Usually empty
File System Services
• Spotligh
t

• Managed Storage
Spotlight
Spotlight
• Metadata indexing and searching servic
e

• Indexers examine the content of
fi
les to
fi
nd
keyword
s

• Some index entire content, others only import
metadata
Spotlight
• Can be used to search a live syste
m

• Not much use for a static acquisitio
n

• Indexes are deleted when a
fi
le is delete
d

• No tools are available to parse the data stored
by the Spotlight indexer once it's extracted
from a drive image
Managed Storage
• New in Mac OS X Lion (10.7
)

• Allows apps to continuously save dat
a

• Uses daemon "revisiond
"

• Saves data on volumes under the "hidden"
directory
 

• /.DocumentRevisions-V100
Capturing db Files
• Copy them to another folde
r

• Originals are in use and won't ope
n

• db.sqlite shows
fi
les used with timestamps
• Consider the
fi
le with
fi
le_storage_id 6
Generations
• 394 revisions of that
fi
le save
d

• With timestamps and other info
.

• Still the same on Mojave (Dec. 2018)
13a
Core Operating System Data
File System Layout
• Four domains for data classi
fi
catio
n

• Loca
l

• Syste
m

• Networ
k

• User
Local Domain
• Applications and con
fi
gurations that are shared
among all users of a syste
m

• Administrative privileges required to modify
data in this domai
n

• These directories are in the local domain:
System Domain
• Data installed by Apple, and a few specialized
low-level utilitie
s

• Most useful domain for intrusion investigations
because it contains the system log
s

• Includes all the traditional Unix structures, all of
which require administrative privileges to
modif
y

• /bin, /usr, /dev, /etc, and so on, also /System
Network Domain
• Applications and data stored here is shared
among a network of systems and user
s

• In practice, rarely populated with dat
a

• Located under the /Network directory
User Domain
• Primary source of data for most other
investigation
s

• Contains user home directories and a shared
director
y

• All user-created content and con
fi
gurations will
be found under /User
s

• High-privilege and Unix-savvy users may break
this model
MacPorts Package Manager
• Lets you add BSD packages to your Ma
c

• Very usefu
l

• Requires command-line developer tool
s

• Link Ch 13b
The Local Domain
/Applications
• Nearly every installed application is her
e

• Application Bundle
s

• Contain everything an application needs to
run
:

• Executable code, graphics, con
fi
guration
fi
les, libraries, helper applications and scripts
Application Bundles
• Finder treats the bundle as a single
fi
l
e

• Most common extensions
Inside the Bundle
• Right-click, Show Package Content
s

• Subdirectorie
s

• MacOS, Resources, Library, Frameworks,
PlugIns, SharedSuppor
t

• Developers can put anything in these
directorie
s

• VMware Fusion's Library folder contains
command-line utilities to manage the VMware
hypervisor
Console App
Package Contents
• Contains additional metadat
a

• Time and date stamps show when the app was
installe
d

• A good place to hide data
/Developer
• Used by XCode, Apple's development
environmen
t

• Until recently, all development tools, SDKs,
documentation, and debugging tools were her
e

• Later versions of XCode moved the tool
s

• This directory may still be present on some
systems
/Library
• /System/Librar
y

• App settings for the operating syste
m

• /Librar
y

• Settings shared between user
s

• /Users/username/Librar
y

• User-speci
fi
c settings
Application Support
• /Library/Application Suppor
t

• /User/username/Library/Application Suppor
t

• Settings, caches, license information, and
anything else desired by the developer
Caches
• /Library/Cache
s

• /User/username/Library/Cache
s

• Temporary data for applications
Frameworks
• /Library/Framework
s

• /System/Library/Framework
s

• Drivers or helper applications, for
application
s

• Usually nothing signi
fi
cant here
Keychains
• /Library/Keychain
s

• /System/Library/Keychain
s

• /User/username/Library/Keychain
s

• Passwords and certi
fi
cate
s

• Requires user's password to open
Logs
• /Library/Log
s

• /User/username/Library/Logs
 

• Application log
s

• Very important to review
Preferences
• /Library/Preference
s

• /User/username/Library/Preferences
 

• Application preferences, if the application
allows a system API to manage the
m

• Stored in .plist
fi
le
s

• Comparable to the Software hive in Windows
Receipts
• /Library/Receipt
s

• /User/username/Library/Receipts
 

• Files here are updated when an application is
added to the syste
m

• InstallHistory.plist contains information about
every application installed via the OS's
installer or update framework
Same on Mojave
Same on Mojave
WebServer
• /Library/WebServe
r

• Apache, installed on every copy of Mac OS X,
is started when a user turns on Web sharin
g

• Removed from Preferences in 10.8, but
Apache is still installe
d

• This folder is Apache's Document Root
File Types
• Used by nearly every applicatio
n

• Property lists (.plist
)

• Tools: plutil on Mac, "plist Explorer" on
Window
s

• SQLite database
s

• Tools: Firefox Plugin SQLite Manager,
sqlitebrowser
13b
The System Domain
Traditional Unix Paths
• Some investigations are based entirely on data
found here, such as log
fi
le
s

• /System directory is structured similarly to the 

/Library director
y

• Locations where applications maintain
persistenc
e

• Requires administrator privileges to create or
modify
fi
les
Artifacts
• System logs in /var/lo
g

• Databases in /var/d
b

• Records of printed data in the CUPS lo
g

• System sleep imag
e

• Software imported using MacPorts or Fink, or
compiled in place, may be in /opt
The User Domain
User-Created Content
Speci
fi
c Sources of
Evidence
User and Service
Con
fi
guration
• Apple uses LDAP for enterprise management
and Directory Services for local user
managemen
t

• Directory Services doesn't use the traditional
Unix
fi
les /etc/passwd and /etc/group
s

• Data in SQLite databases and binary-formatted
property lists
The Evidence
• Directory Service data is in 

/private/var/db/dsloca
l

• Databases (or nodes) for the local system are in
the subdirectory nodes/Defaul
t

• My password hash is on the next slid
e

• More info at links Ch 13c and 13d
Password Hash
Decoding the Password
Hash
Mojave
• Now password hashes are inaccessibl
e

• Even to roo
t

• Hashes can still be captured from Recovery
Mode under some circumstance
s

• Link Ch 13g
Other Con
fi
guration Options
sqlindex
• In /private/var/db/dsloca
l

• Maintains creation and modi
fi
cation time for the
plist
fi
les in the directory structur
e

• And information on the relationships between
the dat
a

• Automatically backed up to /private/var/db/
dslocal-backup.xar (a gzip tar
fi
le)
Analysis of sqlindex
• Shows when a share was create
d

• Whether an account existed, and its privilege
level
User Accounts
Sharepoints
• Status of the share for
 

• AFP (Apple Filing Protocol
)

• SMB (Server Message Block
)

• FTP (File Transfer Protocol
)

• Sharepoint names and share pat
h

• When the share was created
Trash and Deleted Files
• Files deleted from USB sticks go into a Trash
folder on the stick, labeled by user ID, lik
e

• /Volumes/USBDRIVE/.Trashes/501
System Auditing,
Databases, and Logging
• Open Source Basic Security Module (OpenBSM
)

• Powerful auditing syste
m

• Logs
:

• File acces
s

• Network connection
s

• Execution of applications and their
command-line options
OpenBSM
• Default con
fi
guration doesn't save detailed
information and is of limited use for I
R

• Con
fi
guration
fi
les in /etc/securit
y

• Primary
fi
le is audit_control
OpenBSM
• This con
fi
guration will log everything for all
users, an
d

• Login/logout, administrative events,
processes, and network activity
Helper Services
• Run in backgroun
d

• Track events or common dat
a

• Maintain state with SQLite databases or
property lis
t

• Examples:
Airportd
• Runs in an application sandbo
x

• Con
fi
gured in /usr/share/sandbox
Airportd Plist
Networks
System and Application
Logging
• Many log and forensic artifacts in these folder
s

• Most are in plaintext, some are binary
CNIT 152 13 Investigating Mac OS X Systems
Read with Syslog
Other ASL Log Files
• Filenames starting with B
B

• Authentication logs from long ag
o

• Year is 1 year after the correct date
Other ASL Log Files
• Filenames starting with AU
X

• Backtrace for crashed or abnormally
terminated application
s

• Plaintext
/private/var/audit
• Read with praudit
Example Log Entries
• Erase
fl
ash driv
e

• Failed login attempt
Interesting Items in Log
• iCloud connection, Time Machine, iTune
s

• Indicates that there are backups of data on
other devices
Scheduled Tasks and
Services
• Apple moved from cron to launch
d

• Commands to execute at startup
Properties for LaunchAgents
Application Installers
• When an application is installed, two
fi
les are
placed in /private/var/db/receipt
s

• Bill of Materials (BOM) and plist
Application Installers
• BOM contains a complete inventory of
fi
le
s

• Plist contains install date, package identi
fi
er,
and path access control lists
Application Installers
Review
CNIT 152 13 Investigating Mac OS X Systems
CNIT 152 13 Investigating Mac OS X Systems
CNIT 152 13 Investigating Mac OS X Systems
CNIT 152 13 Investigating Mac OS X Systems
CNIT 152 13 Investigating Mac OS X Systems
CNIT 152 13 Investigating Mac OS X Systems
13c

More Related Content

PDF
CNIT 121: 4 Getting the Investigation Started on the Right Foot & 5 Initial D...
PDF
CNIT 121: 2 IR Management Handbook
PDF
CNIT 152: 12b Windows Registry
PDF
CNIT 126 Ch 0: Malware Analysis Primer & 1: Basic Static Techniques
PPTX
Practical Malware Analysis: Ch 2 Malware Analysis in Virtual Machines & 3: Ba...
PDF
Practical Malware Analysis: Ch 11: Malware Behavior
PDF
CNIT 126 11. Malware Behavior
PDF
Practical Malware Analysis: Ch 10: Kernel Debugging with WinDbg
CNIT 121: 4 Getting the Investigation Started on the Right Foot & 5 Initial D...
CNIT 121: 2 IR Management Handbook
CNIT 152: 12b Windows Registry
CNIT 126 Ch 0: Malware Analysis Primer & 1: Basic Static Techniques
Practical Malware Analysis: Ch 2 Malware Analysis in Virtual Machines & 3: Ba...
Practical Malware Analysis: Ch 11: Malware Behavior
CNIT 126 11. Malware Behavior
Practical Malware Analysis: Ch 10: Kernel Debugging with WinDbg

What's hot (20)

PDF
CNIT 121: Computer Forensics Ch 1
PDF
CNIT 152 12 Investigating Windows Systems (Part 1 of 3)
PPTX
Practical Malware Analysis: Ch 4 A Crash Course in x86 Disassembly
PDF
6 Scope & 7 Live Data Collection
DOCX
Đề cương ôn tập mạng máy tính
PDF
CNIT 152: 1 Real-World Incidents
PDF
Materi Pelatihan analisa malware
PDF
CNIT 152: 3 Pre-Incident Preparation
PDF
CNIT 121: 8 Forensic Duplication
PDF
CNIT 152: 4 Starting the Investigation & 5 Leads
PDF
Slide hệ điều hành học viện công nghệ Bưu Chính viễn thông.pdf
PDF
CNIT 152: 6. Scope & 7. Live Data Collection
PPTX
CISSP - Security Assessment
PDF
Embedded Systems Security
PDF
Ch 5: Introduction to heap overflows
PPTX
PPTX
Windows Forensic 101
PPTX
VoIP (Voice Over IP) güvenliği nasıl sağlanmaktadır?
PPTX
Forging Trusts for Deception in Active Directory
CNIT 121: Computer Forensics Ch 1
CNIT 152 12 Investigating Windows Systems (Part 1 of 3)
Practical Malware Analysis: Ch 4 A Crash Course in x86 Disassembly
6 Scope & 7 Live Data Collection
Đề cương ôn tập mạng máy tính
CNIT 152: 1 Real-World Incidents
Materi Pelatihan analisa malware
CNIT 152: 3 Pre-Incident Preparation
CNIT 121: 8 Forensic Duplication
CNIT 152: 4 Starting the Investigation & 5 Leads
Slide hệ điều hành học viện công nghệ Bưu Chính viễn thông.pdf
CNIT 152: 6. Scope & 7. Live Data Collection
CISSP - Security Assessment
Embedded Systems Security
Ch 5: Introduction to heap overflows
Windows Forensic 101
VoIP (Voice Over IP) güvenliği nasıl sağlanmaktadır?
Forging Trusts for Deception in Active Directory
Ad

Similar to CNIT 152 13 Investigating Mac OS X Systems (20)

PDF
CNIT 152: 13 Investigating Mac OS X Systems
PDF
CNIT 121: 13 Investigating Mac OS X Systems
PDF
CNIT 121: 12 Investigating Windows Systems (Part 1 of 3)
PDF
12 Investigating Windows Systems (Part 1 of 3
PPT
operating system File - System Interface
PDF
CNIT 121: 14 Investigating Applications
PPT
Windowsforensics
PPTX
System Event Logs
PDF
PDF
File system discovery
PPTX
Examining Mac File Structures
PDF
AHUG Presentation: Fun with Hadoop File Systems
PDF
Hdfs architecture
PDF
Hands on kubernetes_container_orchestration
PDF
Systems Programming - File IO
PPTX
UNIT III.pptx
PDF
Linux: Everyting-as-a-service
PPTX
File Management & Access Control
PPTX
2nd unit part 1
PDF
SQL Server 2012 - FileTables
CNIT 152: 13 Investigating Mac OS X Systems
CNIT 121: 13 Investigating Mac OS X Systems
CNIT 121: 12 Investigating Windows Systems (Part 1 of 3)
12 Investigating Windows Systems (Part 1 of 3
operating system File - System Interface
CNIT 121: 14 Investigating Applications
Windowsforensics
System Event Logs
File system discovery
Examining Mac File Structures
AHUG Presentation: Fun with Hadoop File Systems
Hdfs architecture
Hands on kubernetes_container_orchestration
Systems Programming - File IO
UNIT III.pptx
Linux: Everyting-as-a-service
File Management & Access Control
2nd unit part 1
SQL Server 2012 - FileTables
Ad

More from Sam Bowne (20)

PDF
Introduction to the Class & CISSP Certification
PDF
Cyberwar
PDF
3: DNS vulnerabilities
PDF
8. Software Development Security
PDF
4 Mapping the Application
PDF
3. Attacking iOS Applications (Part 2)
PDF
12 Elliptic Curves
PDF
11. Diffie-Hellman
PDF
2a Analyzing iOS Apps Part 1
PDF
9 Writing Secure Android Applications
PDF
12 Investigating Windows Systems (Part 2 of 3)
PDF
10 RSA
PDF
9. Hard Problems
PDF
8 Android Implementation Issues (Part 1)
PDF
11 Analysis Methodology
PDF
8. Authenticated Encryption
PDF
7. Attacking Android Applications (Part 2)
PDF
7. Attacking Android Applications (Part 1)
PDF
5. Stream Ciphers
PDF
4. Block Ciphers
Introduction to the Class & CISSP Certification
Cyberwar
3: DNS vulnerabilities
8. Software Development Security
4 Mapping the Application
3. Attacking iOS Applications (Part 2)
12 Elliptic Curves
11. Diffie-Hellman
2a Analyzing iOS Apps Part 1
9 Writing Secure Android Applications
12 Investigating Windows Systems (Part 2 of 3)
10 RSA
9. Hard Problems
8 Android Implementation Issues (Part 1)
11 Analysis Methodology
8. Authenticated Encryption
7. Attacking Android Applications (Part 2)
7. Attacking Android Applications (Part 1)
5. Stream Ciphers
4. Block Ciphers

Recently uploaded (20)

PPTX
Macbeth play - analysis .pptx english lit
PDF
THE CHILD AND ADOLESCENT LEARNERS & LEARNING PRINCIPLES
PPTX
Climate Change and Its Global Impact.pptx
PPTX
Integrated Management of Neonatal and Childhood Illnesses (IMNCI) – Unit IV |...
PDF
Horaris_Grups_25-26_Definitiu_15_07_25.pdf
PPTX
UNIT_2-__LIPIDS[1].pptx.................
DOCX
Ibrahim Suliman Mukhtar CV5AUG2025.docx
PPTX
Thinking Routines and Learning Engagements.pptx
PDF
PUBH1000 - Module 6: Global Health Tute Slides
PDF
Skin Care and Cosmetic Ingredients Dictionary ( PDFDrive ).pdf
PDF
LIFE & LIVING TRILOGY - PART (3) REALITY & MYSTERY.pdf
PDF
Lecture on Viruses: Structure, Classification, Replication, Effects on Cells,...
PPTX
BSCE 2 NIGHT (CHAPTER 2) just cases.pptx
PDF
Compact First Student's Book Cambridge Official
PDF
MICROENCAPSULATION_NDDS_BPHARMACY__SEM VII_PCI Syllabus.pdf
PDF
Nurlina - Urban Planner Portfolio (english ver)
PDF
1.Salivary gland disease.pdf 3.Bleeding and Clotting Disorders.pdf important
PDF
Disorder of Endocrine system (1).pdfyyhyyyy
PDF
Myanmar Dental Journal, The Journal of the Myanmar Dental Association (2015).pdf
PDF
Fun with Grammar (Communicative Activities for the Azar Grammar Series)
Macbeth play - analysis .pptx english lit
THE CHILD AND ADOLESCENT LEARNERS & LEARNING PRINCIPLES
Climate Change and Its Global Impact.pptx
Integrated Management of Neonatal and Childhood Illnesses (IMNCI) – Unit IV |...
Horaris_Grups_25-26_Definitiu_15_07_25.pdf
UNIT_2-__LIPIDS[1].pptx.................
Ibrahim Suliman Mukhtar CV5AUG2025.docx
Thinking Routines and Learning Engagements.pptx
PUBH1000 - Module 6: Global Health Tute Slides
Skin Care and Cosmetic Ingredients Dictionary ( PDFDrive ).pdf
LIFE & LIVING TRILOGY - PART (3) REALITY & MYSTERY.pdf
Lecture on Viruses: Structure, Classification, Replication, Effects on Cells,...
BSCE 2 NIGHT (CHAPTER 2) just cases.pptx
Compact First Student's Book Cambridge Official
MICROENCAPSULATION_NDDS_BPHARMACY__SEM VII_PCI Syllabus.pdf
Nurlina - Urban Planner Portfolio (english ver)
1.Salivary gland disease.pdf 3.Bleeding and Clotting Disorders.pdf important
Disorder of Endocrine system (1).pdfyyhyyyy
Myanmar Dental Journal, The Journal of the Myanmar Dental Association (2015).pdf
Fun with Grammar (Communicative Activities for the Azar Grammar Series)

CNIT 152 13 Investigating Mac OS X Systems