Inside a PPT File: Signature, Structure and MIME Type
Learn how PPT is identified and what its internal components mean.
The Binary Foundation: OLE2 Compound Document
Unlike the XML-based PPTX format, the classic PPT file is a binary compound document built on Microsoft’s OLE2 (Object Linking and Embedding) container specification. Every valid .ppt file opens with an 8-byte magic number: D0 CF 11 E0 A1 B1 1A E1. This signature identifies the file as an OLE2 Compound Document and is the first and most reliable check any parser must perform. If these bytes are absent or altered, no PPT application will recognize the file, regardless of extension or MIME type (Microsoft Open Specification, §2.1).
The OLE2 container functions as a miniature file system embedded within a single binary stream. It organizes data into fixed-size sectors, typically 512 bytes, though the header records the actual sector size as a power-of-two value. The mandatory structures inside this container are:
- Sector Allocation Table (SAT): An array of 32-bit sector indices that chain sectors together to form variable-length streams. A corrupted SAT entry breaks the chain and renders the owning stream unreadable.
- Short Sector Allocation Table (SSAT): Manages allocations for streams under 4,096 bytes, using smaller sub-sectors carved from a dedicated short-sector container stream.
- Directory: A red-black tree of directory entries, each naming a stream or storage object and pointing to its starting sector.
A PPT file must be parseable as an OLE2 container before any presentation-specific logic can execute. If the SAT chain for the root directory is truncated or contains a cycle, the file is structurally invalid. This failure mode is common in partially downloaded files or files truncated by filesystem errors.
Root Directory: Required Streams for PPT Identity
The OLE2 root directory of a valid PPT file must contain at minimum the following named streams. Their presence distinguishes a PPT from other OLE2-based formats such as .doc or .xls.
| Stream Name | Requirement | Content |
|---|---|---|
PowerPoint Document |
Mandatory | Binary stream containing slide records, layouts, and all presentation data. |
Current User |
Optional but typical | UTF-16LE string with the last editor’s username. |
Summary Information |
Optional | Standard document metadata: author, title, subject, creation date. |
Document Summary Information |
Optional | Extended metadata: slide count, paragraph count, manager, category. |
If the PowerPoint Document stream is missing or has a length of zero, the file is an OLE2 container but not a presentation. Applications that encounter this state must treat the file as corrupt. No fallback to a blank presentation is defined by the specification.
The PowerPoint Document Stream: Record Hierarchy
The PowerPoint Document stream is a linear sequence of variable-length records. Every record begins with a 2-byte recType field and a 2-byte recLen field, followed by recLen bytes of payload. The stream does not contain a global header beyond the first record.
Slide Persistence and the Slide List
Each slide is stored in a Slide record with recType 0x03F0. The payload of a slide record embeds shape containers, text runs, and placeholder definitions. Slides are not self-describing in isolation; they depend on a master slide and layout records referenced by identifier elsewhere in the stream.
The SlideList record (type 0x03F1) contains an array of slide identifiers and stream offsets. This table enables random access: a reader can locate slide N by reading the Nth entry in the SlideList and seeking to the stored offset. The slide list enforces a strict linear sequence. If an offset points outside the stream boundary or into the middle of another record, every slide from that point forward becomes inaccessible.
Text and Character Formatting
Text content in PPT is stored as a sequence of TextChars and TextBytes records interleaved with TextSpecInfo records that carry formatting runs. Font name, size, color, bold, italic, and escapement are encoded per-run, not in a separate stylesheet. A single paragraph may contain multiple runs, each delimited by a TextSpecInfo record that applies formatting to a specific character range. Parsers must accumulate text and overlay formatting ranges in memory to reconstruct styled text.
Embedded Images
Images are stored inline within slide records as Picture records (type 0x03F2) containing raw binary data in EMF, WMF, BMP, or JPEG format. There is no separate media directory or relationship file. The image format is identified by a 2-byte blipType field in the record header, not by inspecting the binary signature. Common blipType values include:
0x03E8— EMF0x03E9— WMF0x03EB— JPEG0x03ED— PNG
A mismatch between blipType and the actual image data causes rendering failures that may be silent (blank placeholder) or fatal (application crash), depending on the reader implementation.
MIME Type and Detection Hierarchy
The IANA-registered MIME type for PPT files is application/vnd.ms-powerpoint. Real-world detection, however, follows a layered approach because MIME metadata is frequently missing or incorrect in transit.
Detection Order
- Magic number (first 8 bytes):
D0 CF 11 E0 A1 B1 1A E1. This is the authoritative check. If these bytes are absent, the file is not an OLE2 compound document and cannot be PPT. - OLE2 stream presence: After confirming the OLE2 header, a validator must traverse the directory tree and confirm that a stream named
PowerPoint Documentexists and has non-zero length. Without this stream, the file is an OLE2 container of unknown purpose. - MIME type and extension: Used only as hints when the binary structure is ambiguous. A file with the correct magic number and
PowerPoint Documentstream is PPT regardless of extension or declared MIME.
Browser and Webmail Validation
Web-based preview systems (Gmail, Outlook Web Access, SharePoint) inspect the first 256 bytes of an uploaded file. For PPT, this captures the OLE2 header, the sector size field at offset 30, and the beginning of the SAT. If the sector size is not 512 (0x0200) or 4,096 (0x1000), the validator rejects the file before attempting to parse the directory. This is a hard limit: the OLE2 specification permits only these two sector sizes for compound documents.
The Current User Stream: Forensic Residue
The Current User stream stores the last editor’s username as a null-terminated UTF-16LE string, typically under 64 bytes. This stream is written at save time and is not cleared by the “Remove Personal Information” feature in PowerPoint’s Document Inspector, which targets the Summary Information stream instead.
Extraction Without a PPT Parser
On a Unix-like system, the username can often be recovered with a strings search that accounts for UTF-16LE encoding:
strings -e l file.ppt | grep -E '^[A-Za-z0-9._-]{3,32}$' | head -1
This is a heuristic, not a forensic guarantee. The stream may contain a machine name, a domain-qualified account, or an empty string. A proper extraction requires parsing the OLE2 directory to locate the Current User stream by name, then reading its exact byte range.
Hard Validation Boundaries
Three conditions define a file as a structurally valid PPT. Failure at any boundary produces a specific, unrecoverable state.
| Condition | Validation Check | Failure State |
|---|---|---|
| OLE2 magic number | Bytes 0–7 must equal D0 CF 11 E0 A1 B1 1A E1 |
Not an OLE2 file; cannot be PPT |
PowerPoint Document stream |
Directory must contain a stream entry with this exact name and a non-zero size | OLE2 container with no presentation data |
| At least one slide record | The PowerPoint Document stream must contain at least one record with recType 0x03F0 |
Empty presentation stream; some readers open as zero-slide file, others reject |
A file that passes condition 1 but fails condition 2 is likely a .doc or .xls file with an incorrect .ppt extension. A file that passes conditions 1 and 2 but fails condition 3 is a valid OLE2 presentation container with no slide content, which PowerPoint opens as a single blank slide by convention, though this behavior is not mandated by the specification.
MIME Remapping in Automated Pipelines
Automated document pipelines (Google Drive API, Microsoft Graph, AWS S3 object triggers) often rely on MIME type for routing decisions. Some proxy servers and antivirus scanners remap application/vnd.ms-powerpoint to application/x-ole-storage or application/octet-stream when the file’s internal structure is not fully validated. This causes pipeline failures when a downstream service expects the registered MIME type.
The reliable mitigation is to validate the magic number and PowerPoint Document stream presence at the ingestion point, then set the MIME type explicitly based on that structural check rather than trusting the declared or detected MIME. This avoids both false negatives (PPT files rejected as generic blobs) and false positives (non-PPT OLE2 files processed as presentations).
Technical basis for Inside a PPT File
Format-level claims use the primary PPT reference.