2021-03-28 06:51:59 +00:00
|
|
|
{ config, pkgs, lib, ... }:
|
|
|
|
let
|
2021-08-18 21:54:23 +00:00
|
|
|
|
2021-03-28 06:51:59 +00:00
|
|
|
cfg = config.sconfig.security-tools;
|
2021-08-18 21:54:23 +00:00
|
|
|
|
|
|
|
proxybrowser = pkgs.writeShellScriptBin "proxybrowser" ''
|
|
|
|
exec ${pkgs.ungoogled-chromium}/bin/chromium \
|
|
|
|
--disable-background-networking \
|
|
|
|
--disable-default-apps \
|
|
|
|
--disable-plugins-discovery \
|
|
|
|
--disk-cache-size=0 \
|
|
|
|
--ignore-certificate-errors \
|
|
|
|
--no-default-browser-check \
|
|
|
|
--no-experiments \
|
|
|
|
--no-first-run \
|
|
|
|
--no-pings \
|
|
|
|
--no-service-autorun \
|
|
|
|
--user-data-dir="$HOME/.proxybrowser" \
|
|
|
|
--proxy-server="localhost:8080" \
|
|
|
|
--proxy-bypass-list='<-loopback>'
|
|
|
|
'';
|
|
|
|
|
2021-03-28 06:51:59 +00:00
|
|
|
in
|
2020-09-18 13:54:09 +00:00
|
|
|
{
|
2021-03-28 06:51:59 +00:00
|
|
|
options.sconfig.security-tools = lib.mkEnableOption "Enable security tools";
|
|
|
|
|
|
|
|
config = lib.mkIf cfg {
|
2021-03-28 06:52:09 +00:00
|
|
|
environment.systemPackages = with pkgs; [
|
|
|
|
binutils
|
2021-06-25 04:05:29 +00:00
|
|
|
bridge-utils
|
|
|
|
burpsuite
|
|
|
|
dhcpdump
|
|
|
|
dirb
|
|
|
|
exiftool
|
2021-08-16 03:20:11 +00:00
|
|
|
gef
|
2021-03-28 06:52:09 +00:00
|
|
|
ghidra-bin
|
|
|
|
gobuster
|
2021-06-25 04:05:29 +00:00
|
|
|
iptables-nftables-compat
|
|
|
|
macchanger
|
|
|
|
masscan
|
2021-08-11 22:12:49 +00:00
|
|
|
metasploit
|
2021-06-25 04:05:29 +00:00
|
|
|
nmap
|
|
|
|
openvpn
|
2021-08-18 01:24:19 +00:00
|
|
|
postman
|
2021-08-18 21:54:23 +00:00
|
|
|
proxybrowser
|
2021-06-25 04:05:29 +00:00
|
|
|
remmina
|
|
|
|
socat
|
2021-03-28 06:52:09 +00:00
|
|
|
thc-hydra
|
2021-08-19 01:23:23 +00:00
|
|
|
weevely
|
2021-06-25 04:05:29 +00:00
|
|
|
wfuzz
|
2020-10-08 22:42:56 +00:00
|
|
|
|
2021-06-25 04:03:36 +00:00
|
|
|
unstable.exploitdb
|
2021-03-28 06:52:09 +00:00
|
|
|
];
|
2020-09-18 13:54:09 +00:00
|
|
|
|
2021-08-18 17:34:34 +00:00
|
|
|
nixpkgs.overlays = [
|
|
|
|
(self: super: {
|
|
|
|
postman = super.postman.overrideAttrs (old: rec {
|
|
|
|
buildInputs = old.buildInputs ++ [ pkgs.libxkbcommon ];
|
|
|
|
version = "8.10.0";
|
|
|
|
src = super.fetchurl {
|
|
|
|
url = "https://dl.pstmn.io/download/version/${version}/linux64";
|
|
|
|
sha256 = "05f3eaa229483a7e1f698e6e2ea2031d37687de540d4fad05ce677ac216db24d";
|
|
|
|
name = "postman.tar.gz";
|
|
|
|
};
|
|
|
|
postFixup = ''
|
|
|
|
pushd $out/share/postman
|
|
|
|
patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" _Postman
|
|
|
|
for file in $(find . -type f \( -name \*.node -o -name _Postman -o -name \*.so\* \) ); do
|
|
|
|
ORIGIN=$(patchelf --print-rpath $file); \
|
|
|
|
patchelf --set-rpath "${lib.makeLibraryPath buildInputs}:$ORIGIN" $file
|
|
|
|
done
|
|
|
|
popd
|
|
|
|
'';
|
|
|
|
});
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2021-03-28 06:52:09 +00:00
|
|
|
programs = {
|
|
|
|
wireshark.enable = true;
|
|
|
|
wireshark.package = pkgs.wireshark;
|
|
|
|
};
|
2021-03-28 06:48:01 +00:00
|
|
|
|
2021-03-28 06:52:09 +00:00
|
|
|
users.users.sandy = {
|
|
|
|
isSystemUser = true;
|
2021-04-16 22:35:55 +00:00
|
|
|
useDefaultShell = true;
|
|
|
|
home = "/home/sandy";
|
|
|
|
createHome = true;
|
2021-03-28 06:52:09 +00:00
|
|
|
};
|
2021-03-28 06:51:59 +00:00
|
|
|
};
|
2020-09-18 13:54:09 +00:00
|
|
|
}
|