DOCX Metadata#
A .docx file is a ZIP archive. Its metadata is distributed across two XML files
inside that archive:
docProps/core.xml— Dublin Core properties: authorship and timestampsdocProps/app.xml— application properties: editing time, document statistics
Both are plain XML and can be read directly with unzip -p. ExifTool reads both
and presents their fields together.
Fields and forensic significance#
core.xml fields#
XML element |
ExifTool field |
Content |
|---|---|---|
|
|
The person who originally created the document |
|
|
The last person to save the document |
|
|
Incremented by 1 each time the document is saved |
|
|
Timestamp of initial creation (UTC) |
|
|
Timestamp of last modification (UTC) |
|
|
Timestamp of the most recent print operation (absent if never printed) |
app.xml fields#
XML element |
ExifTool field |
Content |
|---|---|---|
|
|
Cumulative minutes the document was open and in focus |
|
|
Page count at last save |
|
|
Word count at last save |
|
|
Character count (excluding spaces) at last save |
|
|
Attached document template filename |
|
|
Application name and version |
ExifTool extraction#
exiftool document.docx
Creator : Anna Berg
Last Modified By : Karl Holm
Revision Number : 7
Create Date : 2026:01:15 09:00:00Z
Modify Date : 2026:03:22 14:30:00Z
Last Print Date : 2019:11:04 14:22:00Z
Application : Microsoft Office Word
Total Edit Time : 42 minutes
Pages : 3
Words : 812
Characters : 4628
Template : Normal.dotm
For a collection:
exiftool -csv -Creator -LastModifiedBy -RevisionNumber \
-CreateDate -ModifyDate -TotalEditTime \
-Pages -Words -Characters -Template *.docx > metadata.csv
Note: ExifTool field tag names (used with -) strip spaces and use camel case.
Last Modified By becomes -LastModifiedBy, Total Edit Time becomes -TotalEditTime.
Direct XML extraction#
# Read core properties
unzip -p document.docx docProps/core.xml | xmllint --format -
# Read application properties
unzip -p document.docx docProps/app.xml | xmllint --format -
In Python, using only the standard library:
import zipfile
import xml.etree.ElementTree as ET
NS = {
'dc': 'http://purl.org/dc/elements/1.1/',
'cp': 'http://schemas.openxmlformats.org/package/2006/metadata/core-properties',
'dcterms': 'http://purl.org/dc/terms/',
'ap': 'http://schemas.openxmlformats.org/officeDocument/2006/extended-properties',
}
def docx_metadata(path):
with zipfile.ZipFile(path) as z:
core = ET.fromstring(z.read('docProps/core.xml'))
app = ET.fromstring(z.read('docProps/app.xml'))
return {
'creator': core.findtext('dc:creator', namespaces=NS),
'last_modified_by':core.findtext('cp:lastModifiedBy', namespaces=NS),
'revision': core.findtext('cp:revision', namespaces=NS),
'created': core.findtext('dcterms:created', namespaces=NS),
'modified': core.findtext('dcterms:modified', namespaces=NS),
'last_printed': core.findtext('cp:lastPrinted', namespaces=NS),
'total_edit_time': app.findtext('ap:TotalTime', namespaces=NS),
'pages': app.findtext('ap:Pages', namespaces=NS),
'words': app.findtext('ap:Words', namespaces=NS),
'characters': app.findtext('ap:Characters', namespaces=NS),
'template': app.findtext('ap:Template', namespaces=NS),
'application': app.findtext('ap:Application', namespaces=NS),
}
Forensic interpretation#
Revision number#
Revision Number is incremented by 1 with every save, beginning at 1. A document
that is polished, multi-page, and finished but has revision number 1 was almost
certainly not produced by normal editing. Possible explanations:
Exported or converted from another format (the exporting tool starts a fresh revision count)
Created programmatically (e.g., by a template filling system)
The original file was discarded and the content was pasted into a new blank document to suppress the revision history
A revision number of 1 is not inherently suspicious. Combined with a long document, a short editing time, and no template, it is a significant anomaly.
Tracked changes#
Word’s Track Changes feature records each insertion, deletion, and formatting change
as a separate annotated event embedded in the document XML. In OOXML (.docx),
tracked changes live in word/document.xml as <w:ins> and <w:del> elements,
each carrying the author name and timestamp of the change:
<!-- A word deleted by Paul -->
<w:del w:id="2" w:author="Paul" w:date="2003-01-30T10:15:00Z">
<w:r><w:delText>opposition groups</w:delText></w:r>
</w:del>
<!-- Replaced with this insertion by the same author -->
<w:ins w:id="3" w:author="Paul" w:date="2003-01-30T10:15:00Z">
<w:r><w:t>terrorist organisations</w:t></w:r>
</w:ins>
If tracked changes are not accepted and cleared before a document is released, the full editing history — every author, every date, every word changed — is embedded and readable in the file.
# Check whether a document contains unresolved tracked changes
unzip -p document.docx word/document.xml | grep -c "w:ins\|w:del"
A non-zero count means tracked changes are present.
import zipfile
import xml.etree.ElementTree as ET
W = 'http://schemas.openxmlformats.org/wordprocessingml/2006/main'
NS = {'w': W}
def extract_tracked_changes(docx_path):
with zipfile.ZipFile(docx_path) as z:
doc = ET.fromstring(z.read('word/document.xml'))
results = []
for tag, change_type, text_tag in [
('ins', 'insertion', 't'),
('del', 'deletion', 'delText'),
]:
for elem in doc.findall(f'.//w:{tag}', NS):
text = ''.join(t.text or '' for t in elem.findall(f'.//w:{text_tag}', NS))
results.append({
'type': change_type,
'author': elem.get(f'{{{W}}}author'),
'date': elem.get(f'{{{W}}}date'),
'text': text,
})
return results
Output:
{'type': 'deletion', 'author': 'Paul', 'date': '2003-01-30T10:15:00Z',
'text': 'opposition groups in hostile regimes'}
{'type': 'insertion', 'author': 'Paul', 'date': '2003-01-30T10:15:00Z',
'text': 'terrorist organisations in hostile regimes'}
Case study: the 2003 Iraq dossier#
On 3 February 2003, the British government published a document titled Iraq: Its Infrastructure of Concealment, Deception and Intimidation [Jones, 2005]. It was presented publicly as an intelligence briefing intended to build the case for military action against Iraq and was distributed to journalists through Downing Street.
Two independent forensic discoveries were made on the day of publication, using different methods.
Text analysis — the plagiarism. Glen Rangwala, a Cambridge politics lecturer, identified within hours that substantial portions of the document had been copied almost verbatim from a journal article by Ibrahim al-Marashi, a postgraduate researcher at the Monterey Institute, published in the Middle East Review of International Affairs in September 2002 [Rangwala, 2003]. Passages from articles by Sean Boyne and Ken Gause in Jane’s Intelligence Review were also reproduced. The copying was detectable because al-Marashi’s typographical errors and an anomalously placed comma — “Saddam appointed, Sabir ‘Abd al-‘Aziz al-Duri as head” — were reproduced verbatim into the government document.
In addition, the copying was not neutral reproduction. Al-Marashi’s neutral academic descriptions had been systematically strengthened to produce more politically charged assessments [Al-Marashi, 2006]:
Al-Marashi’s original text |
Text in the published dossier |
|---|---|
“monitoring foreign embassies in Iraq” |
“spying on foreign embassies in Iraq” |
“aiding opposition groups in hostile regimes” |
“supporting terrorist organisations in hostile regimes” |
Changing “opposition groups” to “terrorist organisations” is not a stylistic edit — it transforms a description of political support into an allegation of terrorism, a categorically different claim.
Metadata analysis — the authorship. Separately, IT security researcher Richard M. Smith examined the Word document’s revision log — the author history embedded in the file’s document properties — and identified four individuals whose names appeared as editors: Paul Hamill (Foreign Office), John Pratt (Downing Street), Alison Blackshaw (personal assistant to the Press Secretary), and Murtaza Khan (junior press officer at Downing Street) [Jones, 2005]. The file had been saved to and from floppy disks (drive A:), and the saved file paths were visible in the metadata.
None of these individuals were intelligence analysts. The document had been presented as an intelligence product; the metadata identified it as a product of the Prime Minister’s communications operation.
The forensic lesson operates at two levels. First, the document properties
— Creator, Last Modified By, and the revision log — established the true
provenance of a document whose claimed origin did not match what the metadata
recorded. Second, text comparison with the source material revealed how the
content had been altered in ways that changed its meaning. Neither finding was
visible in the final text or any printout. Both were accessible only because the
source Word file was examined directly and neither the metadata nor the editing
history had been cleared before publication.
The case is the standard reference for document metadata hygiene in government and legal contexts: Word documents should have tracked changes accepted or rejected, metadata fields reviewed, and author history cleared before official release. The failure to do so in 2003 made the entire authorship record of a politically consequential document publicly readable by anyone with a copy of the file [Jones, 2005].
Total edit time#
TotalTime records the cumulative minutes the document window was in focus and
receiving input. It is not a wall-clock duration between creation and modification —
it is active editing time. A 20-page report with 3 minutes of recorded editing time
almost certainly had its text pasted in from another source, not typed.
Note that TotalTime resets to 0 in some export workflows. A value of exactly 0
minutes should be treated the same way as a very low value.
Creator vs Last Modified By#
When Creator and Last Modified By match, the document was created and last saved
by the same person — normal for a single-author document. When they differ, the
document has been edited by a different person than its creator, which may or may not
be expected depending on context.
Last Print Date and template inheritance#
cp:lastPrinted records when the document was most recently printed. It is absent
if the document has never been printed from the machine that saved it — its presence
is itself informative.
The forensically significant case is when Last Print Date predates Create Date.
A document cannot have been printed before it existed. When this occurs, the print
date was not generated by the document itself — it was inherited from the template it
was created from.
When a new document is created from a Word template (.dotm or .dot), Word copies
the template’s full set of core properties into the new document, including
cp:lastPrinted. If the template was last printed in 2019 and a new document is
created from it in 2024, the new document opens with Last Print Date: 2019 and
Create Date: 2024. Unless the analyst knows to look for this pattern, the 2019
date may be misread as evidence that the document existed in 2019.
This is not forgery — it is an artifact of how Word handles template metadata. But
it is a finding: the document was created from a pre-existing template rather than
as a genuinely new file, and the template has a traceable print history. Combined
with a non-default Template field, it can identify the template’s origin.
The print date can also reveal an authoring environment. A document submitted as a standalone individual product but carrying a print date on a workday at a specific time may connect its creation to an organisational context the submitter did not disclose.
Template#
Normal.dotm is the default blank template used by Microsoft Word. Any other
template name is informative: it reveals the organisation or workflow that produced
the template. A document submitted as an individual’s original work but bearing a
corporate template name from a different organisation is worth scrutiny.
The full template path — when present — may reveal a network share, user account name, or directory structure from the authoring machine.
Application version#
Microsoft Office Word without a version number is reported by some versions.
Others report Microsoft Office Word 16.0. The version number can be correlated
with known release dates. A document with Create Date: 2018-03-01 but
Application: Microsoft Office Word 16.0.17929 — a build released in 2024 — is
inconsistent. Either the creation date is wrong or the application version field
was updated by a later re-save.
Anomaly indicators summary#
Finding |
Possible explanation |
|---|---|
Revision 1, long document |
Content pasted into new file; template export; format conversion |
Total edit time ≤ 5 minutes, multi-page document |
Content not typed; copy-paste; programmatic generation |
Creator ≠ Last Modified By |
Multiple authors; document routed for editing |
Template ≠ |
Corporate or workflow origin; may reveal source organisation |
Last Print Date before Create Date |
Print timestamp inherited from template; document not original |
Create Date after Modify Date |
Clock error; metadata manipulation |
Application version inconsistent with Create Date |
Re-saved by a different, later version of the software |
Revision count high, edit time low |
Document opened and saved repeatedly without editing (e.g., automated processing) |
Tracked changes present ( |
Editing history not cleared before release; author names and change timestamps preserved |
Track-changed text differs materially from final text |
Deliberate word substitution; original language recoverable from deletion records |
In the Kragstjern case
Most of the documents on the seized USB are DOCX. Case Tasks 3.2 and 3.3
extract exactly the fields this chapter covers — creation and modification
dates, Creator, LastModifiedBy, RevisionNumber, edit time — and case
Task 3.4 goes beneath the tool output to read core.xml and app.xml
directly. Do not stop at the two property parts: list every part in each
package and check for reviewing artefacts — a word/comments.xml, tracked
changes in document.xml — which ExifTool does not surface and which record
the editing process rather than its result. The anomaly indicators table
above is the lens: read each document’s revision count and edit time against
its length and its claimed date, and record what you observe.
Practice
Put this into practice: Tasks 3.1, 3.5 and 3.8. See the Student Tasks page.