OSERT — OSCP Exam Report (Markdown → PDF)
Ctrl+F:
osert·pandoc·eisvogel·7z·OS-XXXXX·whoisflynn
Write the OSCP report in Markdown, generate a professional PDF + 7z archive with correct naming — no Word/LibreOffice.
Repo: noraj/OSCP-Exam-Report-Template-Markdown
Examples: noraj.github.io/OSCP-Exam-Report-Template-Markdown
→ Reminders before exam · Every Box - Manual Workflow
📌 Why use this for OSCP
| Benefit | Detail |
|---|---|
| Speed | Paste from Obsidian/markdown notes — no reformatting bold/code |
| Correct submission | Script outputs OSCP-OS-XXXXX-Exam-Report.pdf + .7z + MD5 |
| Version control | Keep report in a private git repo during the 24h window |
| No WYSIWYG pain | Avoid Word whitespace/line-break issues |
📌 OSCP templates available
| Template | File | Notes |
|---|---|---|
| whoisflynn v3.2 (recommended) | src/OSCP-exam-report-template_whoisflynn_v3.2.md | Improved layout, widely used |
| Official Offensive Security v1 | src/OSCP-exam-report-template_OS_v1.md | Matches OffSec suggested format |
| Official Offensive Security v2 | src/OSCP-exam-report-template_OS_v2.md | Updated official layout |
Preview PDFs in repo: output/examples/OSCP-exam-report-template_*.pdf
📌 Requirements
| Tool | Purpose |
|---|---|
| Ruby | Runs osert.rb |
| Pandoc | Markdown → PDF |
LaTeX (pdflatex / xelatex) | PDF engine (TeX Live) |
| Eisvogel | Pandoc LaTeX template (title page, TOC, code blocks) |
p7zip (7z) | Submission archive |
Kali / Debian
sudo apt update && sudo apt install -y \
pandoc \
texlive-latex-recommended \
texlive-fonts-extra \
texlive-latex-extra \
p7zip-full \
rubyEisvogel (install once — required for osert generate):
The old master/eisvogel.latex URL 404s. The standalone template is only in GitHub releases (not the repo root).
cd /tmp
wget https://github.com/Wandmalfarbe/pandoc-latex-template/releases/download/v3.5.1/Eisvogel.tar.gz
tar xzf Eisvogel.tar.gz
# Remove any broken/empty template from a failed wget
rm -f ~/.local/share/pandoc/templates/eisvogel.latex
rm -f /usr/share/pandoc/data/templates/eisvogel.latex 2>/dev/null
# Install standalone single-file template (Kali pandoc path)
sudo mkdir -p /usr/share/pandoc/data/templates
sudo cp Eisvogel-*/eisvogel.latex /usr/share/pandoc/data/templates/
mkdir -p ~/.local/share/pandoc/templates
cp Eisvogel-*/eisvogel.latex ~/.local/share/pandoc/templates/
# Must be tens of KB — NOT 0 bytes
ls -lh /usr/share/pandoc/data/templates/eisvogel.latex
head -3 /usr/share/pandoc/data/templates/eisvogel.latexRelease page: Eisvogel v3.5.1
Docker fallback (no local LaTeX/template headaches):
docker run --rm -v "$OUT:/data" -u $(id -u):$(id -g) pandoc/extra \
"/data/OSCP-exam-report-template_whoisflynn_v3.2.md" \
-o "/data/OSCP-OS-12345-Exam-Report.pdf" \
--from markdown+yaml_metadata_block+raw_html \
--template eisvogel --table-of-contents --toc-depth 6 \
--number-sections --top-level-division=chapter \
--syntax-highlighting breezedarkmacOS
brew install pandoc p7zip ruby
brew install --cask basictex # or mactex for full install
sudo tlmgr update --self
sudo tlmgr install eisvogel # if using TeX Live manager
# Eisvogel fallback — same wget to ~/.local/share/pandoc/templates/ or /usr/local/share/pandoc/templates/After basictex, open a new shell so pdflatex is on PATH.
BlackArch: pacman -S osert (packages repo + deps).
📌 One-time setup — clone repo
git clone https://github.com/noraj/OSCP-Exam-Report-Template-Markdown.git ~/Tools/osert
cd ~/Tools/osertExam-day tip: Clone and run a test generate before exam day so Pandoc/LaTeX/Eisvogel are verified.
📌 Step 1 — Init (pick OSCP template)
Interactive — choose OSCP → template → enter OS ID + email:
cd ~/Tools/osert
ruby osert.rb initPrompts:
- Certification → OSCP (index
0) - Template → Whoisflynn Improved v3.2 (index
0) or official v1/v2 - OS ID → e.g.
12345(stored asOS-12345) - Author email
- Output folder → e.g.
~/oscp-exam-report/
Non-interactive init (copy template yourself):
mkdir -p ~/oscp-exam-report
cp ~/Tools/osert/src/OSCP-exam-report-template_whoisflynn_v3.2.md \
~/oscp-exam-report/report.md
# Edit YAML frontmatter: author, date, titlepage colors, OSIDTitle page colors (YAML frontmatter)
Set in the template header:
titlepage-color: "DC143C" # Crimson
titlepage-text-color: "FFFFFF"
titlepage-rule-color: "FFFFFF"Other good sets: 1E90FF / 483D8B / FFD700 — see repo README color table.
List syntax themes: pandoc --list-highlight-styles (default in script: breezedark).
📌 Step 2 — Write the report (OSCP structure)
Fill sections per current OSCP exam guide — typical layout:
1. Introduction / scope
2. Standalone machine #1 … #3 (or however many you completed)
- Recon → Exploitation → PrivEsc → flags (local.txt, proof.txt)
3. AD set (if attempted)
- Client #1, Client #2, DC
4. Appendix — extra screenshots, full command output
Images + generate: use Generate OSCP Report — one script + one copy-paste command block.
Pandoc -r does not search subfolders — collect PNGs next to the report first (included in that note).
Code blocks (gray boxes in PDF): wrap commands in fenced blocks with a blank line before the opening fence and a language tag:
After enumeration, I connected with mssqlclient:
```bash
impacket-mssqlclient oscp.exam/r.andrews:BusyOfficeWorker890@192.168.126.206 -windows-auth
Eisvogel + `--style breezedark` renders fenced blocks with shaded background and syntax highlighting. Inline `` `command` `` is for short one-liners only.
**Reuse vault notes:** Copy command blocks from **[[Sheet]]** tool pages — strip wikilinks `[[...]]` or replace with plain text before PDF build (Pandoc does not resolve Obsidian links).
---
## 📌 Step 3 — Generate PDF + 7z (submission)
### Interactive
```bash
cd ~/Tools/osert
ruby osert.rb generate
Script will:
- Prompt for highlight style (default
breezedark) - Build PDF →
OSCP-OS-12345-Exam-Report.pdf - Build 7z →
OSCP-OS-12345-Exam-Report.7z - Optionally add external lab report PDF to archive
- Print MD5 hash (verify after upload to OffSec portal)
Non-interactive (exam day — no prompts)
cd ~/Tools/osert
ruby osert.rb generate \
-i ~/oscp-exam-report/report.md \
-o ~/oscp-exam-report \
-e OSCP \
-s 12345 \
-r ~/oscp-exam-report \
--style breezedark \
--no-preview \
--no-external-lab-report| Flag | Meaning |
|---|---|
-i | Input markdown report |
-o | Output directory for PDF + 7z |
-e OSCP | Exam type (filename prefix) |
-s 12345 | OS ID without OS- prefix |
-r PATH | --resource-path for images (repeat paths as needed) |
--style | Pandoc highlight theme |
--no-preview | Skip xdg-open |
--no-external-lab-report | Skip lab PDF prompt |
--lua-filter FILE | Optional Pandoc filter (repeatable) — community filters |
Output files:
~/oscp-exam-report/OSCP-OS-12345-Exam-Report.pdf
~/oscp-exam-report/OSCP-OS-12345-Exam-Report.7z
Verify MD5 printed at end matches portal after upload.
📌 Manual Pandoc (OSCP — whoisflynn template)
If osert.rb fails, build PDF directly:
cd ~/Tools/osert
pandoc ~/oscp-exam-report/report.md \
-o ~/oscp-exam-report/OSCP-OS-12345-Exam-Report.pdf \
--from markdown+yaml_metadata_block+raw_html \
--template eisvogel \
--table-of-contents \
--toc-depth 6 \
--number-sections \
--top-level-division=chapter \
--highlight-style breezedark \
--resource-path=.:src:~/oscp-exam-report
# Archive manually
7z a ~/oscp-exam-report/OSCP-OS-12345-Exam-Report.7z \
~/oscp-exam-report/OSCP-OS-12345-Exam-Report.pdf
md5sum ~/oscp-exam-report/OSCP-OS-12345-Exam-Report.7z📌 OSCP submission checklist
| Item | Check |
|---|---|
| Filename | OSCP-OS-XXXXX-Exam-Report.pdf inside .7z |
| Archive | .7z only (not zip/rar) |
| MD5 | Matches portal after upload |
| Flags | local.txt + proof.txt per standalone; AD flags per guide |
| Screenshots | Every step — command + result visible |
| Private repo | Never push report/flags to public GitHub |
| Regenerate | Re-run generate after final edits; confirm MD5 again |
Point target → Reminders before exam > 📌 OSCP exam point breakdown (100 total — pass = 70)
📌 Pre-exam dry run
# 1. Init template to a test folder
ruby osert.rb init # OSCP → whoisflynn → test OSID
# 2. Add one fake machine section + one screenshot
# 3. Generate
ruby osert.rb generate -i ~/oscp-exam-report/report.md -o ~/oscp-exam-report \
-e OSCP -s 99999 -r ~/oscp-exam-report --style breezedark --no-preview --no-external-lab-report
# 4. Confirm PDF opens, TOC/numbering/code blocks look correctFix LaTeX/Eisvogel errors before exam day — missing fonts/packages are the usual failure.
📌 Troubleshooting
| Problem | Fix |
|---|---|
osert: command not found | Use ruby ~/Tools/osert/osert.rb … or alias osert='ruby ~/Tools/osert/osert.rb' |
rb_sysopen - Hacking (or similar) | Quote paths with spaces — My Hacking Adventures splits into separate shell words without quotes |
pdflatex not found | Install TeX Live / basictex; restart shell |
Emergency stop / no legal \end found | Broken Eisvogel install — reinstall from release tar.gz, verify file size > 0 |
Could not find ... eisvogel.latex | Same — install from release, not raw GitHub master URL (404) |
| Images missing in PDF | Set -r / --resource-path to folder containing images |
PDF generation failed | Run pandoc command manually; read LaTeX error in output |
Obsidian [[links]] in PDF | Replace with plain text or [text](url) before generate |
Undefined control sequence / N\A | Use N/A not N\A in tables — LaTeX treats \A as a command |
![[Pasted image ...]] | Pandoc ignores Obsidian embeds — use  and put images in -r path |
xdg-open on headless/SSH | Use --no-preview |
Paths with spaces (common vault paths)
Your box folders use My Hacking Adventures — the shell splits unquoted paths at every space. Ruby then tries to open a file literally named Hacking.
# WRONG — breaks at spaces
ruby osert.rb generate -i /home/phill/.../My Hacking Adventures/.../report.md
# RIGHT — quote every path argument
REPORT="/home/phill/Documents/Personal/OSCP/Boxes/My Hacking Adventures/HackTheBox/Soccer2/OSCP-exam-report-template_whoisflynn_v3.2.md"
OUT="/home/phill/Documents/Personal/OSCP/Boxes/My Hacking Adventures/HackTheBox/Soccer2"
ruby ~/Tools/osert/osert.rb generate \
-i "$REPORT" \
-o "$OUT" \
-e OSCP \
-s 12345 \
-r "$OUT" \
--style breezedark \
--no-preview \
--no-external-lab-reportTip: For exam reports, use a path without spaces (e.g. ~/oscp-exam-report/) to avoid quoting mistakes under pressure.
Help: ruby osert.rb generate -h · repo FAQ.md