#837·zmap

Expand "List of IPs" Functionality to Support "List of IPs and Ports"

Author: zakirdCreated Mar 22, 2024Updated Jan 19, 2025

ZMap has functionality to scan a very large number of IP addresses by iterating over the full 32-bit address space and looking up whether specific IPs have been whitelisted:

-I, --list-of-ips-file=path   List of individual addresses to scan in random order. 
                              Use --allowlist-file unless >1 million. IPs

However, it would also potentially be useful to efficiently L4 scan a large number of (IP, Port) tuples similar to a list of IPs. For example, if you have large list of services on the Internet that you want to check if is still present. It's not immediately obvious to me the right way to do this. We can't use a bitmap like we do for the IPv4 address space and iterating over 2^48 is NOT a fast operation. Part of me wonders if our blacklist data structure should be extended to support both IPs and Ports, but I need to think about it more. That would be a non-negligible restructure.