# modules/features/pentest/web.nix — web application testing.## The GUI proxies (burpsuite, zap) are in gui.nix, not here, so a headless# session can enable `web` without pulling a JDK and a desktop entry.{ lib, ... }:
(import./_sets.nix { inherit lib; }) {
name="web";
description="directory fuzzing, injection, scanners, proxies";
packages= pkgs: (with pkgs; [
ffuf gobuster feroxbuster dirb
nikto sqlmap commix wfuzz
nuclei nuclei-templates
wpscan
chromium
httpie
httpie-desktop
joomscan # binary is `joomscan.pl` dalfox arjun
jwt-cli # `jwt` jwt-hack
mitmproxy
wafw00f # is there a WAF in front, and whose ghauri # sqli where sqlmap's payloads get filtered hakrawler
interactsh # `interactsh-client`: OOB callbacks for blind SSRF/XXE/RCE caido-cli
caido-desktop
]) ++ (with (import./_pkgs/default.nix { inherit lib pkgs; });
[ ntlm-theft viewgen viewstate45 ]);
expectedBins= [
"ffuf""gobuster""feroxbuster""dirb""nikto""sqlmap""commix""wfuzz""nuclei""wpscan""joomscan.pl""dalfox""arjun""jwt""jwt-hack""mitmproxy""wafw00f""ghauri""hakrawler""interactsh-client""ntlm_theft""ntlm_theft.py""viewgen""vs45"# ASP.NET ViewState: forge/decode + .NET 4.5 signing (Pov) ];
smokeBins= [ "ntlm_theft" ];
# The variable name is asserted against the binary: setting one nuclei does# not read is silent, and the first version of this set NUCLEI_TEMPLATES,# which nuclei ignores — so it still downloaded templates to $HOME while the# comment claimed otherwise.checkScript= { pkgs, lib }: '' if ! grep -aq 'NUCLEI_TEMPLATES_DIR' ${pkgs.nuclei}/bin/nuclei; then echo "pentest-web: nuclei no longer reads NUCLEI_TEMPLATES_DIR;" >&2 echo " check its env vars and update web.nix" >&2 exit 1 fi '';
extraConfig= { pkgs, ... }: {
# nuclei writes its template tree to $HOME on first run and then tries to# update it over the network. Point it at the Nix copy instead. environment.sessionVariables.NUCLEI_TEMPLATES_DIR="${pkgs.nuclei-templates}/share/nuclei-templates";
};
}