Skip to content

karanveer-lca/NetHawk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NetHawk Documentation

image

NetHawk is a powerful network reconnaissance multi-tool built in Python that provides various capabilities for network analysis and monitoring in Windows. This tool combines multiple network investigation features into a single, user-friendly interface.

Directory Structure

NetHawk/
├── README.md
├── banner.txt
├── main.py
├── network_recon.py
├── packet_sniffer.py
└── packet_log.txt (generated when logging is enabled)

Features

  • WiFi Network Scanning
  • Network Device Discovery (ARP Scanning)
  • Packet Sniffing and Analysis
  • MAC Address Vendor Lookup
  • Hostname Resolution
  • MAC Address Discovery
  • Packet Logging Capabilities

Dependencies

The following Python packages are required:

  • colorama
  • python-nmap
  • scapy
  • requests
  • tabulate
  • pyshark

Installation

  1. Clone the repository:
git clone https://github.com/yourusername/NetHawk.git
cd NetHawk
  1. Install the required dependencies:
pip install colorama python-nmap scapy requests tabulate pyshark

Module Details

main.py

The main entry point of the application that provides:

  • Interactive command-line interface
  • ASCII art banner display
  • Menu-driven operation
  • Function routing to appropriate modules

Key functions:

  • print_header(): Displays formatted section headers
  • loading_animation(): Shows a loading animation during operations
  • run_wifi_function(): Executes WiFi-related functions
  • run_sniff_function(): Executes packet sniffing functions

network_recon.py

Contains the WifiRecon class that handles network reconnaissance operations:

Key features:

  • WiFi network scanning (Windows systems)
  • Local network device discovery
  • MAC address vendor lookup via API
  • Hostname resolution using multiple methods
  • ARP-based network scanning

Notable methods:

  • scan_wifi(): Scans and displays available WiFi networks
  • scan_network(): Performs network device discovery
  • get_vendor(): Retrieves vendor information for MAC addresses
  • get_hostname(): Resolves IP addresses to hostnames
  • get_mac_address(): Discovers MAC addresses for IP addresses

packet_sniffer.py

Implements the PacketSniffer class for network packet capture and analysis:

Key features:

  • Real-time packet capture
  • Configurable interface selection
  • Packet filtering support
  • Raw packet inspection
  • Packet logging to file

Notable methods:

  • start_pkt_capture(): Initiates packet capture
  • process_packet(): Handles captured packet analysis
  • log_packet(): Records packet information to file

Usage Guide

Starting the Application

Run the main script:

python main.py

Menu Options

  1. Scan Nearby Wi-Fi (Option 1)

    • Displays available WiFi networks
    • Shows SSID, BSSID, signal strength, security type, frequency, and channel
  2. ARP Scan Connected Clients (Option 2)

    • Scans local network for active devices
    • Displays IP address, hostname, MAC address, and vendor information
  3. Sniff Network Packets (Option 3)

    • Captures and displays network traffic
    • Options:
      • Raw packet display
      • Custom packet filtering
      • Packet logging to file
  4. Get Vendor Name (Option 4)

    • Looks up vendor information for a MAC address
    • Uses online MAC address lookup API
  5. Get Hostname (Option 5)

    • Resolves IP addresses to hostnames
    • Uses multiple resolution methods
  6. Get MAC Address (Option 6)

    • Discovers MAC address for an IP address
    • Uses ARP requests for discovery

Additional Commands

  • clear: Clears the screen and refreshes the banner
  • x: Exits the application

Logging

When enabled, packet logging creates a packet_log.txt file containing:

  • Timestamp
  • Source IP
  • Destination IP
  • Protocol information
  • Packet length

Notes

  • Some features require administrative/root privileges
  • WiFi scanning functionality is Windows-specific
  • Network interface names may vary by operating system
  • MAC vendor lookup requires internet connectivity

Error Handling

The application includes comprehensive error handling for:

  • Network connectivity issues
  • Invalid input parameters
  • Permission-related errors
  • API timeout/connection failures

Security Considerations

  • Use responsibly and only on networks you own or have permission to analyze
  • Be aware of local laws and regulations regarding network monitoring
  • Handle captured data securely and responsibly

Contributing

When contributing to this project:

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Submit a pull request

License

MIT License Copyright (c) 2025 KRNXMID

About

A Multi-tool for Network Recon (Reconnaissance)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages