The latest version of Kali Linux comes with the most current version of Ettercap. But some people are gluttons for punishment and still like to compile stuff themselves so see below.
Installed on Ubuntu 13.10.
$sudo apt-get -y install cmake libncurses5-dev libssl-dev libpcap-dev flex bison libgtk2.0-dev
$mkdir ~/source
$cd ~/source
~/source$ wget https://github.com/Ettercap/ettercap/archive/v0.8.0.tar.gz
~/source$ tar zxvf v0.8.0.tar.gz
~/source$ cd ettercap-0.8.0
~/source/ettercap-0.8.0$ mkdir build
~/source/ettercap-0.8.0$ cd build
~/source/ettercap-0.8.0/build$ cmake ../
~/source/ettercap-0.8.0/build$ make
Latest source (github 4.16.2014) on Ubuntu 14.04
$sudo apt-get -y install build-essential git cmake libncurses5-dev libssl-dev libpcap-dev flex bison libgtk2.0-dev libidn11-dev librtmp-dev
$mkdir ~/source
$cd ~/source
~/source$ git clone git://github.com/Ettercap/ettercap.git
~/source$ cd ettercap
~/source/ettercap$ mkdir build
~/source/ettercap$ cd build
~/source/ettercap/build$ cmake ../
~/source/ettercap/build$ make
Latest source (github 2.16.2017) on Xubuntu 16.04
$sudo apt-get -y install build-essential git cmake libncurses5-dev libssl-dev libpcap-dev flex bison libgtk2.0-dev libidn11-dev librtmp-dev libnet1-dev
$mkdir ~/source
$cd ~/source
~/source$ git clone git://github.com/Ettercap/ettercap.git
~/source$ cd ettercap
~/source/ettercap$ mkdir build
~/source/ettercap$ cd build
~/source/ettercap/build$ cmake ../
~/source/ettercap/build$ make
~/source/ettercap/build$ sudo make install
Any errors I encounter and their solution will be posted as Comments.
hey man thanks for helping
but what about this error ??
root@kali:~/source/ettercap-0.8.0/build# cmake ../CMake Error at /usr/local/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:108 (message):
Could NOT find Curses (missing: CURSES_LIBRARY CURSES_INCLUDE_PATH)
Call Stack (most recent call first):
/usr/local/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:315 (_FPHSA_FAILURE_MESSAGE)
/usr/local/share/cmake-2.8/Modules/FindCurses.cmake:159 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
cmake/Modules/EttercapLibCheck.cmake:14 (find_package)
CMakeLists.txt:95 (include)
— Configuring incomplete, errors occurred!
See also “/root/source/ettercap-0.8.0/build/CMakeFiles/CMakeOutput.log”.
See also “/root/source/ettercap-0.8.0/build/CMakeFiles/CMakeError.log”.
Qassam,
Based on that error the ncurses development files are not in your path or they are not installed. Curses provides the terminal based “GUI”. If you are using Debian/Ubuntu you can install from the repositories.
$ sudo apt-get install libncurses5-dev
Response from site admin: You need to be root to install compiled software so
~/source/ettercap-0.8.0/build$ sudo make install
In file included from /root/source/ettercap-0.8.0/include/ec_globals.h:8:0,
from /root/source/ettercap-0.8.0/include/ec.h:52,
from /root/source/ettercap-0.8.0/src/interfaces/text/ec_text.c:22:
/root/source/ettercap-0.8.0/include/ec_network.h:7:20: fatal error: libnet.h: No such file or directory
#include
^
compilation terminated.
src/interfaces/CMakeFiles/ec_interfaces.dir/build.make:62: recipe for target ‘src/interfaces/CMakeFiles/ec_interfaces.dir/text/ec_text.c.o’ failed
make[2]: *** [src/interfaces/CMakeFiles/ec_interfaces.dir/text/ec_text.c.o] Error 1
CMakeFiles/Makefile2:516: recipe for target ‘src/interfaces/CMakeFiles/ec_interfaces.dir/all’ failed
make[1]: *** [src/interfaces/CMakeFiles/ec_interfaces.dir/all] Error 2
Makefile:127: recipe for target ‘all’ failed
make: *** [all] Error 2
Fixed problem by “apt-get install libnet1-dev”
“/root/source/ettercap-0.8.0/src/ec_sslwrap.c: In function ‘sslw_create_selfsigned’:
/root/source/ettercap-0.8.0/src/ec_sslwrap.c:1065:13: error: dereferencing pointer to incomplete type ‘X509_EXTENSION {aka struct X509_extension_st}’
ext->value->data[7] = 0xe7;
^~
src/CMakeFiles/lib_ettercap.dir/build.make:1094: recipe for target ‘src/CMakeFiles/lib_ettercap.dir/ec_sslwrap.c.o’ failed
make[2]: *** [src/CMakeFiles/lib_ettercap.dir/ec_sslwrap.c.o] Error 1
CMakeFiles/Makefile2:385: recipe for target ‘src/CMakeFiles/lib_ettercap.dir/all’ failed
make[1]: *** [src/CMakeFiles/lib_ettercap.dir/all] Error 2
Makefile:127: recipe for target ‘all’ failed
make: *** [all] Error 2
“
Not getting this error on Xubuntu 16.04 as I have an older version of OpenSSL running (libssl-dev = 1.0.2g-1ubuntu4.6). There has been an issue submitted to ettercap.
https://github.com/Ettercap/ettercap/issues/739