Ping without RAW Sockets

  • Thread starter Thread starter Vlad
  • Start date Start date
Hi Vlad,

Thanks for posting in the community.

First of all, I would like to confirm my understanding of your issue.
From your description, I understand that you wants to implement the ping
utility for non-admin account.
Have I fully understood you? If there is anything I misunderstood, please
feel free to let me know.

I think you may try to use the IcmpSendEcho from icmp.dll.

Here are some KB articles you may take a look.

INFO: Implementing Internet Pings Using Icmp.dll
http://support.microsoft.com/?id=170591

HOW TO: Ping an IP Address with Visual Basic by Using ICMP
http://support.microsoft.com/?id=300197


Also,

You can use this registry key on win2k to allow non-administrative use of
RAW sockets. On winNT you can use the registry key mentioned in the article
195445( you refer to in your last post)

AllowUserRawAccess
Key: Tcpip\Parameters
Value Type: REG_DWORD-Boolean
Valid Range: 0, 1 (False, True)
Default: 0 (False)
Description: This parameter controls access to raw sockets. If true, non -
administrative users have access to raw sockets. By default, only
administrators have access to raw sockets. For more information on raw
sockets, see the Windows Sockets Specifications, available from
ftp://ftp.microsoft.com/bussys/winsock/winsock2.

Please apply my suggestion above and let me know if it helps resolve your
problem.

Best regards,

Peter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
 
Peter,

Thanks for your reply. I was aware that there is an ICMP.dll that I could
use, however it is deptricated.
In light of that what should I do short of allowing the use of RAW sockets
through the registry?
Can the icmp.dll source be re-written in c#? If so where can I get the
source?
Thanks!
 
Hi Vald,

Thanks for your quickly reply!

If we enabled the rawsocket permission to all user will use rawsocket which
cause security problem.

As for the icmp.dll, I am sorry that the source is not public we can not
provide it for the customer.

Also I think you may try to use the IcmpSendEcho api, which need to OS to
be windows 2000 and above. For detailed information take a look at the link
below.

IcmpSendEcho
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/iphlp/iphlp
/icmpsendecho.asp

Here is sample.
C# Ping - Interoping to IcmpSendEcho
http://www.rentamidget.com/archives/000029.html

If you still have any concern on this issue, please post here.

Best regards,

Peter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.
 
Back
Top