# Sample deliverables

This directory holds the artefacts published on
[sm0k3net.github.io/dsh-redteam/samples](https://sm0k3net.github.io/dsh-redteam/samples/):
one real engagement report rendered five ways, a Russian rendition of the same report,
and the complete export bundle from the same engagement.

They exist so that a visitor can open the actual output of `dsh-redteam` instead of
looking at screenshots of it: the report the agent produced, the PDF/DOCX the plugin
exported, the checksums, the evidence register and the bundle a client would receive.

The set is **current output, not an archive**: it was re-rendered on 2026-11-28 by
`dsh-redteam` 1.3.0 from the stored engagement state, so it shows the 1.3.0
findings-first HTML brief with `F-01`-style display ids, the evidence register, the
audit trail and `findings/findings.sarif`.

## Layout

```
website/samples/
├── index.html                     # the public page (cards, iframe, bundle table, SHA-256)
├── MANIFEST.md                    # human-readable manifest of every artefact
├── manifest.json                  # machine-readable manifest
├── MANIFEST.sha256                # sha256sum -c compatible checksums
├── README.md                      # this file
├── reports/
│   └── rt-20261127-f11c/
│       ├── report.md              # engagement RT-20261127-F11C, English
│       ├── report.html            # self-contained HTML report
│       ├── report.pdf             # print layout
│       ├── report.docx            # editable Word export
│       ├── report.json            # report model
│       ├── report-ru.md           # the same report rendered in the ru locale
│       ├── report-ru.html
│       ├── report-ru.pdf
│       ├── report-ru.docx
│       └── report-ru.json
└── bundle/
    └── rt-20261127-f11c.zip       # deterministic export bundle (26 entries)
```

Filenames are normalized (`report.*`, `report-ru.*`) so links never change when a
new engagement is published. The bytes inside each report and inside the ZIP are the
plugin's output; do not edit them.

## Provenance

| Field | Value |
| --- | --- |
| Engagement | `RT-20261127-F11C` — “DEFAULT mode — exploit/privesc/lateral/post” |
| Client field | `Local training range` |
| Mode | DEFAULT (Standard) |
| Date | 2026-11-27 (engagement) |
| Rendered | 2026-11-28 by `dsh-redteam` 1.3.0 |
| Target | `http://192.168.100.101:8081/` on a private lab network |
| Plugin | `dsh-redteam` 1.3.0 |
| Findings | 3 — 1 critical, 1 high, 1 medium |
| Evidence | 10 records, 10 KB |

The target was an intentionally vulnerable entry container on an isolated lab
network. Its published page documents `/ping?host=` command injection and a fake
flag layout under `/home/support` and `/root`; the engagement used only synthetic
flags. No production system was touched.

The Russian set was rendered by the same plugin from the same stored engagement
state in its `ru` locale on 2026-11-28. It is not a hand translation and was not
edited after rendering.

## Sanitization

> Every artefact here was produced against an isolated, synthetic local lab. No real
> client, organization, production host, public domain, third-party personal data or
> credential appears in any file.

Before publishing a candidate, inspect the original rather than the copy:

```sh
# report set
pdftotext -layout report.pdf - | less
python3 - <<'PY'
import zipfile, re
z = zipfile.ZipFile("report.docx")
text = " ".join(re.sub(r"<[^>]+>", " ", z.read(n).decode("utf-8", "ignore"))
                for n in z.namelist() if n.endswith(".xml"))
print(text)
PY
less report.md report.html report.json

# bundle
unzip -l bundle.zip
rm -rf /tmp/bundle-check && unzip -q bundle.zip -d /tmp/bundle-check
grep -RIniE 'authorization:|bearer |cookie: |api[_-]?key|password *=' /tmp/bundle-check
(cd /tmp/bundle-check && sha256sum -c sha256sums.txt)
```

Then scan the renamed copies for the things that must never ship:

```sh
grep -RIniE 'client-name|real-domain\.example|@[a-z0-9.-]+\.[a-z]{2,}' \
  reports/ bundle/ MANIFEST.md manifest.json index.html
grep -RIniE 'authorization:|bearer |cookie: |api[_-]?key|secret|password *=' \
  reports/ MANIFEST.md manifest.json index.html
pdftotext -layout reports/rt-20261127-f11c/report.pdf - | grep -iE 'forbidden|pattern'
pdftotext -layout reports/rt-20261127-f11c/report-ru.pdf - | grep -iE 'forbidden|pattern'
```

- Publish only lab artefacts: private RFC 1918 addresses, loopback, `*.example`,
  `*.test`/`*.local`, synthetic engagement IDs such as `RT-20261127-F11C`.
- Reject any candidate that names a real organization, client, domain, e-mail
  address, public IP, real username or credential hash.
- Reject any candidate with live secrets. The reports should already redact them;
  confirm rather than assume.
- The bundle's internal audit trail — `state/engagement.json`, `state/audit.jsonl`
  and `process/engagement-process.md` — records the build machine's local paths from
  the five recorded `final_report_generated` events. That is the maintainer's own
  build path, not client data; the report artefacts and the SARIF log contain no
  local paths. Do not add client paths to it.

## Regenerate or replace the sample set

1. **Produce a clean lab engagement.** Use an isolated local target and a synthetic
   client name (for example `Local training range`). Complete the engagement and
   generate the report formats you need from the panel; this set uses the five
   renderings above (the sixth, slides, is a Markdown outline and is omitted). Keep the generated report set and the
   bundle from the same session:

   ```sh
   ls -lt ~/.dsh/redteam/reports/<session>/
   ls -lt ~/.dsh/redteam/bundles/<session>/
   ```

2. **Choose the set.** Prefer the most recent complete set (`md`, `html`, `pdf`,
   `docx`, `json`) with a bundle from the same engagement, and no screenshots or
   evidence referencing anything outside the lab.

3. **Copy and rename.** Use a slug derived from the engagement ID:

   ```sh
   SLUG=rt-20261127-f11c
   SRC=~/.dsh/redteam/reports/<session>
   mkdir -p website/samples/reports/$SLUG website/samples/bundle
   cp "$SRC/<id>-<stamp>.md"   website/samples/reports/$SLUG/report.md
   cp "$SRC/<id>-<stamp>.html" website/samples/reports/$SLUG/report.html
   cp "$SRC/<id>-<stamp>.pdf"  website/samples/reports/$SLUG/report.pdf
   cp "$SRC/<id>-<stamp>.docx" website/samples/reports/$SLUG/report.docx
   cp "$SRC/<id>-<stamp>.json" website/samples/reports/$SLUG/report.json
   cp ~/.dsh/redteam/bundles/<session>/bundle-*.zip \
      website/samples/bundle/$SLUG.zip
   chmod 644 website/samples/reports/$SLUG/* website/samples/bundle/$SLUG.zip
   ```

4. **Russian rendition (optional).** The plugin can render the same stored state in
   another locale. The example below was used for this sample set; run it from the
   plugin root and change `sessionId`, `stateDir` and the locale if needed.

   ```js
   // gen-report-ru.mjs
   import { Store } from './lib/host/store.js'
   import { createReports } from './lib/host/report.js'
   import { progressOf } from './lib/host/domain.js'

   const store = new Store({ root: process.env.HOME + '/.dsh/redteam' })
   const sessionId = 'a93ebf0e-4a90-4823-b624-fe71293485ab'
   const wrapper = {
     snapshot: id => ({ ...store.get(id), progress: progressOf(store.get(id)) }),
     audit: async (id, n) => store.readAudit(id, n),
   }
   const reports = createReports({ store: wrapper, stateDir: '/tmp/ru-out' })
   for (const format of ['md', 'html', 'pdf', 'docx', 'json']) {
     const r = await reports.generate(sessionId, { format, lang: 'ru' })
     console.log(format, r.file)
   }
   ```

   Then `cp` the five rendered files to `report-ru.{md,html,pdf,docx,json}` and
   inspect the PDF and DOCX before publishing. Do not hand-translate or edit the
   rendered files.

5. **Rebuild the manifests.** Compute hashes over the exact files, update
   `manifest.json`, `MANIFEST.md` and `MANIFEST.sha256`, then update the size and hash
   table in `index.html` (the table is intentionally explicit so a reader can verify
   one row without opening a JSON file):

   ```sh
   cd website/samples
   sha256sum reports/rt-*/report* bundle/*.zip > MANIFEST.sha256
   ```

6. **Render and inspect.** Serve or open `website/samples/index.html` and check:
   header/footer match, iframe loads the report, every download link resolves,
   the page has no horizontal scroll at 390 px, the SHA table is readable, and both
   themes look right.

7. **Re-run the scans** from the sanitization section on the final files, including
   `pdftotext` for both PDFs, the DOCX XML and the bundle's text files.

## Verify a download

From `website/samples/`:

```sh
sha256sum -c MANIFEST.sha256
```

`MANIFEST.sha256` covers the eleven downloadable artefacts (five English reports,
five Russian reports and the bundle), not the page or the manifest files. The bundle
also carries its own `sha256sums.txt` for its internal files:

```sh
unzip -q bundle/rt-20261127-f11c.zip -d /tmp/f11c
(cd /tmp/f11c && sha256sum -c sha256sums.txt)
```
