December 2017
Intermediate to advanced
410 pages
11h 5m
English
Whenever we run the ping command, internally, it needs to open a lot of sockets to send IP packets and receive IP packets from the remote server. This functionality is allowed only for the root user. So, ideally, when an ordinary user runs the command, it should fail.
However, the owner and the group of ping binary is root.root, and it has an SUID bit set. Thus, whoever runs the particular binary, the ping program will inherit the permission of the owner of the binary file that is root instead of the user running it.
This can be explained in terms of a diagram:

Read now
Unlock full access