hn.today

The Port That Does Not Exist

acid.vegas11 points3 comments
Screenshot of The Port That Does Not Exist

Port 0 is reserved, not prohibited by the TCP wire format. Its familiar meaning comes from the sockets API: asking an operating system to bind to port 0 requests an available ephemeral port, rather than port 0 itself. On Linux, server sockets assigned an automatic port receive odd-numbered ports, while outgoing connections favor even ones. Ordinary clients and browsers also reject port 0, and Linux can misreport a genuine connection to it as disconnected, breaking some TLS code. A firewall rule can nevertheless redirect traffic arriving on port 0 to a normal listening port; this setup was used to expose an IRC server there.

A raw-packet scan of IPv4 found 1,173,626 addresses answering SYNs to port 0, but many responses came from network-edge devices replying for entire address blocks. Of 56,951 addresses that sent data, 94% were F5 load balancers reporting connection errors; only about 2,905 appeared to host actual services. These included SSH, databases, telnet, web interfaces, FTP, mail, cameras, and other familiar services, often on embedded devices such as routers, NAS units, DVRs, and power equipment. Repeated device fingerprints across ISP networks suggest that some port-zero exposure may result from faulty port-forwarding or customer-premises equipment configurations. The scan also found individual hosting customers and sensitive systems, including router interfaces and an unauthenticated mobile-router status page revealing network details.

Read on acid.vegas3 comments on Hacker News

Summary generated by AI from the linked article. hn.today is not affiliated with Hacker News or Y Combinator.

More in Security

The daily digest

Today's best Hacker News stories, summarized and screenshotted, one email a day.