Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why does ping work without administrator privileges?

as you may know one is unable to create RAW sockets using Windows Sockets without having administrative priviliges. The problem is, that I need to send ICMP messages, thus I need RAW sockets. The Problem: My program needs to run without administrative privileges.

That lead me to the question, how does the ping tool send ICMP messages w/o administrative privileges?

like image 296
dom0 Avatar asked Oct 07 '11 12:10

dom0


1 Answers

Although ICMP uses RAW sockets (which require admin rights on Win2K and later), Microsoft circumvents its own security rules to allow its ICMP APIs to get through. As such, don't use RAW sockets directly to send your own ICMP ping messages. Use IcmpSendEcho() and related functions instead.

like image 105
Remy Lebeau Avatar answered Oct 04 '22 18:10

Remy Lebeau