Lanmap

From aldeid
Jump to navigation Jump to search
You might also see: Lanmap2, Cheops-ng

Description

Lanmap is a tool that produces a map of the network by simply passively listening to packets on the network. It shows traffic between hosts on the network, protocols used and transfer sizes. It doesn't send any packet by rather acts as a passive scanner.

The project has been discontinued and is now called Lanmap2. Although, the results of my tests on both versions show that Lanmap produces more accurate results than Lanmap2.

Installation

Prerequisites

$ sudo apt-get install libpcap0.8 libpcap0.8-dev graphviz

Installation of Lanmap

Download Lanmap and uncompress it:

$ cd /data/src/
$ wget http://www.parseerror.com/lanmap/rev/lanmap-2006-03-07-rev81.zip
$ unzip lanmap-2006-03-07-rev81.zip
$ cd lanmap/

Compile and install Lanmap:

$ chmod +x configure
$ ./configure
$ make
$ sudo make install

Then optionally create a symbolic link in your /pentest/ directory:

$ mkdir -p /pentest/enumeration/lanmap/
$ ln -s /usr/local/bin/lanmap /pentest/enumeration/lanmap/lanmap

Manual install of images and lanman.header

If you have following error while installing:

for f in ./graph/img/*.{png,gif,svg}; do install -m 0644 $f /usr/local/share/lanmap/graph/img/; done
install: impossible d'évaluer «./graph/img/*.{png,gif,svg}»: Aucun fichier ou dossier de ce type
make: *** [install] Erreur 1

You will have to install the images and lanman.header manually:

$ cd /usr/local/share/lanmap/
$ sudo rm -f -R graph/
$ sudo mkdir graph/
$ cd graph/
$ sudo cp -R /data/src/lanmap/graph/img/ .
$ sudo cp /data/src/lanmap/graph/lanmap.header .

Usage

Basic syntax

$ lanmap [options]

Options

-v
verbose mode, up to 3 levels (-vv, -vvv)
-i [?|*wildcard*|iface]
interface to use; 'all' for all
?: list all interfaces and exit
-r #
generate a report every # seconds.
default: 60
-D [#|all|raw]
debug mode, tons of output. use with caution.
#: payload bytes to dump (default: 0)
-f str
traffic filter; libpcap syntax
-T [png|gif|svg]
output image format (default: png)
-e program
program to run to generate graph (default: twopi)
-o directory
map destination (default ./)
-V
program version info
-h
this handy help message

Example

$ cd /pentest/enumeration/lanmap/
$ sudo ./lanmap -i wlan0 -r 30 -T png -o /tmp/

This example produces such a graph (file: /tmp/lanmap.png):

Comments