A comprehensive network reconnaissance tool
Project description
NETSCANNER
This project is the product of my final year undergraduate development project for my Bachelor of Science degree in Computer Networking and Cyber Security at London Metropolitan University.
This program will conduct a comprehensive scan of the local network and surrounding wireless networks using basic OS utilities, Nmap and airodump-ng.
Disclaimer
This program is designed to conduct a rigorous and comprehensive scan of your local network by actively engaging network hosts using common host discovery and port scanning techniques to produce an extensive overview of the local network. This program is also designed to produce an overview of surrounding wireless networks by capturing 802.11 frames in the vicinity of the host interface.
This program is a network reconnaissance tool and when executing the module you are wholly responsible and liable for any physical, mental or financial damage, complications and consequences of all operations that you execute. It is strongly recommended that you execute this program on networks you are authorised to audit. Use at your own discretion and risk.
Screenshots
*MAC Addresses have been obscured.
Running in the terminal
Viewing the output file
Usage
python3 -m netscanner < -h | -nP | -w | -l | -hD >
< --wP <integer value in seconds >
< --pP <integer value in seconds> >
< --pR <first port-last port> >
Requirements
python3
: NETSCANNER was designed to work with Python 3.10.ifconfig
: For gathering statistical data on local interfaces.ethtool
: For gathering statistical data on local interfacesiwconfig
: For gathering statistical data on local wireless-capable interfaces.airmon-ng
: For enabling monitor mode on capable interfaces.airodump-ng
: For capturing 802.11 beacon frames.Nmap
: For conducting local network reconnaissance.
A monitor-mode capable wireless interface is also required if you wish to use the wireless network discovery feature. See here for more information on this.
Execution
Using PyPi
The preferred method of running the program is installing the Python package from PyPi directly.
pip install netscanner
Then running the program:
python3 -m netscanner <mode specification> <options>
Manually
You can also run the module itself by downloading the main.py module from this repository and running it.
python3 __main__.py <mode specification> <options>
Avoiding sudo
The program runs shell commands with sudo privileges in the background, which will require you to provide your sudo password frequently.
To avoid this, append this line to your /etc/sudoers
file using sudo visudo
# NETSCANNER PACKAGE
<USERNAME> ALL=(ALL) NOPASSWD: ALL
This will allow you to run the module without being asked for your sudo password. This is wholly optional and it is recommended that you comment this line when done using the program.
Modes and Options
Modes
- Mode 1
- This mode will execute all functions of the program. If no flags are specified this will be the mode of operation.
- Mode 2
(-nP)
- This flag will execute Mode 2, NO PORT SCAN, which will execute the Host Discovery and 802.11 WLAN Discovery processes.
- Mode 3
(-w)
- This flag will execute Mode 3, WIRELESS ONLY, which will execute the 802.11 WLAN Discovery process exclusively.
- Mode 4
(-l)
- This flag will execute Mode 4, LOCAL SCAN ONLY, which will execute the Host Discovery and Port Scan processes.
- Mode 5
(-hD)
- This flag will execute Mode 5, HOST DISCOVERY ONLY, which will execute the Host Discovery Process exclusively.
Options
- Wireless Scan Period
(--wP)
- This option allows you to specify a scan period for the 802.11 WLAN Discovery process. The default is 60. This value is ignored if the mode of operation is not Mode 1, 2 or 3. Large values will result in longer scan times but greater verbosity.
- Port Scan Period
(--pP)
- This option allows you to specify a scan period for the Port Scan process. The default is 60. This value is ignored if the mode of operation is not Mode 1 or 4. Large values will result in longer scan times but greater verbosity.
- Port Range
(--pR)
- This option allows you to specify a port range for the Port Scan process. The default is the 100 most common ports determined by Nmap (
-F
). Large values will result in longer scan times but greater verbosity. It is useful to combine this option with the--pP
option to avoid scan timeouts when scanning large ranges.
- This option allows you to specify a port range for the Port Scan process. The default is the 100 most common ports determined by Nmap (
Processes
This section provides a brief synopsis of each process used in the program. There are three processes that are used.
Host Discovery
This process gathers characteristics about the local network and hosts on the local network using ifconfig, iwconfig, ethtool. And the ARP Request Ping and rDNS Query Flood in Nmap.
Port Scan
By default, this process uses Nmap to determine the state of the 100 most used TCP and UDP ports (-F)
on all active hosts on the local network using the TCP Half-Open Scan and the UDP Scan, port scanning techniques. The ports that are scanned can be changed using the --pR
flag in the command line, to indicate a port range.
This process also has a default timeout period of 60 seconds which can be changed using the --pP
flag.
Remote WLAN Discovery
This process determines the characteristics of remote wireless networks in the vicinity of the host machine if a wireless interface is present, available and capable of 802.11 monitor mode, using the 802.11 packet capture technique with airodump-ng.
The program will attempt to use airmon-ng to enable monitor mode on the interface. If this is is unsuccessful you will not see an error, the table for Remote WLAN data will simply be empty.
This process has a default timeout period of 60 seconds which can be changed using the --wP
flag.
FAQs
The terminal output is unreadable, now what?
Sometimes the output may be format incorrectly due to the size of the terminal window. You can access all output files in the home/<username>/Documents/NetScanner
directory which is created when you run the program initally. All output files are in .txt
format and are timestamped with the local date and time of the scan, and a tag indicating the mode of operation that was specified.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file netscanner-0.0.23.tar.gz
.
File metadata
- Download URL: netscanner-0.0.23.tar.gz
- Upload date:
- Size: 29.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.3.1 CPython/3.10.7 Linux/5.19.0-31-generic
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ddc6e965c897cd78ce1e0c8bf241aa4bc793967c5ce3b48affbc594e7fad3594 |
|
MD5 | c4233cbc7e6005c587ca107f9af7db0b |
|
BLAKE2b-256 | 1ab0772387fea9a352f00c40d489204d8f1cd2a021612cd7469ff07bd4029e6e |
Provenance
File details
Details for the file netscanner-0.0.23-py2.py3-none-any.whl
.
File metadata
- Download URL: netscanner-0.0.23-py2.py3-none-any.whl
- Upload date:
- Size: 27.4 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.3.1 CPython/3.10.7 Linux/5.19.0-31-generic
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | bde85495bc76055080d9de42cf8df8f80f7c8fc984f523d67a0e86344f388f9e |
|
MD5 | 59d8bc37b22cce9cfd3ec26fc646eaab |
|
BLAKE2b-256 | 8e884ba3b3327397b4ef4384313369b07397725d28e6423abdeff31271410374 |