Author Topic: DNSInjector - DNS injection project [C]  (Read 3121 times)

0 Members and 1 Guest are viewing this topic.

Offline Quetuo

  • NULL
  • Posts: 2
  • Cookies: 1
    • View Profile
    • Quetuo.net
DNSInjector - DNS injection project [C]
« on: July 11, 2011, 12:10:19 am »
DNSInjector V0.2.1
By Quetuo

A live DNS injection tool for local networks


DNSInjector allows live DNS injection / spoofing on a local network. It listens for DNS requests from devices on the network then before the remote server can respond, spoofs a response with a false IP. The real response is simply ignored thanks to the lack of security in the domain name system. You can redirect people to malicious servers if you so wish, proxy their requests and steal their information etc. Bear in mind that this is a work in progress and many features will be added soon!


Code: [Select]
Usage: DNSInjector [-hv] [--verbosity=<N>] [--interface=<INTERFACE>] [--ip=<IP>] [--script=<FILE>] [--target=<IP>]...
  -h, -H, --help            print this help information and exit
  -v, -V, --verbosity       increase the verbosity
  --verbosity=<N>           set the verbosity
  --interface=<INTERFACE>   set the interface to listen on
  --ip=<IP>                 set the false IP to spoof
  --script=<FILE>           Lua script file
  --target=<IP>             target IPs
Run a spoofing DNS server on the local machine to respond to all DNS requests with a false IP


Example;
Code: [Select]
sudo ./DNSInjector --interface=wlan0 --ip=192.168.2.8

Note that DNSInjector should be run as root (sudo) and is Linux-only at the moment.


Scripting
You can include Lua scripts with the --script option. Define a function of the prototype
Code: [Select]
function callback (source, dest, address)and this will be called whenever a DNS request is identified. Return "NULL" if no IP is to be spoofed, or the IP as a string if it is. For example;
Code: [Select]
-- This is an example DNSInjector Lua script


function callback (source, dest, address)
   if address == "facebook.com" then
      return "192.168.2.1"
   end
   if address == "www.facebook.com" then
      return "192.168.2.1"
   end
   return "NULL"
end


If you've got any questions, find any bugs or want to request a feature, please PM me or post here!


TODO list
 - Selective spoofing filters


Download (source)
(MD5 hash: 114b9264aa5e17dd67a2015dfedf6c70)
« Last Edit: July 11, 2011, 12:42:43 am by Quetuo »

Offline Mellow

  • Knight
  • **
  • Posts: 151
  • Cookies: -24
    • View Profile
Re: DNSInjector - DNS injection project [C]
« Reply #1 on: July 11, 2011, 01:21:43 am »
Funny, I was actually thinking up a program like this one while working. Maybe I'm just psychic

Offline Stackprotector

  • Administrator
  • Titan
  • *
  • Posts: 2515
  • Cookies: 205
    • View Profile
Re: DNSInjector - DNS injection project [C]
« Reply #2 on: July 11, 2011, 11:57:42 am »
Great work quetuo :D
~Factionwars