Port Scanning
Port scanning is the name given to the process of discovering open ports on a remote host. In this article, you’ll explore the design and implementation of a basic port scanner written in Rust. Starting with a Ping Utilities with port scanning capabilities often start by sending a ping to the target. For example, nmap pings the target before scanning. This ensures the target is reachable. To send a ping or an ICMP packet, you need to create a raw socket which requires the CAP_NET_RAW capability. A regular user doesn’t have CAP_NET_RAW capability meaning a ping requires sudo or elevated privileges. Luckily, modern Linux provides unpriviledged ping. The unpriviledged ping uses a dgram socket rather than a raw socket. ...