libpst (readpst)
Lit et convertit les archives Outlook PST/OST, en extrayant e-mails, contacts et éléments de calendrier pour l'analyse forensique. Reads and converts Outlook PST/OST archive files, extracting emails, contacts, and calendar items for forensic analysis.
↗ https://www.five-ten-sat.com/libpst/Overview
libpst provides tools — most commonly readpst — for parsing Microsoft Outlook’s PST and OST archive formats without needing Outlook itself. It’s used during forensics/DFIR and post-compromise investigations to pull mailbox contents (emails, attachments, contacts, calendar entries) off a seized or exfiltrated .pst/.ost file into standard formats like mbox or EML for review, indexing, or ingestion into other tooling.
Common Usage
Convert a PST to mbox format (default)
readpst mailbox.pst
Output individual EML files instead of one mbox
readpst -e mailbox.pst
Recreate the original folder structure on disk
readpst -r mailbox.pst
Also extract attachments to a separate directory
readpst -e -o ./output mailbox.pst
Convert an OST (Outlook offline cache) file
readpst mailbox.ost
List the mailbox’s contents/structure without full extraction
readpst -d debug.log -S mailbox.pst
Typical Workflow
- Extract per-message EML files with folder structure preserved
readpst -e -r -o ./extracted mailbox.pst
- Search extracted mail for keywords/IOCs
grep -ril "password reset\|invoice\|wire transfer" ./extracted
# 3. Import into a mail client or forensic tool that reads mbox/EML for review
Notes
- OST files are the local cached copy of an Exchange/Office 365 mailbox — recoverable from a compromised endpoint even without server access.
- Corrupted/partial PSTs from a disk image may need
-b(ignore encryption) or manual carving first if readpst chokes on the header. - Pairs well with
libpfffor related Microsoft container formats.
Help / Man page
readpst [OPTIONS] PST_FILE
-o DIR Output directory (default: current directory)
-e Output each message as a separate EML file
-r Recreate original Outlook folder structure
-M Output in MH format
-j N Number of parallel jobs
-S Output single record per folder for debugging
-w Overwrite existing output files
-b Ignore encryption / don't decrypt
-d FILE Debug log output file
-V Show version
Vue d’ensemble
libpst fournit des outils, le plus souvent readpst, pour analyser les formats d’archive PST et OST de Microsoft Outlook sans avoir besoin d’Outlook lui-même. Il est utilisé en forensics/DFIR et lors d’investigations post-compromission pour extraire le contenu d’une boîte mail (e-mails, pièces jointes, contacts, entrées de calendrier) d’un fichier .pst/.ost saisi ou exfiltré vers des formats standards comme mbox ou EML, pour analyse, indexation ou ingestion dans d’autres outils.
Utilisation courante
# Convertir un PST au format mbox (par défaut)
readpst mailbox.pst
# Générer des fichiers EML individuels au lieu d'un seul mbox
readpst -e mailbox.pst
# Recréer la structure de dossiers d'origine sur le disque
readpst -r mailbox.pst
# Extraire aussi les pièces jointes dans un dossier séparé
readpst -e -o ./output mailbox.pst
# Convertir un fichier OST (cache hors ligne d'Outlook)
readpst mailbox.ost
# Lister le contenu/la structure de la boîte mail sans extraction complète
readpst -d debug.log -S mailbox.pst
Flux de travail typique
# 1. Extraire les fichiers EML par message en conservant la structure des dossiers
readpst -e -r -o ./extracted mailbox.pst
# 2. Rechercher des mots-clés/IOC dans le mail extrait
grep -ril "password reset\|invoice\|wire transfer" ./extracted
# 3. Importer dans un client mail ou un outil forensique qui lit mbox/EML pour analyse
Notes
- Les fichiers OST sont la copie locale mise en cache d’une boîte mail Exchange/Office 365 : récupérable depuis un poste compromis même sans accès au serveur.
- Les PST corrompus/partiels issus d’une image disque peuvent nécessiter
-b(ignorer le chiffrement) ou un carving manuel préalable si readpst bloque sur l’en-tête. - Fonctionne bien avec
libpffpour les formats de conteneurs Microsoft apparentés.
Aide / Page de manuel
readpst [OPTIONS] PST_FILE
-o DIR Output directory (default: current directory)
-e Output each message as a separate EML file
-r Recreate original Outlook folder structure
-M Output in MH format
-j N Number of parallel jobs
-S Output single record per folder for debugging
-w Overwrite existing output files
-b Ignore encryption / don't decrypt
-d FILE Debug log output file
-V Show version