proone-recon
Standalone tool for testing the Recon (reconnaissance) worker functionality.Overview
proone-recon runs the Recon worker independently to discover hosts with open ports on specified networks. It’s useful for testing network configurations and port scanning.Usage
Arguments
<conf>: Path to configuration file (use-to read from stdin)<port>: One or more TCP ports to scan (required)
Configuration Format
The configuration file specifies target networks and blacklists:<ENTRY SPEC>:Tfor target orBLfor blacklist<NET SPEC>:<IPv4 or IPv6 Address>/<CIDR>
- Parsed case-insensitively
- Lines starting with
#are ignored as comments - Empty lines are ignored
Example Configuration
Operation
The tool:- Generates random IP addresses within target networks
- Sends fabricated TCP SYN packets to specified ports
- Listens for SYN+ACK responses
- Outputs discovered endpoints to stdout
- Excludes blacklisted networks
Discovery Methods
IPv4: Sends TCP SYN packets directly IPv6: Two-phase discovery- Multicasts ICMPv6 ECHO with bogus DSTOPT (0x9e)
- Nodes respond with ICMPv6 type 4, code 2 (parameter problem)
- Sends TCP SYN to confirm port is open
Output Format
Discovered endpoints are printed to stdout:Signal Handling
The tool runs until terminated with:SIGTERMSIGINT(Ctrl+C)
Raw Sockets
The Recon worker creates 4 raw sockets:- IPv4 send socket
- IPv4 receive socket
- IPv6 send socket
- IPv6 receive socket
CAP_NET_RAW)
Timing
- One iteration cycle: ~1 second ± jitter
- Effectively a 1-second timeout for SYN+ACK responses
- Packets from previous cycles are ignored
Signature Mechanism
Each cycle generates unique signatures in SYN packets:- Allows distinguishing responses from background traffic
- Kernel automatically sends RST to unrecognized SYN+ACK packets
Link-Local Discovery
For IPv6 link-local networks:- Uses link-local addresses from network interfaces
- Requires scope IDs for correct operation
- Platform-specific APIs query interface addresses
Exit Codes
| Code | Description |
|---|---|
| 0 | Success (clean shutdown) |
| 1 | Runtime error |
| 2 | Configuration error |
Example Usage
Source
Location:src/proone-recon.c
Sample configuration: src/data/recon.sample.conf