Skip to content

Commit

Permalink
Merge pull request #11 from varchashva/v2.0_documentation
Browse files Browse the repository at this point in the history
V2.0 documentation
  • Loading branch information
varchashva authored Apr 29, 2019
2 parents c1dcfcf + ab659b7 commit 52d19da
Show file tree
Hide file tree
Showing 10 changed files with 184 additions and 103 deletions.
17 changes: 17 additions & 0 deletions HowToUse.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
## How to use Lets Map Your Network

> Honestly, there is no _'correct'_ way of using LMYN. It solely depends on what you want to acheive using it. Having said that, I am jotting down some _'good'_ practices, which will help you to start with and later feel free to explore it as per your requirement. Do provide your inputs with use-cases in comments and I shall update this document.
1. Create a new project using _Project Management_ module, this will help you to segregate the information about the network.
2. Upload the CMBD (configuration management database) file, if applicable, to build the initial network. This will quickly give you idea about what it is in paper and what is in network.
> Tip: Use _'Stealth'_ mode while uploading the CMDB file, this will discover the surprisingly _**hidden assets**_ in your network
3. Now you can perform multiple network such as traceroute, scanning to build your network and/or validate the 'actual' network against the desired state of network
4. For cloud (AWS) network, you just have to provide the access_key & access_id and select a region. LMYN will build the network automatically
5. Once you build the network, now you can inspect the interesting part of entire network. Few examples:
- All Windows systems with specific IP range
- All Linux systems for a certain VPC
- All intermediate hops to reach google.com
- All local subnet IPs with no definite operating system details
- All internet gateways for a particular region
6. Now you can use LMYN to monitor the changes in network. Use the refresh button on top right corner.
> All GREY nodes represent the systems which are not live at this point, but were detected live previously
66 changes: 66 additions & 0 deletions InstallationGuidelines.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
## Installation Guidelines ##

### Short version ###

#### Using DockerHub - Linux only ####
1. Install [docker & docker-compose](https://docs.docker.com/install/linux/docker-ce/debian/#install-using-the-repository)
- sudo apt-get update
- sudo apt-get install docker-ce docker-compose
2. wget https://raw.githubusercontent.com/varchashva/LetsMapYourNetwork/master/docker-compose.yml
3. docker-compose up
4. Browse to http://localhost:9999/core and you are set to explore the tool :)

### Long version ###
#### For Linux User (Note - Below commands have been provided for Debian-based linux. For other versions of Linux change all commands accordingly) ####

1. Download LMYN from GitHub and extract all to a directory like /opt/LMYN ($LMYN_HOME)
2. Install python: sudo apt-get install python2.7
3. Install nmap: sudo apt-get install nmap
4. Install rabbitmq-server: sudo apt-get install rabbitmq-server
5. Install Java Development Kit
- Install Oracle JDK 8 (it’s a prerequisite for Neo4j database)
- Run command java -version on terminal
- If output with version details then jump to Neo4j installation or else continue with Java installation
- Run below commands to install Java
- sudo add-apt-repository ppa:webupd8team/java -y
- sudo apt-get update
- sudo apt-get install oracle-java8-installer
6. Go to Neo4j [download](https://neo4j.com/download-center/#releases) section
- Select ‘Community Server’ section and [download Linux version of Neo4j](https://go.neo4j.com/download-thanks.html?edition=community&release=3.3.6&flavour=unix&_ga=2.217214878.946316120.1534600164-1297405808.1534400604)
- Extract the downloaded file with command sudo tar -xzf neo4j-community-3.3.6-unix.tar.gz -C /opt/neo4j
- Change to neo4j directory cd /opt/neo4j
- Run command ./bin/neo4j console to start the neo4j server
- Browse to Neo4j web console (http://localhost:7474) to change the default password from neo4j to Neo4j
- Please refer [Neo4j Installation Guide](https://neo4j.com/docs/operations-manual/current/installation) for any troubleshooting, if required
7. Run command sudo pip install --trusted-host pypi.python.org -r $LMYN/LetsMapYourNetwork/requirements.txt
8. Run command sudo python $LMYN_HOME/LetsMapYourNetwork/manage.py runserver 0.0.0.0:9999 --insecure
9. Open http://localhost:9999/core in browser and explore the tool

#### For Windows User ####

1. Download LMYN from GitHub and extract all. It is recommended to extract within Python home directory for e.g. C:\python\LMYN ($LMYN_HOME)
2. Install python
- Go to python [download](https://www.python.org/downloads/release/python-2715) section and click on [Windows x86 MSI installer for 32-bit](https://www.python.org/ftp/python/2.7.15/python-2.7.15.msi) user OR [Windows x86-64 MSI installer](https://www.python.org/ftp/python/2.7.15/python-2.7.15.amd64.msi) for 64-bit user
- Install the downloaded python file with all default settings
3. Download [nmap](https://nmap.org/dist/nmap-7.70-setup.exe) from here and install with all default settings
4. Download [RabbitMQ-Server](https://www.rabbitmq.com/install-windows.html) and install with all default settings
5. Install Microsoft Visual Studio C++
- 32-bit user install [VC setup](http://download.microsoft.com/download/A/5/4/A54BADB6-9C3F-478D-8657-93B3FC9FE62D/vcsetup.exe) only with all optional product UNCHECKED
- 64-bit users install [Windows SDK and .NET Framework](https://www.microsoft.com/en-us/Download/confirmation.aspx?id=8442) with default settings
6. Install Oracle JDK 8 (it’s a prerequisite for Neo4j database)
- Run command java -version on command prompt
- If output with version details then jump to Neo4j installation or else continue with Java installation
- Go to Oracle [download](http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html) section and install JDK 8 with all default settings
- Go to JRE installation directory like C:/Program files/java/jre7/bin and create a folder ‘server’ and copy all content of folder ‘client’ to folder ‘server’
7. Go to Neo4j [download](https://neo4j.com/download-center/#releases) section
- Select ‘Community Server’ section and [download Windows version](https://go.neo4j.com/download-thanks.html?edition=community&release=3.4.6&flavour=winzip&_ga=2.141706682.946316120.1534600164-1297405808.1534400604)
- Right click on downloaded file and click extract all to a directory like C:\neo4j
- Open the command prompt with administrative privileges and change to extracted directory like cd C:\neo4j
- Run command bin\neo4j console to start the neo4j server
- Browse to Neo4j web console (http://localhost:7474) to change the default password from neo4j to Neo4j
- Please refer [Neo4j Installation Guide](https://neo4j.com/docs/operations-manual/current/installation/) for any troubleshooting, if required
8. Open command prompt with Administrative privilegs and browse to Python home directory for e.g. cd C:\python
- Run command python -m pip install --trusted-host pypi.python.org -r $LMYN/LetsMapYourNetwork/requirements.txt
9. Use same command prompt with Administrative privileges and from Python home directory
- Run command python $LMYN_HOME\LetsMapYourNetwork\manage.py runserver 0.0.0.0:9999 --insecure
10. Open http://localhost:9999/core in browser and explore the tool
44 changes: 44 additions & 0 deletions KeyFeatures.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
## Key Features

1. Project management
- User can create and delete multiple projects to view same network from different perspective and/or to analyze mulitple networks at same time
- Within a single project, result of all learning activities performed will be collated into a single view and thus provides a holistic perspective of network

2. Bulk load of existing CMDB
- User can upload their existing CMDB file into the LMYN and it will provide the 'delta' with the actual network
- So LMYN will provide the segregation between what's in their CMDB and not in network and vice-versa for user to take actions on rogue system
- It uses different color-code scheme for different type of systems for e.g. systems which are live in network and not presented in CMDB will be shown as RED node

3. Ability to perform on-demand network activities
- Other than uploading the CMDB file, user can perform below network activities to any project:
- Traceroute to any destination host
- Network scan to any IP and/or range (all well-known format of IP is accepted)
- LMYN will incorporate the result of above actions into same project to build the network

4. Cloud (AWS) support
- LMYN fetches the topology information such as VPC, Subnets, Peering, Internet Gateway etc. from AWS APIs and represent it in form of graph
- LMYN makes logical segregation of AWS network as "Regions > VPCs > Subnets > Instances" and groups them accordingly

5. Enumeration
- LMYN performs multiple enumeration probes to identify the operating system and type of device, as and when network is built
- For AWS, LMYN queries the AWS API to fetch the information of instances such as Platform, State, VPC, Subnet etc.
- If enumeration is successful, then LMYN assigns a relevant icon for each node

6. Ability to analyse 'interesting' network only
- Now, once user builds the network using multiple activities (CMDB upload, ad-hoc network activities, cloud scan, enumeration), then user can filter only 'interesting' network out of the entire database on UI section
- This filtering process can be performed on the basis of actions (for e.g. IP range, destination host) or enumeration details (Linux, Windows, Router, VPC, Subnet, State etc.)
- Filtering process allows to perform 'AND' and 'OR' kind of operation for e.g. 'all IP in range 192.168.1.1/24 and Windows'
- Filtering process gives ability to users to feed all the information in database but at the same time not overwhelming with the information in UI and make a run-time decision on what user wants to see

7. Continuous monitoring
- Also, LMYN gives ability to monitor any existing network over the period of time
- User can identify, in graph-form, that how their network is changing (which systems are disconnecting and connecting to network)
- LMYN again utilises color-code scheme to segregate the different type of systems in network for e.g. all nodes which are not live will be shown as GREY

8. Segregation of backend activities and UI
- LMYN segregates functionally of backend activities with UI
- LMYN have implementation of Celery and RabbitMQ; thus, user have a seamless UI irrespective of background activities
- LMYN keeps track of status of all background activities and updates UI periodically

9. Docker support
- All of these you can have in docker :)
Loading

0 comments on commit 52d19da

Please sign in to comment.