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