Manual testing with Kali Linux
Hands-on sessions against a running instance: exploring, trying attacks, confirming a suspicion. They complement the automated checks in Security testing; they don't replace them, because nobody repeats a manual session after every release.
Only against a staging instance, or an instance whose owner has given written permission. See Where to test. Tell whoever receives the instance's security alerts before you start.
Setting up Kali
Kali Linux is a Linux distribution with the usual security tools installed. On Windows:
- WSL (the simplest):
wsl --install -d kali-linux, thensudo apt update && sudo apt install -y kali-linux-headlessfor the command-line tools. - Docker, for single tools without installing anything:
docker run --rm -it kalilinux/kali-rolling, thenapt update && apt install -y <tool>. - A virtual machine (VirtualBox, Hyper-V) when you want the desktop, for example to use Burp Suite with its browser.
The tools that fit SHADE
| Tool | Use it for |
|---|---|
| nmap | Which ports answer: only 80 and 443 should. Postgres, Coolify's and Traefik's dashboards, and SSH with a password must not. |
| Burp Suite (Community) or OWASP ZAP | Browse the admin and the site through it as each role, then replay requests with another role's session, or none. The best tool for access control. |
| ffuf or gobuster | Paths that should not answer: .env, backups, debug pages, the admin API on the public container. |
| testssl.sh | TLS on each domain. |
| nuclei | Known misconfigurations and exposed panels. |
| sqlmap | SQL injection in API parameters. SHADE's queries are parameterised, so it should find nothing: worth confirming. |
| hydra | Brute force on sign-in, to see SHADE's limits stop it (IPv4 and IPv6) and the alerts arrive. |
A first session
- Ports:
nmap -Pn -p- <server>. Anything but 80 and 443 open is a hardening fix. - TLS:
testssl.sh https://admin.<domain>and the same for the site's and the preview's domains. - Headers: check the admin's and the site's response headers (Content Security Policy, HSTS, cookies'
Secure,HttpOnlyandSameSite). - Roles: with Burp or ZAP, sign in as an admin, an editor with a custom role, and a visitor, in separate browsers. Do a few things as the admin (change a setting, read the audit log, install a module), then replay each request with the editor's cookie, the visitor's cookie, an API token and no cookie. Each must be refused.
- Visitors: as one visitor, call the modules' public and account routes (
/api/v1/account/<plugin>/…) with another visitor's ids. Only your own rows may come back. - Sign-in: point hydra at the team's and the users' sign-in and watch the 429 answers, the audit entries and the security alert.
- Uploads: upload an SVG and an HTML file with a script in them as media and confirm both are refused; try the
tricks of
shade/test/features/media/server/svg.test.tsand new ones. Open an accepted SVG from/uploadsand from the built site, and confirm it has the SVG policy (sandbox) and runs nothing. - Write it down: what was tried, against which version and instance, what was found. Findings go where When something is found says.
The threat models are the checklist
The most useful sessions go through a decision's threat model in the SHADE repository (docs/decisions), row by
row, trying each attack against staging. The tests prove each row in code; a manual session proves it on a real
deployment, behind the real proxy. Start with the parts a stranger can reach:
- Modules' account routes: other users' rows, cross-site requests, rate limits.
- Better Auth within bounds: signing up with someone else's address, confirm and reset links, sign-in limits.
- Modules acting as themselves: a module's public routes reaching more than its grants.
- The error log and alerts: flooding the log or the admins' inboxes.
- Installed modules: an unsigned or tampered package, an untrusted module leaving its sandbox.
- Modules' outgoing calls: a declared host that resolves inside, a redirect to
169.254.169.254or[::ffff:127.0.0.1], a build hook pointing athttp://postgres:5432. - Admin places: an editor reaching a module's settings.