Network Scanner(Scandy) - Python

A tool to scan a network for open ports, manufacturer of discovered devices and checking for already known vulnerabilities for those discovered devices and/or services

Introduction

In this project, I used scapy a popular network library of python to create a tool to scan any authorized network for open ports and savage other information such as manufacturer based on the MAC address, os, etc. And the tool also used an api by vulners to scan for any CVE's out there based on the deduced information.

Every pentester is as good as their information gathering skills - Andrews

Features

  • Scan network for connected(active) devices.
  • Retrieve information such as Mac address, OS, Host name,
  • Scan for open ports, port services, port banner and additional vulnerabilities.
  • Search for existing CVE for open ports using Vulners API

All codes used can be found at cybandy repo. You can choose to dive right in get your hands dirty or follow along with the youtube videos I have. Either way happy learning and hope to get your feedbacks.

Detailed explanation : Videos

Network Scanner(Scandy) - Setup

A tool to scan a network for open ports, manufacturer of discovered devices and checking for already known vulnerabilities for those discovered devices and/or services

Network Scanner(Scandy) - Detecting Devices, Mac Addresses (manufacturer), and OS Fingerprinting

A tool to scan a network for open ports, manufacturer of discovered devices and checking for already known vulnerabilities for those discovered devices and/or services

Network Scanner(Scandy) - Setup

A tool to scan a network for open ports, manufacturer of discovered devices and checking for already known vulnerabilities for those discovered devices and/or services

Network Scanner(Scandy) - Setup

A tool to scan a network for open ports, manufacturer of discovered devices and checking for already known vulnerabilities for those discovered devices and/or services

Usage

Installation

Caution

Because scapy interact directly with the raw socket of your system it requires sudo privileges. You can directly call sudo as I have shown below or follow the explanation here to tweak it as you want it.

Clone the repo

        git clone https://github.com/cybandy/scandy.git

      

Create a virtual environment

        python -m venv venv #use any name you want

      

Activate the environment

        source ./venv/bin/activate

      

Install the packages

        pip install -r requirements.txt

      

Commands

CommandsDescription
-t or --targetTarget network ip
-p or --portport(s) to scan
-th or --threadNumber of thread. Default 50
-v or --verbosePrint all closed ports

The command below will check if the IP can be reached and then scan default ports 1-1024

        sudo python -t 192.168.227.3

      

The command below will check if the IP can be reached and then scan default port 22, 80, 221

        sudo python -t 192.168.227.3 -p 80 22 221

      

The command below will check for all the device on the network 192.168.227.1/28 can be reached and then scan default port 22, 80, 221 and ports in the range of 2000 - 5000

        sudo python -t 192.168.227.1/28 -p 80 22 221 -pr 2000 5000

      
cyb ndy
© 2023 Designed & Developed by Cybandy