22 # resholve does not yet support `finalAttrs` call pattern hence `rec`
23 # https://github.com/abathur/resholve/issues/107
24 resholve.mkDerivation rec {
25 pname = "unix-privesc-check";
29 url = "https://pentestmonkey.net/tools/unix-privesc-check/unix-privesc-check-${version}.tar.gz";
30 hash = "sha256-4fhef2n6ut0jdWo9dqDj2GSyHih2O2DOLmGBKQ0cGWk=";
34 ./unix-privesc-check.patch # https://github.com/NixOS/nixpkgs/pull/287629#issuecomment-1944428796
38 unix-privesc-check = {
39 scripts = [ "bin/unix-privesc-check" ];
40 interpreter = "${bash}/bin/bash";
44 binutils # for strings command
47 findutils # for xargs command
48 glibc # for ldd command
53 postgresql # for psql command
55 util-linux # for swapon command
60 "lanscan" # lanscan exists only for HP-UX OS
61 "mount" # Getting same error described in https://github.com/abathur/resholve/issues/29
62 "passwd" # Getting same error described in https://github.com/abathur/resholve/issues/29
66 "cannot:${glibc.bin}/bin/ldd"
67 "cannot:${postgresql}/bin/psql"
68 "cannot:${openssh}/bin/ssh-add"
69 "cannot:${util-linux.bin}/bin/swapon"
76 install -Dm 755 unix-privesc-check $out/bin/unix-privesc-check
81 description = "Find misconfigurations that could allow local unprivilged users to escalate privileges to other users or to access local apps";
82 mainProgram = "unix-privesc-check";
83 homepage = "https://pentestmonkey.net/tools/audit/unix-privesc-check";
84 maintainers = with maintainers; [ d3vil0p3r ];
85 platforms = platforms.unix;
86 license = licenses.gpl2Plus;