Closed defc0n closed 9 years ago
FWIW, I can of course issue a regular ping command from the command line just fine:
$ ping 127.0.0.1
PING 127.0.0.1 (127.0.0.1): 56 data bytes
64 bytes from 127.0.0.1: icmp_seq=0 ttl=64 time=0.044 ms
The reason /bin/ping works from regular users is SUID permission. It will not work if you make a copy: $ cp /bin/ping ~/ping; ~/ping google.com ping: icmp open socket: Operation not permitted
interesting, surprised i never knew or heard of this, thanks!
I'm on OS X Yosemite and trying to execute the following code:
When I attempt to run as normal user:
When I run as root:
Is there some socket options being set which require root privileges in the OS X kernel but do not in other kernels or something?