Compiling/Installing Ettercap from Source Ubuntu 9.10

Ok, so my mission has thus been to compile all the tools I use from source. This is to guarantee that I have the most recent version, and for the experience. Now you can use the repositories to install most of these tools, but often times the versions are outdated. It wasn't until recently here that nmap was upgraded from 4.76 to 5.00. But this is just my personal task for all the tools I end up needing to use. So to start, download ettercap from ettercap.sourceforge.net. Download the latest tarball, in my case 0.7.3.

CD to the download location and issue the following command:
tar xzf ettercap-NG-0.7.3.tar.gz
cd ettercap-NG-0.7.3
Now we have to install some dependencies...and this I will use apt-get for. Kind of a work around, but one that I'm fine with at the moment.
sudo apt-get install libpcap0.8-dev libpcap-dev libnet1 libnet1-dev
Make sure you have libssl and the development libraries installed as well (libssl0.9.8 and libssl-dev).
Now you will want to make one change to a source file to avoid make errors.
nano src/ec_log.c
Change the following line from
fd->fd = open(filename, 0_CREAT | 0_TRUNC | 0_RDWR | 0_BINARY);
to
fd->fd = open(filename, 0_CREAT | 0_TRUNC | 0_RDWR | 0_BINARY, 0666);
Now issue the following commands, hopefully without error:
./configure
make
sudo make install
If all goes well, ettercap should be installed and you can access the GUI by issuing:
sudo ettercap -G
Hope this works for everyone, leave comments if you run into problems.Technorati Tags: