GithubHelp home page GithubHelp logo

hartl3y94 / lanmap2 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from rflynn/lanmap2

0.0 0.0 0.0 7.4 MB

builds database/visualizations of LAN structure from passively sifted information

SQL 9.65% C 51.09% Shell 0.06% PHP 1.59% Lua 2.39% CSS 5.07% JavaScript 30.15%

lanmap2's Introduction

# ex: set ff=dos ts=2 et:

Author: Ryan Flynn <[email protected]>

Bugs: https://github.com/rflynn/lanmap2/issues

About
-----

lanmap2 is a passive network monitoring/analysis framework; no SNMP required.

it promiscuously listens to all passing data and sifts out potentially
interesting factoids (addresses, names, fingerprints, unusual situations, etc.)
into an sqlite database.

scripts are provided to query the database and generate image graphs of
network entities, overall connectivity, traffic and notable applications,
operating systems and roles that systems play.

     network
     stream
     /~/
    /~/      "cap"         sqlite
   /~/~~~~~~~~/~/  hints   _______
             /~/--------->(_______) graph.sh   __map___
 /~/~~~~~~~~/~/           |       |---------->|        |
/~/                       |_______|           | X--X   |
                                              |  `---X |
                                              |________|

it is meant to be an extensible framework; anyone who spends time looking 
at network traffic and knows a little SQL should be able to contribute
analysis-type 'mappings' (see data/*.sql)

lanmap2's components are decoupled from each other and are fairly
straight-forward and flexible; you can report things to the database without
having to use them and you can work on analysis-type tasks or scripts while
network capture is running.

the current graphing scripts use php to query the database and generate input
to graphviz; these can be modified fairly easily.

Installation
------------

Everything is pretty much manual at this point, oh well.

Dependencies:
	sqlite3 and libsqlite3 (sqlite2 not acceptable!)
	libpcap
	gcc
	php (to interface with db and generate graphviz input; plan on replacing with lua)
	graphviz (for graph generating)

  Ubuntu Linux:
  Debian Linux:
    sudo apt-get install libpcap-dev libsqlite3-dev gcc graphviz php5-cli php5-sqlite sqlite3

1. Run make

  make

  
  This will build and populate the database file 'db/db'
  And the parse/capture program 'src/cap'


Use
---

1. Start capturing

  cd db && sudo ../src/cap && cd -

  The application has to run as root, which is a potential security hazard.

	This currently produces prodigious amounts of output; sue me.

2. Generate a graph after letting the capture run for a while.

	cd graph && ./graph.sh && cd -

	This will generate a graph at graph/net.png

  This runs a bunch of php scripts.

3. View the graph via the web/ crap

  I suggest you map/symlink apache to the web/ directory if you are capable


TODO
----

* Replace php-based "graph"ing scripts with lua-based ones, and include lua
  runtime and libraries within the lanmap2 package; this will simplify the
  dependencies and allow more people to run it.

* There are always more protocols to support

* I'd eventually like to turn the graphing portion into a full-on IDE-like
  environment where one can filter machines, traffic and identify unknown machines,
  erroneous situations, etc.

lanmap2's People

Contributors

dpavlin avatar frac avatar rflynn avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.