环境:
vhome$ openssl
OpenSSL> version
OpenSSL 0.9.8k 25 Mar 2009
软件包版本:
libnet-1.0.2a.tar.gz
libnids-1.23.tar.gz
db-4.7.25.NC.tar.gz
dsniff-2.3.tar.gz
步骤:
vhome$ tar zxvf libnet-1.0.2a.tar.gz
vhome$ cd Libnet-1.0.2a/
vhome$ ./configure
vhome$ make
vhome$ sudo make install
vhome$ tar zxvf libnids-1.23.tar.gz
vhome$ cd libnids-1.23/
vhome$ ./configure
vhome$ make
vhome$ sudo make install
vhome$ tar zxvf db-4.7.25.NC.tar.gz
vhome$ cd db-4.7.25.NC/build_unix/
vhome$ ../dist/configure --enable-compat185
vhome$ make
vhome$ shudo make install
vhome$ tar zxvf dsniff-2.3.tar.gz
vhome$ cd dsniff-2.3/
vhome$ ./configure --with-db=/usr/local/BerkeleyDB.4.7/
make LDFLAGS+=-lgthread-2.0 LDFLAGS+=-ldl
vhome$ shudo make install
Q&A:
./sshcrypto.c:25: error: field key has incomplete type
./sshcrypto.c:30: error: expected specifierqualifierlist before des_key_schedule
./sshcrypto.c: In function blowfish_encrypt:
./sshcrypto.c:131: error: BF_ENCRYPT undeclared (first use in this function)
./sshcrypto.c:131: error: (Each undeclared identifier is reported only once
./sshcrypto.c:131: error: for each function it appears in.)
./sshcrypto.c: In function blowfish_decrypt:
./sshcrypto.c:143: error: BF_DECRYPT undeclared (first use in this function)
./sshcrypto.c: In function des3_init:
./sshcrypto.c:156: error: struct des3_state has no member named k1
./sshcrypto.c:157: error: struct des3_state has no member named k2
./sshcrypto.c:160: error: struct des3_state has no member named k3
./sshcrypto.c:162: error: struct des3_state has no member named k3
./sshcrypto.c:164: error: struct des3_state has no member named iv1
./sshcrypto.c:165: error: struct des3_state has no member named iv2
./sshcrypto.c:166: error: struct des3_state has no member named iv3
....
make: *** [sshcrypto.o] Error 1
Which results in the the tools sshmitm, tcpkill, tcpnice, urlsnarf, webmitm and webspy not being build.
Add the following two lines to sshcrypto.c:
#include
#include
If you get the following errors:
/usr/local/lib/libcrypto.a(dso_dlfcn.o): In function `dlfcn_bind_func:
dso_dlfcn.c:(.text+0x29d): undefined reference to `dlsym
dso_dlfcn.c:(.text+0x316): undefined reference to `dlerror
/usr/local/lib/libcrypto.a(dso_dlfcn.o): In function `dlfcn_bind_var:
dso_dlfcn.c:(.text+0x38d): undefined reference to `dlsym
dso_dlfcn.c:(.text+0x3fe): undefined reference to `dlerror
/usr/local/lib/libcrypto.a(dso_dlfcn.o): In function `dlfcn_unload:
dso_dlfcn.c:(.text+0x45c): undefined reference to `dlclose
/usr/local/lib/libcrypto.a(dso_dlfcn.o): In function `dlfcn_load:
dso_dlfcn.c:(.text+0x505): undefined reference to `dlopen
dso_dlfcn.c:(.text+0x55d): undefined reference to `dlclose
dso_dlfcn.c:(.text+0x58c): undefined reference to `dlerror
collect2: ld returned 1 exit status
make: *** [sshmitm] Error 1
You need to run make with the following command:
make LDFLAGS+=-ldl