Re: Sending raw sockets without administrative privileges?
From: Dominick Baier [DevelopMentor] (dbaier_at_pleasepleasenospamdevelop.com)
Date: 09/13/05
- Next message: Christian Jacob: "Re: Sending raw sockets without administrative privileges?"
- Previous message: Tim Wallace: "Re: RSACryptoServiceProvider"
- Next in thread: Christian Jacob: "Re: Sending raw sockets without administrative privileges?"
- Reply: Christian Jacob: "Re: Sending raw sockets without administrative privileges?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Tue, 13 Sep 2005 00:56:07 -0700
Hello Christian Jacob cjacob AT nospam toptechnologies DOT de,
under which operating system are you running? I am surprised that this works
at all, as sending raw sockets on XP SP2 and W2K3 SP1 should be disabled
by now (but maybe not for ICMP...)
SocketPermission is a Code Access Security class and has nothing to do with
OS level privileges.
If you can upgrade to .NET 2.0 - there is an easy solution :)
using System.Net.NetworkInformation;
PingReply reply = new Ping().Send(args[0]);
Console.WriteLine("Reply from {0} - Roundtrip Time {1} ms", reply.Address,
reply.RoundTripTime);
---------------------------------------
Dominick Baier - DevelopMentor
http://www.leastprivilege.com
> Although I already have an own implementation for pinging remote
> hosts, I encountered problems which I hoped others may have already
> solved.
>
> The thing is, that all sources I found (including my own) use raw
> sockets to send ICMP echo requests. A user without administrative
> privileges does not have the permissions to create raw sockets though.
> This is why it simply does not work with user permissions. Here is an
> example from Microsoft: http://support.microsoft.com/kb/828993/en-us
>
> I thought maybe the SocketPermission class might help. But it seems
> that it is only capable of allowing TCP and UDP connections, not ICMP.
>
> Does anyone have a solution for this?
>
> Best regards,
> Christian Jacob.
- Next message: Christian Jacob: "Re: Sending raw sockets without administrative privileges?"
- Previous message: Tim Wallace: "Re: RSACryptoServiceProvider"
- Next in thread: Christian Jacob: "Re: Sending raw sockets without administrative privileges?"
- Reply: Christian Jacob: "Re: Sending raw sockets without administrative privileges?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|