21 dsniff's build system unconditionnaly wants static libraries and does not
22 support multi output derivations. We do some overriding to give it
25 staticdb = symlinkJoin {
27 paths = with db.overrideAttrs { dontDisableStatic = true; }; [
36 inherit (libpcap) name;
37 paths = [ (libpcap.overrideAttrs { dontDisableStatic = true; }) ];
39 cp -rs $out/include/pcap $out/include/net
40 # prevent references to libpcap
45 inherit (libnet) name;
46 paths = [ (libnet.overrideAttrs { dontDisableStatic = true; }) ];
48 # prevent dynamic linking, now that we have a static library
52 nids = libnids.overrideAttrs {
53 dontDisableStatic = true;
56 inherit (openssl) name;
57 paths = with openssl.override { static = true; }; [
63 stdenv.mkDerivation rec {
66 # upstream is so old that nearly every distribution packages the beta version.
67 # Also, upstream only serves the latest version, so we use debian's sources.
68 # this way we can benefit the numerous debian patches to be able to build
69 # dsniff with recent libraries.
70 src = fetchFromGitLab {
71 domain = "salsa.debian.org";
72 owner = "pkg-security-team";
74 rev = "debian/${version}+debian-34";
75 sha256 = "sha256-CY0+G09KZXtAwKuaYh5/qcmZjuNhdGis3zCG14hWtqw=";
76 name = "dsniff.tar.gz";
90 NIX_CFLAGS_LINK = "-lglib-2.0 -lpthread -ltirpc -lnl-3 -lnl-genl-3";
91 env.NIX_CFLAGS_COMPILE = toString [ "-I${libtirpc.dev}/include/tirpc" ];
93 for patch in debian/patches/*.patch; do
98 "--with-db=${staticdb}"
99 "--with-libpcap=${pcap}"
100 "--with-libnet=${net}"
101 "--with-libnids=${nids}"
102 "--with-openssl=${ssl}"
106 description = "collection of tools for network auditing and penetration testing";
108 dsniff, filesnarf, mailsnarf, msgsnarf, urlsnarf, and webspy passively monitor a network for interesting data (passwords, e-mail, files, etc.). arpspoof, dnsspoof, and macof facilitate the interception of network traffic normally unavailable to an attacker (e.g, due to layer-2 switching). sshmitm and webmitm implement active monkey-in-the-middle attacks against redirected SSH and HTTPS sessions by exploiting weak bindings in ad-hoc PKI.
110 homepage = "https://www.monkey.org/~dugsong/dsniff/";
111 license = licenses.bsd3;
112 maintainers = [ maintainers.symphorien ];
113 # bsd and solaris should work as well
114 platforms = platforms.linux;