Wednesday, August 6, 2014

Angry Smurfs. Distributed Denial-of-Service Attack

Today we've learned about network attacks. One of them was "Smurf Attack"

From Wiki:
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

On the lesson we writed a code in Python Scapy and I've done first:

from scapy.all import *
import sys

def send_packet(a):
def main():

   for i in a[0]:

if __name__ == '__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='',dst=[i[0].pdst for i in arping('')[0]])/ICMP()) 
Выкуси! :)


  1. Nice :))) work!!
    But you forgont insert the first line
    frome scapy.all import *

    P.S. Выкуси ! =]]
    P.S. Выкуси! :))

  2. читать научись :) interactive shell :)