pentest-guard.mjs
- Event: PreToolUse Bash/PowerShell
- Type: wall: blocks the action and says why (exits with code 2)
- Escapes:
SENZU_ALLOW_PENTEST=1(always with explicit approval, recorded in the devlog)
What it does
Section titled “What it does”Pentesting SCOPE wall. BLOCKS running offensive-security tools: network scanning (nmap, masscan, hping3), web discovery and fuzzing (gobuster, ffuf, nikto, wpscan, nuclei, wfuzz), injection and exploitation (sqlmap, commix, metasploit/msfconsole/msfvenom), credential brute force (hydra, medusa, ncrack), cracking (hashcat, john) and network or AD enumeration and post-exploitation (enum4linux, crackmapexec, responder, evil-winrm, wifi). “Quoting is not doing”: it looks at what is executed, not quoted text, and also INSIDE a script the command runs (bash x.sh, ./x.sh…). Senzu helps with AUTHORIZED pentesting: with written permission and scope recorded in the devlog, escape SENZU_ALLOW_PENTEST=1. Cannot be turned off.