dns.spoof
Replies to DNS queries with spoofed responses.
Commands
Section titled “Commands”dns.spoof on
Section titled “dns.spoof on”Start the DNS spoofer in the background.
dns.spoof off
Section titled “dns.spoof off”Stop the DNS spoofer.
Parameters
Section titled “Parameters”| Parameter | Default | Description |
|---|---|---|
dns.spoof.address | <interface address> | IP address to map the domains to. |
dns.spoof.all | false | If true, replies to every DNS request. Otherwise, only replies to requests targeting local PC. |
dns.spoof.domains | Comma separated values of domain names to spoof. | |
dns.spoof.hosts | If not empty, this hosts file will be used to map domains to IP addresses. | |
dns.spoof.ttl | 1024 | TTL of spoofed DNS replies. |
Examples
Section titled “Examples”Every DNS request coming to this computer for the example.com domain will resolve to the address 1.2.3.4:
set dns.spoof.domains example.com; set dns.spoof.address 1.2.3.4; dns.spoof onUse a hosts file instead of the dns.spoof.* parameters for multiple mappings:
!cat ./dns.spoof.hosts# Output:1.2.3.4 facebook.com1.2.3.5 cnn.com1.2.4.6 www.google.com
set dns.spoof.hosts ./dns.spoof.hosts; dns.spoof on