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:

4 comments:

  Anonymous

November 20, 2009 at 12:32 PM

After ./configure I received the error
Package requirements (gtk+-2.0 >= 2.0.0 pango >= 1.0 atk >= 1.0)

I know these are GTKLIBS and I am in to process of finding them.

Ubuntu 9.10 (Upgraded from 9.04)

  Anonymous

November 20, 2009 at 12:43 PM

The Ubuntu Package is

libgtkgl2.0-dev

That fixes the problem.

  Anonymous

December 18, 2009 at 1:46 PM

After ./configure I reciewed this:

Checking for required libraries...

checking for library containing gethostbyname... none required
checking for library containing socket... none required
checking for library containing poll... none required
checking for library containing gzopen... no
configure: error: not found.

Then I tried to continue and write make and that but:
no makefile found, Stop.

When I typed: sudo make install
it said:

GTK support not compiled in ettercap

Dont now what to do:)
Plz help!?

  Anonymous

December 22, 2009 at 4:30 AM

Excellent!! I did

sudo apt-get build-dep ettercap && sudo apt-get install build-essential

on ubuntu 9-0.4 to solve all the dependency issues, but I couldn't do make without errors.

Your post on ec_log solved that thank you very much!