/survey6-prototype

An IPv6 survey tool prototype

Primary LanguagePython

Survey 6 ( Prototype )

This repo is a prototype for Survey 6 project of ScoreLabs
Please find better quality video here

About

Description

Project: Ipv6 is the internet's future, and it necessitated a more scalable survey tool to comprehend how routing and DNS function. The purpose of this project is to create an IPv6 listener that will passively collect IPv6 traffic data as a passive data collection tool for cyber security research.

Prototype: In this protype,

  • The probe captures the IPv4 packets
  • It sends dummy packet using gRPC requests to the server whenever the host network is idle for more than 5 seconds.
  • The probe sends heart beats to the server every 2 seconds for health check. This is again done using gRPC.

    The server collects the pulses and logs them in the terminal.

    The server also logs the recieved dummy packet number.

Output

Tech Stack

  1. libpcap
  2. gRPC

File Structure

.
├── ip6.proto
├── server
│   ├── server.py
├── probe
│   ├── CMakeLists.txt
│   └── client.cc
├── screenshots
└── README.md

Requirements

  1. You need version 3.13 or later of cmake. Install it by following these instructions:
sudo apt install -y cmake
cmake --version
  1. Install the basic tools required to build gRPC:
sudo apt install -y build-essential autoconf libtool pkg-config
  1. gRPC for C++ : follow this guide or follow the installation guide here
export MY_INSTALL_DIR=$HOME/.local
mkdir -p $MY_INSTALL_DIR
export PATH="$MY_INSTALL_DIR/bin:$PATH"
git clone --recurse-submodules -b v1.45.0 --depth 1 --shallow-submodules https://github.com/grpc/grpc
cd grpc
mkdir -p cmake/build
pushd cmake/build
cmake -DgRPC_INSTALL=ON \
      -DgRPC_BUILD_TESTS=OFF \
      -DCMAKE_INSTALL_PREFIX=$MY_INSTALL_DIR \
      ../..
make -j
make install
popd
  1. Python 3.5 or higher
  2. pip version 9.0.1 or higher
  3. Create Virtual Environment
python -m pip install virtualenv
virtualenv venv
source venv/bin/activate
  1. gRPC for python : follow this guide or follow the installation guide here. Inside the virtual environment. Install gRPC
python -m pip install grpcio

Install gRPC tools

python -m pip install grpcio-tools



Current dependencies and requirements are as per linux based systems

Usage

  1. Activate the virtual environment
source venv/bin/activate
  1. Clone the repository
git clone https://github.com/dhruvi29/survey6-prototype
cd survey6-prototype
  1. Generate gRPC code for python server
cd server
python -m grpc_tools.protoc -I../ --python_out=. --grpc_python_out=. ../ip6.proto
  1. Run Server
python server.py
  1. Build probe - In a new terminal
cd probe
mkdir -p cmake/build
cd cmake/build
cmake -DCMAKE_PREFIX_PATH=$MY_INSTALL_DIR ../..
make
  1. Run Probe
./client