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!


~ /home 🏠 ~ talks 💬 ~ bash ~ craftsmanship ~ db ~ dongxi ~ emacs ~ escenic ~ iam ~ java ~ js ~ language ~ latex ~ ldap ~ life ~ linux ~ llm ~ mac-os-x ~ mt-foo ~ network ~ norsk ~ python ~ quotes ~ running ~ security ~ travel ~ unix ~ various ~ vcs ~ webdesign ~ windows ~ discoveries ~ cv 🧙 ~

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