SHADE is young: 0.1.0-next.2 is a pre-release, and 0.1.0 isn't out yet.

SHADE
Security

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, then sudo apt update && sudo apt install -y kali-linux-headless for the command-line tools.
  • Docker, for single tools without installing anything: docker run --rm -it kalilinux/kali-rolling, then apt 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

ToolUse it for
nmapWhich 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 ZAPBrowse 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 gobusterPaths that should not answer: .env, backups, debug pages, the admin API on the public container.
testssl.shTLS on each domain.
nucleiKnown misconfigurations and exposed panels.
sqlmapSQL injection in API parameters. SHADE's queries are parameterised, so it should find nothing: worth confirming.
hydraBrute force on sign-in, to see SHADE's limits stop it (IPv4 and IPv6) and the alerts arrive.

A first session

  1. Ports: nmap -Pn -p- <server>. Anything but 80 and 443 open is a hardening fix.
  2. TLS: testssl.sh https://admin.<domain> and the same for the site's and the preview's domains.
  3. Headers: check the admin's and the site's response headers (Content Security Policy, HSTS, cookies' Secure, HttpOnly and SameSite).
  4. 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.
  5. 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.
  6. 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.
  7. 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.ts and new ones. Open an accepted SVG from /uploads and from the built site, and confirm it has the SVG policy (sandbox) and runs nothing.
  8. 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.254 or [::ffff:127.0.0.1], a build hook pointing at http://postgres:5432.
  • Admin places: an editor reaching a module's settings.