A lightweight, high-performance network port scanner optimized for macOS (Apple Silicon/Intel). This tool is designed to rapidly probe specific IP addresses and small ranges for open services without triggering system watchdogs.
- High-Speed Probing: Uses a synchronous TCP connect method with an aggressive 100ms timeout to ensure rapid execution.
- Structured Reporting: Generates dual-format output:
- Human-Readable: A clean, formatted summary in the terminal.
- Machine-Readable: A structured
scan_results.jsonfile for integration with other tools.
- Robust Logging: Integrated logging system providing
[INFO],STDOUT, and[ERROR]levels tostdoutandstderr. - macOS Optimized: Specifically configured to handle macOS networking stacks, including support for loopback (
127.0.0.1) and local interface discovery.
- Language: C++ (Standard 17)
- Build System: CMake
- Dependencies:
libpcap(via Homebrew),pkg-config
src/: Core implementation logic (Scanner Engine, Reporter, Logger).include/: Header files defining the application's interfaces.build/: Compiled binaries and build artifacts.scan_results.json: The output file containing the results of the most recent scan.
Ensure you have cmake and libpcap installed via Homebrew:
brew install cmake libpcap pkg-configTo build the project:
cd NetScannerMacOS/build
cmake ..
makeThe current PoC is configured to perform a high-speed scan of the loopback interface (127.0.0.1) across a defined port range (e.g., 1-1500) to detect certain local services.
Run the scanner:
./netscannerThe security of our network probes is a top priority. A recent security audit has identified several areas for improvement in the codebase.