iOS Forensics
iOS Forensics
iOS devices employ strong security measures requiring specialized approaches:
iOS Acquisition Tools and Methods:
# Using libimobiledevice for logical acquisition
idevicebackup2 backup --full /path/to/backup/
# Extract specific data types
idevicecrashreport -e /path/to/crashes/
idevicesyslog > device_logs.txt
Checkra1n Acquisition (for compatible devices):
- Exploits bootrom vulnerability
- Provides file system access
- Works on iPhone 5s through iPhone X
- Requires physical access
iOS Data Analysis:
import sqlite3
import plistlib
def analyze_ios_sms(backup_path):
# Open SMS database
sms_db = f"{backup_path}/3d0d7e5fb2ce288813306e4d4636395e047a3d28"
conn = sqlite3.connect(sms_db)
cursor = conn.cursor()
# Query messages
cursor.execute("""
SELECT
message.date,
message.text,
handle.id as contact
FROM message
LEFT JOIN handle ON message.handle_id = handle.rowid
ORDER BY message.date DESC
""")
messages = cursor.fetchall()
return messages
def parse_ios_plist(plist_path):
with open(plist_path, 'rb') as f:
plist_data = plistlib.load(f)
return plist_data
Key iOS Artifacts:
- SMS/iMessage: sms.db
- Call History: CallHistory.storedata
- Contacts: AddressBook.sqlitedb
- Safari History: History.db
- Location Services: consolidated.db
- Photos: Photos.sqlite
- Application Data: Per-app containers