These tests do not need Chrome or Mythic.
node --test tests/protocol.test.mjs tests/timing.test.mjs tests/redirect_rules.test.mjs
python3 -m unittest tests.test_packaging tests.test_aliases tests.test_smoke_browsertests/protocol.test.mjs checks UUID + JSON wrap and base64.
tests/timing.test.mjs checks jitter and killdate.
tests/test_packaging.py checks config stamp and ZIP contents.
tests/redirect_rules.test.mjs checks host and URL redirect filters.
tests/test_aliases.py checks the wire-name table.
npm install
npx playwright install chromium
npx playwright testThe tests stamp an extension and load it with --load-extension.
extension.spec.mjsstarts a mock HTTP C2 server. It checks check-in and atabstask.apis.spec.mjscalls everychrome.*API that the commands use. It also runs clipboard, sandboxeval, and sandboxctxRPC.
Use a full browser channel. The Playwright headless shell does not load extensions.
npx playwright test
BROWSERBOY_CHANNEL=msedge npx playwright testmsedge needs Microsoft Edge on the machine:
npx playwright install msedgeVerified on Microsoft Edge 151 (this repo, headless --load-extension):
| Surface | Result |
|---|---|
Check-in and tabs over mock HTTP |
pass |
storage, tabs, cookies (all stores), history, bookmarks, downloads |
pass |
scripting.executeScript, captureVisibleTab |
pass |
alarms, offscreen, clipboard session buffer |
pass |
Sandbox eval and sandbox ctx RPC (load / run_loaded path) |
pass |
declarativeNetRequest add and remove |
pass |
identity.getProfileUserInfo |
API present. Email is often empty. |
Live Mythic smoke on Edge uses --browser msedge. That run is separate from the Playwright suite.
The suite tasks every command against a real Chromium or Edge instance and a live Mythic server.
Covered cases: identity, current, tabs list/create/update/reload/close, inject, cookies, history, bookmarks, downloads, clipboard write/read, request, redirect add/hit/clear, screenshot, load, run_loaded, sleep, exit.
exit runs last.
python3 -m venv .venv
.venv/bin/pip install mythic
export MYTHIC_ADMIN_USER=mythic_admin
export MYTHIC_ADMIN_PASSWORD='...'
export MYTHIC_HOST=mythic
.venv/bin/python tests/smoke/run_live.py --extension /path/to/extracted
.venv/bin/python tests/smoke/run_live.py --extension /path/to/extracted --browser msedgeOptional:
| Variable | Meaning |
|---|---|
MYTHIC_ENV_FILE |
Local .env with MYTHIC_ADMIN_USER and MYTHIC_ADMIN_PASSWORD |
MYTHIC_SSH |
SSH target. Also set MYTHIC_ENV_REMOTE. |
MYTHIC_ENV_REMOTE |
Remote path of the Mythic .env file |
The report is tests/smoke/last_report.json. That file is gitignored.