Giter Club home page Giter Club logo

packetsniffer's Introduction

packetsniffer

This assignment aims to show how to use Scapy, a program written in Python, to capture packets in real time.

Required Setup

Virtual Box - Version 6.1.18 (a newer release should work fine)

Download here: https://www.virtualbox.org/wiki/Downloads. You will need to setup Ubuntu VM (I chose 18.04.5 LTS because it uses less resources than the newer LTS release). There is some configuration involved to be able to network with your host PC.

Ubuntu 18.04.5 LTS (Bionic Beaver)

Download the desktop image here: https://releases.ubuntu.com/18.04/. After downloading install Ubuntu on VirtualBox. Before starting the VM set the second network adapter to Host-Only. This will allow the Host PC to ping the Ubuntu VM.

adapter_1 adapter_2

Additional Steps

After booting up the Ubuntu VM, you need to make the following changes in /etc/network/interfaces file:

interfaces_packet_sniffer

You need to verify if the network interfaces are set using the command as shown below:

ip_a_packet_sniffer

This specific code uses Scapy as a module that can be installed in the system using the following command:

sudo python3 -m pip install --pre scapy[complete]

This will install Scapy and all its main dependencies. Please make sure you have pip installed your system before you run this command. Also, make sure to install python 3.6 or higher in order to get this code working.

You can check if scapy is installed properly on your VM by doing this:

scapy_sniffer

Sniffing Packets

Execute the program using the command:

sudo python3 packet_sniffer.py

The program is going to ask to input couple of parameters for the sniff() function and save packet log in a text file:

Github_1

pacap1

packetsniffer's People

Contributors

karanthakakr04 avatar

Watchers

 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.