Skip to content

Instantly share code, notes, and snippets.

@amatus
Last active February 24, 2018 03:33
Show Gist options
  • Save amatus/45935a38157f25e1704e269cce06ff49 to your computer and use it in GitHub Desktop.
Save amatus/45935a38157f25e1704e269cce06ff49 to your computer and use it in GitHub Desktop.
Running SimpleHTTPServer on 80 as nobody
# You need the latest libcap2 code from git for --addamb
capsh --caps="cap_net_bind_service+eip cap_setpcap,cap_setuid,cap_setgid+ep" --keep=1 --user=nobody --addamb=cap_net_bind_service -- -c "/usr/bin/python -m SimpleHTTPServer 80"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment