<!-- Copyright (c) 2026 defconxt. All rights reserved. -->
<!-- Licensed under AGPL-3.0 — see LICENSE file for details. -->
<!-- NERF is a trademark of defconxt. -->
---
name: cracking-office-document-passwords
description: >-
  Crack Microsoft Office document passwords including legacy XOR encryption and modern OOXML AES encryption.
domain: cybersecurity
subdomain: password-cracking
tags:
  - office
  - document-cracking
  - ooxml
  - xor-encryption
  - microsoft
version: "1.0"
author: defconxt
license: AGPL-3.0
metadata:
  mitre-attack: ["T1027"]
  cwe: ["CWE-327"]
  tools: ["john", "hashcat", "office2john", "msoffcrypto-tool"]
---

# Cracking Office Document Passwords

## Overview

Crack Microsoft Office document passwords including legacy XOR encryption and modern OOXML AES encryption.

## Prerequisites

| Tool / Requirement | Details |
|---|---|
| `john` | Security tooling |
| `hashcat` | Security tooling |
| `office2john` | Security tooling |
| `msoffcrypto-tool` | Security tooling |
| Isolated lab environment for testing | Environment requirement |
| Authorization and signed Rules of Engagement (RoE) | Environment requirement |
| Relevant target samples or systems acquired through authorized channels | Environment requirement |

## Quick Reference

```bash
# Initialize working environment
mkdir -p /tmp/cracking-office-document-passwords/{output,logs,artifacts}

# Execute primary analysis with john
echo "[*] Running Cracking Office Document Passwords with john..."

# Validate results with hashcat
echo "[*] Cross-validating with hashcat..."

# Generate summary report
cat /tmp/cracking-office-document-passwords/output/report.json
```

## Workflow

### Step 1: Preparation and Reconnaissance

```bash
# Identify target and gather initial intelligence
file ./target_sample
john --version 2>/dev/null || echo "Install john"

# Set up working directory
mkdir -p /tmp/cracking-office-document-passwords/{output,logs,artifacts}
```

### Step 2: Primary Analysis

```bash
# Execute primary analysis with john
# Refer to Quick Reference above for detailed commands
echo "[*] Running Cracking Office Document Passwords with john..."

# Log all operations
script -q /tmp/cracking-office-document-passwords/logs/session.log
```

### Step 3: Deep Investigation

```bash
# Apply hashcat for secondary analysis
echo "[*] Deep investigation with hashcat..."

# Cross-reference findings
diff /tmp/cracking-office-document-passwords/output/primary.json /tmp/cracking-office-document-passwords/output/secondary.json
```

### Step 4: Documentation and Reporting

```bash
# Generate structured findings report
cat <<'EOF' > /tmp/cracking-office-document-passwords/output/report.json
{
  "technique": "cracking-office-document-passwords",
  "domain": "password-cracking",
  "tools_used": ["john", "hashcat"],
  "findings": [],
  "recommendations": []
}
EOF
```

## Verification

- [ ] Environment and tools verified and operational
- [ ] Target samples acquired through authorized channels
- [ ] Primary analysis completed with findings documented
- [ ] Secondary validation performed with independent tooling
- [ ] All artifacts preserved in structured output directory
- [ ] Detection opportunities documented for blue team

## References

- [MITRE ATT&CK T1027](https://attack.mitre.org/techniques/T1027) — Related technique
- [john Documentation](https://john.org/) — Primary tooling
- [hashcat Reference](https://hashcat.org/) — Secondary tooling
