Lanmap2
Jump to navigation
Jump to search
You might also see: Cheops-ng
Description
Installation
Prerequisites
First install necessary dependencies
$ sudo apt-get install libpcap-dev libsqlite3-dev gcc \ graphviz php5-cli php5-sqlite sqlite3
To be able to use git for the installation, you will also need this package:
$ sudo apt-get install git-core
Install the web server:
$ sudo apt-get install apache2 php5
Installation of Lanmap
Use git to download the sources:
$ mkdir -p /pentest/enumeration/ $ cd /pentest/enumeration/ $ git clone git://github.com/pizza/lanmap2.git
Check that lanmap2/ directory has been created in /pentest/enumeration/.
Build the database
$ cd /pentest/enumeration/lanmap2/ $ db/build-db.sh Generating db... Creating fingerprints... data/gen-db.sql data/map-BOOTP-Fingerprint.sql data/map-BOOTP-VendorClass.sql data/map-BROWSE.sql data/map-CDP.sql data/map-DNS-TXT.sql data/map-ICMP-Echo-Fingerprint.sql data/map-IPv4.sql data/map-SSDP.sql data/map-TCP-SYN.sql Done.
Build the capture
$ cd src && make 2>&1 | grep -v bit-field; cd -
Configure Apache
At this stage, we create a virtualhost to be able to run PHP in /pentest/enumeration/lanmap2/web/. Add this section to your httpd-vhosts.conf file (adapt depending on your configuration)
Alias /lanmap2 "/pentest/enumeration/lanmap2/" <Directory "/pentest/enumeration/lanmap2/"> Options All AllowOverride All Order deny,allow Allow from all </Directory>
If you need more information, refer to this tutorial: how to setup a LAMP environment.
Usage
Start capturing
$ cd db && sudo ../src/cap && cd -
Generate graph
$ cd graph && ./graph.sh && cd -
View graphs
Point your browser to http://127.0.0.1/lanmap2/web/. If everything is fine, you should be able to view the graphs: