Messages Database (chat.db)
macOSCommunicationDisk Image
Location
~/Library/Messages/chat.db and ~/Library/Messages/Attachments/Common Names
chat.dbMessages
Description
SQLite database used by the Messages app to store iMessage and SMS conversation metadata, message bodies, participant handles, read state, attachment references, and chat membership relationships for the user profile.
Forensic Value
chat.db is a primary communication artifact on macOS because it preserves conversation content, timestamps, delivery state, and the attachment paths needed to recover exchanged files. It is especially useful in insider threat, extortion, or phishing investigations where coordination or lure content may have happened through iMessage rather than corporate messaging systems. Attachment and handle tables also let investigators connect Messages activity to local files and Apple IDs present elsewhere on the host.
Tools Required
sqlite3DB Browser for SQLitemac_aptfind
Collection Commands
sqlite3
sqlite3 ~/Library/Messages/chat.db ".tables" > /forensics/messages_tables.txt
cp
cp ~/Library/Messages/chat.db* /forensics/messages_db/ 2>/dev/null && cp -R ~/Library/Messages/Attachments /forensics/messages_attachments/ 2>/dev/null
find
find ~/Library/Messages -maxdepth 2 -type f -print > /forensics/messages_file_inventory.txt
Collection Constraints
- •Paths, schemas, and permission boundaries vary by macOS release, Full Disk Access state, and whether data came from a live collection, mounted image, or backup source.
- •Message retention, attachment caching, and iCloud sync behavior vary by user settings and macOS release. Deleted rows may require WAL or unallocated-page recovery.
MITRE ATT&CK Techniques
T1636T1417T1539