Word Containers · Byte Level Identification

DOCX Magic Bytes: ZIP Headers, DOC Streams, and Disguised Files

Identify the actual Word container from its bytes, validate its internal records, and distinguish an encrypted package from a legacy DOC before examining the text.

  • Court qualified expert witnesses
  • Former law enforcement forensic examiners
  • Hash verified chain of custody
  • Nationwide support for attorneys and clients

Home › Digital Evidence Authentication › Word Document Authentication › DOCX Magic Bytes and File Signatures

Quick Answer. An ordinary DOCX is a ZIP package, usually beginning with 50 4B 03 04. That identifies ZIP storage, not Word content. Legacy DOC and password encrypted DOCX both begin with D0 CF 11 E0 A1 B1 1A E1. Examiners distinguish them by their internal streams, then check content types, archive boundaries, macros, and extension mismatches.

This signature guide belongs to Word Document Authentication. Start here when a file has an unexpected extension or refuses to open. Continue with DOCX package structure to identify the main document part, or Word forgery detection when the issue concerns fabrication rather than format.

ZIP opening50 4B 03 04 introduces a local file header, not a Word authenticity certificate.
Directory entry50 4B 01 02 identifies a ZIP central directory record.
Archive closing record50 4B 05 06 starts the end of central directory record.
Compound openingD0 CF 11 E0 A1 B1 1A E1 identifies structured compound storage.

Which bytes identify a Word container?

QuestionShort answer
What are the magic bytes of an ordinary DOCX?Usually 50 4B 03 04 at the beginning. Confirm the Word package through content types and relationships because other Office files and ordinary archives share that signature.
Does a DOCX always begin with PK?No. Password encryption can wrap the ZIP package in a compound file. Its visible opening is then the compound signature rather than PK.
Which streams identify a legacy DOC file?A valid WordDocument stream and the selected 0Table or 1Table stream support identification as binary Word. Property streams provide additional context.
What does a DOCX end of central directory record contain?It records archive directory information and a comment length. Its full length, not just its four signature bytes, determines the ordinary ZIP endpoint.
How does an RTF disguised as DOC begin?An RTF begins with the characters {\rtf. Renaming it to DOC changes the label, not its text based format.
Does word/vbaProject.bin belong in a DOCX?It is a VBA project part associated with macro enabled Word packages such as DOCM. Its presence under a DOCX name requires content type and relationship inspection.

Key terms defined

Local file header

The ZIP record preceding an archived entry. Its signature is 50 4B 03 04; fields describe storage and naming information.

Central directory record

A ZIP entry record beginning 50 4B 01 02 that points to the corresponding local file header.

End of central directory

The ZIP closing record beginning 50 4B 05 06, followed by fixed fields and a variable length comment.

WordDocument stream

The primary binary Word stream, whose file information block identifies the table stream needed to interpret the document.

EncryptionInfo stream

Compound storage data describing the encryption method and parameters used for an encrypted Office package.

EncryptedPackage stream

The compound stream holding the encrypted package representation, unavailable as ordinary readable XML until authorized decryption.

How do DOCX ZIP signatures identify the package?

The first bytes classify storage. They do not identify the author, validate the visible wording, or establish a creation date. An ordinary DOCX contains compressed parts within a ZIP archive. The recognizable PK bytes appear in several different record signatures, each with its own purpose.

RecordSignatureWhat to verify
Local entry header50 4B 03 04Name length, flags, compression method, and entry data location.
Central directory entry50 4B 01 02Local header offset, stored entry name, sizes, and CRC value.
Directory closing record50 4B 05 06Directory size, directory offset, entry count, and comment length.

Confirm Word rather than merely ZIP

Inspect [Content_Types].xml and _rels/.rels. Follow the package relationship to the main office document part. In a conventional Word package that target is word/document.xml. Check its WordprocessingML structure and declared content type. A ZIP containing arbitrary files renamed DOCX is not a Word package.

Compare central directory records with local headers. Some fields can legitimately differ when a writer uses data descriptors, so interpret flags before reporting a contradiction. Duplicate entry names deserve special attention: different readers can choose different copies. Record which entry a parser selected instead of silently treating one extraction as the whole file.

Use an archive listing before decompression. Apply resource limits to entry counts, expanded sizes, and nesting. A small compressed file can expand dramatically. The structure guide explains the relationship checks that follow this initial classification.

Does your Word file have an unexpected signature?

Send the native file through an agreed secure collection process. We can identify its container without enabling macros, following external links, or changing its extension on the preserved original.

Request Confidential Consultation Call (833) 292 3733

How can the same compound signature mean DOC or encrypted DOCX?

The eight bytes D0 CF 11 E0 A1 B1 1A E1 identify a compound file. They do not distinguish binary Word from encrypted Open XML. Read the compound directory and validate its streams before choosing a parser.

Observed structureLikely interpretationRequired follow through
WordDocument with 0Table or 1TableLegacy binary DOCRead the file information block and the selected table stream.
SummaryInformation and DocumentSummaryInformationProperty sets commonly associated with legacy OfficePreserve property values and types; directory names include an initial control character.
EncryptionInfo and EncryptedPackagePassword encrypted Office packageIdentify encryption parameters and arrange authorized decryption.
Other compound streams without Word structuresAnother structured storage format or damaged fileDo not classify it as DOC from the opening bytes alone.

Interpret the binary Word table selection

A legacy document can use 0Table or 1Table. The file information block in WordDocument tells the reader which one to use. Finding both names does not establish two document versions. Likewise, SummaryInformation properties are descriptive fields, not independent confirmation that a named person wrote the text.

Preserve encryption as part of the evidence

Encryption changes what can be inspected without credentials. Record the original encrypted file hash, the acquisition context, and how access was authorized. Hash and label any decrypted derivative separately. A password encrypted DOCX with a compound opening is expected behavior, not an extension fraud finding. Its decrypted package still needs ordinary ZIP and Word structure validation.

What do RTF openings, DOCM parts, and extension mismatches show?

The name can disagree with the bytes through export settings, compatibility workflows, mistakes, or deliberate disguise. Report the disagreement precisely. A DOC label on RTF is not equivalent to an executable falsely presented as a Word attachment.

RTF commonly opens with { tf followed by a format version. It is a text based control language rather than a ZIP or compound package. Preserve the original suffix in the evidence record and identify the true format separately. Renaming a working copy can help a controlled test, but it does not convert the data.

Macros require structural checks, not execution

A DOCM is a macro enabled Word package. Its ZIP opening looks like DOCX. Inspect word/vbaProject.bin, the relationship to that part, and the main document content type. A project part alone does not establish that code executed, that it is malicious, or that a user enabled macros.

A DOCX name combined with macro content is an inconsistency requiring explanation. The archive might have been renamed from DOCM, manually edited, or produced by an unusual writer. Examine content types and relationships together. Also distinguish VBA projects from other active features such as linked templates or embedded objects.

Perform static classification in an isolated environment. Do not enable content merely to obtain a thumbnail or test whether the document opens. Preserve application warnings if rendering is necessary. The authenticity checklist places a format mismatch alongside source and chronology evidence rather than treating it as an automatic forgery verdict.

How should data after the ZIP closing record be examined?

First calculate the legitimate record boundary. The end of central directory has a fixed structure followed by a declared comment. Bytes within that comment are archive content, not unexplained trailing data. ZIP64 archives introduce additional records that must also be interpreted correctly.

Do not search for four bytes and stop

The closing signature can occur incidentally inside compressed data or a comment. Validate candidate records using lengths, directory offsets, and entry counts. A file can contain more than one plausible archive view. Document the interpretation used by each parser when their results differ.

After establishing the logical endpoint, measure any remaining bytes and record their exact offset range. Extract a separate copy for classification and hashing. Readable text, another archive, or an executable signature can direct further examination. Do not execute extracted material. Unusual writer behavior, concatenation, corruption, and intentional concealment are competing explanations.

Report whether trailing material changes the visible document, changes parser behavior, or is simply ignored by the tested reader. These are different findings. A normal rendering does not dispose of hidden appended content, and an unexplained suffix does not by itself demonstrate alteration of a disputed sentence.

  • Record the original size and the calculated archive endpoint.
  • Distinguish declared comments from bytes outside the archive.
  • Preserve conflicting directory views and duplicate entry names.
  • State whether an additional object was identified or only unclassified bytes were observed.

A byte signature examination sequence for Word files

This sequence establishes the format and its boundaries before a content parser or document renderer is trusted.

  1. Capture the supplied name and opening bytes. Hash the source, record its extension and size, then read the initial byte sequence from a working copy without launching Word.
  2. Choose ZIP, compound, or RTF parsing. Use validated records rather than the extension. For compound files, list streams; for ZIP, list entries and central directory offsets.
  3. Resolve the Word entry point. Trace content types and package relationships, or inspect the binary Word file information block and selected table stream.
  4. Identify encryption and macro containers. Separate EncryptionInfo and EncryptedPackage from legacy DOC streams. Record VBA project relationships without running code.
  5. Calculate the complete ZIP endpoint. Parse the closing record, its comment, and applicable ZIP64 structures. Compare the resulting position with the physical file length.
  6. Report every format disagreement. Describe the suffix, actual container, package subtype, trailing data, and parser differences. Preserve offsets and extracted object hashes for reproduction.

What matters most

  • An attachment called DOCX opens as a compound file and needs encryption classification.
  • A purported DOC contains RTF control text rather than binary Word structures.
  • A DOCX archive includes a VBA project despite its ordinary document suffix.
  • Two archive parsers extract different copies of the same named Word part.
  • The physical file extends beyond its validated ZIP archive boundary.

Common misconceptions

  • PK means the file is a genuine Word document. PK identifies ZIP records. Word identification requires package relationships, content types, and valid document content.
  • A compound opening proves the attachment is old DOC. Encrypted modern Office packages also use compound storage. Stream names distinguish the cases.
  • The ZIP closing signature must be the final four bytes. The signature begins a record with fields and a possible comment. Calculate its full length.
  • A DOCM must be opened to identify its macros. The VBA project and its relationships can be inspected statically without permitting execution.

When this applies, and when it does not

This applies when

  • Byte level triage of suspicious Word attachments
  • Legacy DOC versus encrypted DOCX classification
  • ZIP boundary and appended object examination
  • Macro package identification before rendering

This does not apply when

  • Determining who typed the document from a header
  • Dating composition solely from a format signature
  • Deciding whether the document statements are true

How Elite Digital Forensics helps

We document container identification with exact signatures, offsets, stream inventories, and package relationships so another examiner can reproduce the classification without opening active content. This analysis is led by subject matter experts in file signature analysis who confirm whether a file is a genuine DOCX, a legacy DOC, or something disguised as either.

About Elite Digital Forensics

Elite Digital Forensics is an independent digital forensics practice serving attorneys, paralegals, in house counsel, insurers, lenders, businesses, and individuals nationwide. Our team includes former law enforcement forensic examiners and court qualified expert witnesses in computer, cell phone, cloud, document, and multimedia forensics. Every engagement begins with a scoped plan, hash verified evidence handling, and a clear explanation of what the examination can answer.

Related Digital Forensics Resources

Practical questions about Word signature anomalies

Can a damaged DOCX still contain valid magic bytes?

Yes. The opening local header can survive even when directory records or XML parts are missing. Identify which structures remain readable and distinguish repair output from the preserved source.

Can a DOCX signature reveal a password?

No. A compound header and encryption streams identify encrypted storage, not the password. Access requires credentials or another specifically authorized recovery process.

Why does a renamed XLSX show the same opening as DOCX?

Both ordinary formats use ZIP storage. Their internal main parts and content types distinguish a workbook from a Word document.

Should unexpected bytes after a DOCX be deleted?

No. Preserve them as supplied. Their location and content may matter to classification, security, or reconstruction of the handling history.

Does a DOCX extension mismatch prove concealment?

No. Export conventions and ordinary renaming can explain mismatches. Intent requires additional evidence about how and why the file was supplied.

Can a Word file contain two apparent ZIP endings?

Yes. Signatures can occur inside data or multiple archive structures can exist. Validate each candidate directory and explain which structure the tested reader actually uses.

Resolve the Word format before interpreting its history

A defensible signature finding names the container, its verified internal structures, and any unexplained bytes. It is the starting point for content authentication, not a substitute for it. Our court qualified experts in document forensics can testify to what the file signature establishes.

Request Confidential Consultation Call (833) 292 3733

Primary sources and references

  1. PKWARE, APPNOTE.TXT, .ZIP File Format Specification. pkware.cachefly.net
  2. Microsoft Open Specifications, [MS CFB] Compound File Binary File Format. learn.microsoft.com
  3. Library of Congress, Sustainability of Digital Formats, Microsoft Office Word 97 to 2003 Binary File Format (.doc). www.loc.gov
  4. Library of Congress, Sustainability of Digital Formats, DOCX Transitional (Office Open XML). www.loc.gov
  5. Ecma International, ECMA 376, Office Open XML File Formats (also published as ISO/IEC 29500). Ecma International, ECMA 376
  6. Gary Kessler, File Signatures Table. www.garykessler.net

This content is for educational and informational purposes only and does not constitute legal advice. Elite Digital Forensics provides independent digital forensic services and expert witness testimony; we do not provide legal representation. Every case is fact specific; outcomes depend on the evidence, jurisdiction, and counsel. Retain qualified legal counsel for advice about your matter.

#DigitalForensics #ComputerForensics #CellPhoneForensics #ExpertWitness #DigitalForensicExperts #EliteDigitalForensics #ForensicInvestigation #CriminalDefenseForensics #WordSignatures #DOCXBytes #CompoundStorage #ZIPRecords #RTFIdentification #MacroContainers

Assistant Icon Elite Digital Forensics Assistant
πŸ‘‹ Live Chat Now!
Free Virtual Consultation 24/7
Chat Now!

By submitting this form, you consent to be contacted by email, text, or phone. Your information is kept secure and confidential. Reply Stop to opt out at anytime.Β 

IMPORTANT: Please remember to check your spam or junk folder