Templates

Converting a Ghostwriter or PwnDoc Word Template

Bring the Word template your reports come out of across from Ghostwriter or PwnDoc: where to put it, what each placeholder becomes, what has no equivalent, and the finding fields it adds.

6 min read · Updated

Pental converts a Ghostwriter or PwnDoc Word template as it stands. Every placeholder Pental has an equivalent for becomes that value, the loops, conditions and table rows around them repeat and show where they did, and everything else in the file stays exactly as you designed it: styles, tables, headers, footers, pictures and wording. You see what each placeholder became, and what has no equivalent, before anything is saved. It works in the Portal and in our free, open-source reporting tool.

Where to bring it

  1. In the Portal, open Settings, Data, press Choose an export file under Coming from another platform, and choose the .docx: the same place your Ghostwriter or PwnDoc findings come across. In the Portal or the free tool you can also open Settings, PDF & DOCX and press Upload on the Report row of Document Templates (Add Template once there is one).
  2. Pental reads the file and recognises a Ghostwriter or PwnDoc template from its placeholders. Under Document Templates, a template of your own, written with Pental’s placeholders, uploads as it always has.
  3. A review opens, Bring your Ghostwriter template across or Bring your PwnDoc template across, listing what was Brought across, what was Left out and the Finding fields it prints.
  4. Press Save as a report template, or Download it to open the converted file in Word first.
The Word template Ghostwriter ships, uploaded to the free reporting tool: each placeholder beside the Pental value it became, and what was left out.Corvane SecurityIn our free reporting toolA demonstration: Corvane Security and its client are invented. Every screen is the real software.

Corvane SecurityIn our free reporting toolA demonstration: Corvane Security and its client are invented. Every screen is the real software.Drag sideways to see the whole screen.

Converting happens in your browser. The review lists each placeholder in the file beside what it became, so a template with a hundred of them can be read through before it is used for a client.

What a Ghostwriter placeholder becomes

Ghostwriter fills its templates with Jinja2 through docxtpl, which reads a tag split across Word’s runs and curly quotes typed by Word, and so does the conversion. The names Ghostwriter gives its data become Pental’s:

In your Ghostwriter templateIn Pental
{{ client.name }}, {{ project.name }}, {{ project.type }}The client, the engagement’s name and its type
{{ report_date }}, {{ project.start_date }}, {{ project.end_date }}The report’s date and the engagement’s dates, in your date format
{{ project.start_day }}, start_month, start_year and the end’sThe day, month and year the engagement started and ended
{% for finding in findings %} and {{ finding.title }}The engagement’s findings, one after another, in severity order
findings|filter_severity(["Critical", "High"]), filter_typeOnly the findings of those severities, or of those categories
{{p finding.description_rt }}, {{p finding.mitigation_rt }}The finding’s description and remediation, with their formatting and pictures
{{p finding.replication_steps_rt }}The finding’s evidence
{{p finding.affected_entities_rt }}, {{p finding.references_rt }}The finding’s affected hosts and references
{{p finding.impact_rt }}, the detection techniques, finding.tagsFinding fields of the same names
{% cellbg finding.severity_color %}The cell shaded in the finding’s severity colour
{%tr for member in team %}, client.contactsA row for each person who worked on the engagement, and one for the client’s contact
{{ totals.findings }}, {{ totals.findings_critical }}The counts, and each severity’s share where a template works one out

A tag prefixed p stands for its whole paragraph in Ghostwriter, and it does in Pental, and the rows between a {%tr for %} and its {%tr endfor %} repeat as rows. A statement alone in a paragraph leaves an empty paragraph behind in Ghostwriter’s output, so one is kept where it did, and the page reads as it did. A brace in the document’s own words, which Jinja ignores, is kept as text, with the placeholders written in Pental’s other pair of delimiters.

What a PwnDoc placeholder becomes

PwnDoc fills its templates with docxtemplater, as Pental does, with its paragraph loops on, as Pental has them. Its loops, severity rows and dash loops stay where they are, and only the names change:

In your PwnDoc templateIn Pental
{name}, {auditType}, {date}, {date_start}, {date_end}The engagement’s name, type, report date and dates
{company.name}The client, which is what PwnDoc’s company is
{creator.firstname} {creator.lastname}The lead tester’s first and last names
{-w:p scope}{name}{/scope}A paragraph for each item in scope
{#findings}{#cvss.baseSeverity == 'Critical'}A row for each critical finding, and the same for each severity
{identifier}, with or without changeIDThe finding’s ID, numbered the way your Pental settings number findings
{#description}{@text | convertHTML}{#images}...{/description}The description with its pictures, and the same for remediation, poc (the evidence) and observation
{@affected | convertHTML}The affected hosts
{@cvss.cellColor}The cell shaded in the finding’s severity colour
{cvss.baseMetricScore}, {cvssObj.AV} and the other metricsThe CVSS score, and each metric in words: Network, Low, None, Changed
{#references}{.}{/references}Each reference in turn

A field whose block stood for its paragraphs takes them with it when it is empty, as it did in PwnDoc, so a finding with no observation has no gap where one would be.

What has no equivalent

Some things a template can print have nothing in Pental that means the same. Each is listed under Left out with what it was, and prints nothing, the way an empty value did in the original:

  • From Ghostwriter: objectives, targets, a red team’s infrastructure (domains, servers and cloud hosts), operation logs, deconflictions and white cards, BloodHound results, and report, project or client extra fields. A loop over one of them repeats nothing, so a table of them keeps its heading row and has no rows.
  • From PwnDoc: the client’s logo ({%company.logo}), which Pental does not keep, a scope entry’s hosts and services, and whether a finding was still being written.
  • From either: a condition Pental cannot answer, or a list narrowed in a way it cannot repeat. What it holds is left out, and in a Ghostwriter template its else shows instead.

A placeholder left out prints nothing in a client’s report. If one matters to you, put the Pental value you want in its place in Word, using the Placeholder Key on the Report row, and upload the file again.

Making your Word template the one Pental fills covers the rest of a template’s life in Pental: the Draft, the Document Builder, the Placeholder Key and the styles a report’s formatted text uses.

The finding fields it adds

Where a template prints something Pental keeps as a finding field rather than a field of its own, saving adds that field to every finding: Impact, Tags and the host and network detection techniques from Ghostwriter, with any of a finding’s extra fields, and Observation, Vulnerability type, Remediation priority and Remediation complexity from PwnDoc. Only the fields the template prints are added, and each is named exactly as Coming from another platform names it when your findings come across, so the template and the findings you bring meet in the same field.

What stays as you made it

  • Every style, font, table, header, footer, picture and page break in the file.
  • Where findings start a page: on the template’s own page breaks, with none of Pental’s added.
  • Heading numbers: your template’s own, if it has any, and none of Pental’s.
  • Severity colours, the date format and how findings are numbered follow your settings in Pental.

Check it on a real engagement

Generate a report from an engagement with findings of every severity and read it beside one your old tool produced. The conversion has been proven on the templates Ghostwriter and PwnDoc ship, filled for an engagement and read part by part, but your template is your own. If something reads differently, email hello@pental.io and tell us what, and we will look at it.

Bringing your findings too? In the Portal, Coming from another platform takes a Ghostwriter report JSON and its finding library CSV, and a PwnDoc audit’s JSON, a backup archive or its vulnerability library, and shows you the mapping before a single row is written; migrating from Ghostwriter and migrating from PwnDoc take each step. Side by side, the products compare in Pental vs Ghostwriter and Pental vs PwnDoc.


Bring Your Template to Our Free Tool

Install our free, open-source reporting tool with one command, upload your Ghostwriter or PwnDoc .docx under Settings, PDF & DOCX, and read what each placeholder became before you save it.

When you want a client portal too, start a free trial of the Portal.


Also Worth Reading

Setup guide

Prefer to watch it?

The whole setup recorded, with chapters you can jump to: registering, your own domain, your own database in any of three places, your own mail server, branding, the first sign-in, updating the database on Supabase Cloud, and moving the database if you change your mind.

  • 0:00 · Registering, signing in, and the free trial
  • 0:44 · Your name and your firm’s name
  • 0:50 · Custom domain
  • +6 more