Inguma/Installation

From aldeid
Jump to navigation Jump to search
You are here:
Installation

Environment

The following has been tested on a Ubuntu 10.04 LTS box with Python 2.6.5 But it should work with other distributions and Python 2.5.

For more information, please refer to the official installation guide.

Prerequisites

Packages

$ sudo apt-get update
$ sudo apt-get install \
    python \
    python-impacket \
    python-crypto \
    python-scapy \
    python-paramiko \
    python-pysnmp2 \
    python-vte \
    python-bluez \
    python-gtksourceview2 \
    python-pygraphviz \
    python-geoip \
    libc6-dev

Nmap

Either install Nmap:

If you install Nmap from sources, add a symbolic link:

$ sudo ln -s /usr/local/bin/nmap /usr/bin/nmap

Installing Oracle XE and CX_Oracle

Description

We need cx_oracle to be able to access Oracle databases from python (Inguma is developed into python). This library requires a valid install of Oracle; this is why we first install Oracle XE, the light version of Oracle 10g. If you wish to install it for a more recent version of Oracle, go to this link:

http://www.oracle.com/technetwork/database/express-edition/downloads/index.html

Installation of Oracle XE

Add the Oracle repository to your sources.list file

# echo "deb http://oss.oracle.com/debian unstable main non-free" >> /etc/apt/sources.list

Import the key for the new repository and update your local repositories:

$ wget http://oss.oracle.com/el4/RPM-GPG-KEY-oracle -O- | sudo apt-key add -
$ sudo apt-get update

Then install Oracle-XE:

$ sudo apt-get install oracle-xe
Note
Notice that this installation can take a long time (from some minutes to 1 hour)

Installation of cx_Oracle

$ cd /data/src/

If you have Python v2.7:

$ wget http://downloads.sourceforge.net/project/cx-oracle/5.0.4/cx_Oracle-5.0.4-10g-unicode-py27-1.i386.rpm

If you have Python v2.6:

$ wget http://downloads.sourceforge.net/project/cx-oracle/5.0.4/cx_Oracle-5.0.4-10g-unicode-py26-1.i386.rpm

If you have Python v2.5:

$ wget http://downloads.sourceforge.net/project/cx-oracle/5.0.4/cx_Oracle-5.0.4-10g-unicode-py25-1.i386.rpm

As we have downloaded a rpm package (RedHat), we need to convert it to a Debian package with alien (adapt depending on your Python version):

$ sudo apt-get install alien
$ cd /data/src/
$ sudo alien cx_Oracle-5.0.4-10g-unicode-py27-1.i386.rpm

Before we start the installation, we need to setup some environment variables:

$ export ORACLE_HOME=/usr/lib/oracle/xe/app/oracle/product/10.2.0/server
$ export LD_LIBRARY_PATH=$ORACLE_HOME/lib
$ export PATH=$ORACLE_HOME/bin:$PATH

Then we need to add the path to Oracle libraries in the ld.so.conf file.

$ sudo vim /etc/ld.so.conf

Add the following line at the end of the file:

/usr/lib/oracle/xe/app/oracle/product/10.2.0/server/lib

Refresh:

$ sudo ldconfig

Now we can proceed with the installation:

$ sudo dpkg -i cx-oracle_5.0.4-2_i386.deb

At least, create a symblic link in order to make Python aware of the existence of your library:

$ sudo ln -s /usr/lib/python2.7/site-packages/cx_Oracle.so /usr/lib/python2.7/

Check that the package has been successfully installed with the following command:

$ dpkg -l | grep cx-oracle
ii  cx-oracle                              5.0.4-2                                 Python interface to Oracle

And also check that Python is able to import the Oracle library:

$ python -c 'import cx_Oracle' 

In case you don't have any error, it means that you have successfully installed cx_oracle.

Installation of Inguma

First install Mercurial:

$ sudo apt-get install mercurial

Then commit to the last revision:

$ mkdir -p /pentest/exploits/
$ cd /pentest/exploits/
$ hg clone http://inguma.eu/repos/inguma