Smurf attack using c #

I am currently developing an application for the Network Security project, which includes launching a smurf attack using C #. A Smurf attack involves sending a packet to any server (say yahoo, google), but at your destination, specify the IP address of any victim (which the attacker wants to attack. Thus, all this sends the host (yahoo, google) response to the victim, if a large number of requests are sent, this can also cause a denial of service.The problem now is its implementation in C #, because C # does not allow u to change the packet header, if I use the TcpClient class I can provide an IP + port host to connect, but I can’t change anything the packet header (it automatically puts your address in the IP-packet destination), I just want to know that there is any way that I can access and modify the packet header ,?

Is there a library that can help me in this context?

+4
source share
2 answers

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

+2
source

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

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

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

+1
source

Source: https://habr.com/ru/post/1341443/


All Articles