macOS Lets Regular User Process Bind to Privileged Ports


Recently, I learned that macOS allows a regular user process to bind to a privileged port.

To test this out, in one terminal, do:

$ nc -l 0.0.0.0 80

In a second terminal, talk to the process listening on port 80:

echo "hello world" | nc 127.0.0.1 80

The first terminal should now print:

hello world

Cool eh? Happy networking!


Licensed under CC BY Creative Commons License ~ ✉ torstein.k.johansen @ gmail ~ 🐘 @skybert@hachyderm.io ~ 🎥 youtube.com/@skybert