Вопрос

I am currently developing an application for my Networks Security project, which involves launching of smurf attack using C#. Smurf attack includes that u send a packet to any server (let's say yahoo,google) but in your destination u place the ip address of any victim(which the attacker wants to attack . So with this all the host (yahoo ,google) sends response to the victim, if large number of requests are sent then it can also cause denial of service. Now the problem is implementing it in C#, because C# don't allow u to change the packet header, if i use the TcpClient class i can only give the IP + Port of the host to connect but i cannot change anything in the packet header (it automatically places your ip in the destination of the packet), i just want to know that is there any way that i can access and change the packet header,?

Is there any library which can help me in this context?

Это было полезно?

Решение

The Pcap.Net library allows you to construct your own packets through SendPacket(). The example in the second link shows you how to construct and send ICMP Echo packets.

Другие советы

It would seem that raw sockets are not supported by newer versions of Windows due to the potential of DOS'ing innocent victims: http://msdn.microsoft.com/en-us/library/ms740548(VS.85).aspx

If the OS allows it, you should be able to use raw sockets from C# to do so without any external libraries (of course, you will have to craft the IP header manually).

E.g. see here: http://bytes.com/topic/c-sharp/answers/249594-c-raw-sockets

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top