• Stars
    star
    107
  • Rank 316,467 (Top 7 %)
  • Language
    C
  • Created about 12 years ago
  • Updated almost 7 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

fork of http://code.google.com/p/dnsmap/source/checkout
INTRODUCTION

dnsmap was originally released back in 2006 and was inspired by the
fictional story "The Thief No One Saw" by Paul Craig, which can be found
in the book "Stealing the Network - How to 0wn the Box"

dnsmap is mainly meant to be used by pentesters during the information
gathering/enumeration phase of infrastructure security assessments. During the
enumeration stage, the security consultant would typically discover the target
company's IP netblocks, domain names, phone numbers, etc ...

Subdomain brute-forcing is another technique that should be used in the
enumeration stage, as it's especially useful when other domain enumeration
techniques such as zone transfers don't work (I rarely see zone transfers
being *publicly* allowed these days by the way).

If you are interested in researching stealth computer intrusion techniques,
I suggest reading this excellent (and fun) chapter which you can find for
*free* on the web:

http://www.ethicalhacker.net/content/view/45/2/

I'm happy to say that dnsmap was included in Backtrack 2, 3 and 4 and has
been reviewed by the community:

http://backtrack.offensive-security.com/index.php?title=Tools
http://www.networkworld.com/community/node/57543
http://forums.remote-exploit.org/tutorials-guides/12746-dnsmap-tutorial.html
http://www.linuxhaxor.net/2007/07/14/backtrack-2-information-gathering-all-dnsmap/
http://www.darknet.org.uk/2009/03/dnsmap-022-released-subdomain-bruteforcing-tool/


COMPILING

Compiling should be straightforward:

$ make

Or:

$ gcc -Wall dnsmap.c -o dnsmap


INSTALLATION

# make install

Or:

# cp ./dnsmap /usr/local/bin/dnsmap

If you wish to bruteforce several target domains in bulk fashion, you can use the
included dnsmap-bulk.sh script. Just copy the script to /usr/local/bin/ so you can 
call it from any location. e.g.:

# cp ./dnsmap-bulk.sh /usr/local/bin/

And set execute permissions. e.g.:

# chmod ugo+x /usr/local/bin/dnsmap-bulk.sh


LIMITATIONS

Lack of multi-threading. This speed issue will hopefully be resolved in future versions.


FUN THINGS THAT CAN HAPPEN

1. Finding interesting remote access servers (e.g.: https://extranet.targetdomain.com)

2. Finding badly configured and/or unpatched servers (e.g.: test.targetdomain.com)

3. Finding new domain names which will allow you to map non-obvious/hard-to-find netblocks
   of your target organization (registry lookups - aka whois is your friend)

4. Sometimes you find that some bruteforced subdomains resolve to internal IP addresses
   (RFC 1918). This is great as sometimes they are real up-to-date "A" records which means
   that it *is* possible to enumerate internal servers of a target organization from the
   Internet by only using standard DNS resolving (as oppossed to zone transfers for instance).

5. Discover embedded devices configured using Dynamic DNS services (e.g.: linksys-cam.com).
   This method is an alternative to finding devices via Google hacking techniques

USAGE

Bruteforcing can be done either with dnsmap's built-in wordlist or a user-supplied wordlist.
Results can be saved in CSV and human-readable format for further processing. dnsmap does
NOT require root privileges to be run, and should NOT be run with such privileges for
security reasons.

The usage syntax can be obtained by simply running dnsmap without any parameters:

$ ./dnsmap

dnsmap 0.30 - DNS Network Mapper by pagvac (gnucitizen.org)

usage: dnsmap <target-domain> [options]
options:
-w <wordlist-file>
-r <regular-results-file>
-c <csv-results-file>
-d <delay-millisecs>
-i <ips-to-ignore> (useful if you're obtaining false positives)

Note: delay value is a maximum random value. e.g.: if you enter 1000, each DNS request
will be delayed a *maximum* of 1 second. By default, dnsmap uses a value of 10 milliseconds
of maximum delay between DNS lookups


EXAMPLES
Subdomain bruteforcing using dnsmap's built-in word-list:

$ ./dnsmap targetdomain.foo

Subdomain bruteforcing using a user-supplied wordlist:

$ ./dnsmap targetdomain.foo -w wordlist.txt

Subdomain bruteforcing using the built-in wordlist and saving the results to /tmp/ :

$ ./dnsmap targetdomain.foo -r /tmp/

Since no filename was provided in the previous example, but rather only a path, dnsmap would
create an unique filename which includes the current timestamp. e.g.:
/tmp/dnsmap_targetdomain_foo_2009_12_15_234953.txt

Example of subdomain bruteforcing using the built-in wordlist, saving the results to /tmp/,
and waiting a random maximum of 3 milliseconds between each request:

$ ./dnsmap targetdomain.foo -r /tmp/ -d 300

It is recommended to use the -d (delay in milliseconds) option in cases where dnsmap is
interfering with your online experience. i.e.: killing your bandwidth

Subdomain bruteforcing with 0.8 seconds delay, saving results in regular and CSV format,
filtering 2 user-provided IP and using a user-supplied wordlist:

$ ./dnsmap targetdomain.foo -d 800 -r /tmp/ -c /tmp/ -i 10.55.206.154,10.55.24.100 -w ./wordlist_TLAs.txt

For bruteforcing a list of target domains in a bulk fashion use the bash script provided. e.g.:

$ ./dnsmap-bulk.sh domains.txt /tmp/results/


WORDLISTS

http://packetstormsecurity.org/Crackers/wordlists/dictionaries/
http://www.cotse.com/tools/wordlists1.htm
http://wordlist.sourceforge.net/


OTHER SIMILAR TOOLS - choice is freedom!

WS-DNS-BFX
http://ws.hackaholic.org/tools/WS-DNS-BFX.tgz

DNSDigger
http://www.ernw.de/download/dnsdigger.zip

Fierce Domain Scan
http://ha.ckers.org/fierce/

Desperate
http://www.sensepost.com/research_misc.html

DNSenum
http://dnsenum.googlecode.com/files/dnsenum1.2.tar.gz

ReverseRaider
http://complemento.sourceforge.net/

Knock
http://knock.gianniamato.it/


--
pagvac | GNUCITIZEN.org
Feb 2010

More Repositories

1

prison-break

Free yourself from the chains of having to acknowledging Terms of Service (AGBs) every time you connect to a captive portal
HTML
34
star
2

pyncp

python port of ncp ( npush / npoll )
Python
22
star
3

keyboard-passthrough

32u4 USB Keyboard Passthrough Firmware and sample Python script
Python
10
star
4

magnets

crawls funny pictures from various websites via node.js
JavaScript
9
star
5

energydb

Energy Drink Database and Website Generator for all the Energy Drinks in the World!
JavaScript
8
star
6

tiddly_store

php store script for tiddlywiki
PHP
7
star
7

nixos-config

nix configuration for all hosts, previously part of stockholm
Nix
6
star
8

tw-upload-plugin

restricted version of original store.php tiddly wiki upload plugin
PHP
5
star
9

ukrepl

transforms your totally fine ascii text to utf-8 "special" text
Python
5
star
10

hydra-example

example release.nix for hydra
Nix
4
star
11

wr703_mod

Howto Upgrade WR703n with more ram and more flash
Python
4
star
12

skytraq-datalogger

configuration and download tool for GPS data loggers based on Skytraq Venus 5 and 6 chipsets
C
4
star
13

jsonpath

a simple command line wrapper for jsonpath_rw
Python
3
star
14

ali-orders

brain dump of non-funct aliexpress login and order dumper.
JavaScript
3
star
15

rc3-map-scraper

Map Scraper for the rC3 2021
Python
3
star
16

gxfr

Fork of http://ptscripts.googlecode.com/svn/trunk/gxfr.py
Python
3
star
17

minikrebs

Openwrt Profile Builder
Shell
3
star
18

dpfhack_pearl

"Works for me" repo for the dpf-hack of the pearl picture frame and lcd4linux
C
3
star
19

ROC-RK3399-PC-overlay

Nix
2
star
20

nur-packages

filtered nur-packages from stockholm
Nix
2
star
21

weather2stats

push different weather data into graphite
Python
2
star
22

rgbcubes

rgb cubes
Lua
2
star
23

tinc_graphs

pypi tinc_graphs code
Python
2
star
24

collectd-connect-time

a plugin for measuring the connect time to a host:port
Python
2
star
25

tag-generator

Die Projekte des Shacks sollen getaggt werden
Python
2
star
26

events-publisher

shackspace events publisher
Python
1
star
27

archive_bookmarks

saves and archives your (chrome) bookmarks
Nix
1
star
28

luftdaten2graphite

archive.luftdaten.info --> graphite
Python
1
star
29

aralast

Shell
1
star
30

SmartestHome

the smallest smart home
Lua
1
star
31

try_git

1
star
32

Multichaos

Multicast client with various features
Python
1
star
33

esp-coap-srv

a simple coap pin controller utilizing nodemcu with esp8266
Lua
1
star
34

hp_job_enum

Enumerates Print Jobs from HP MFPs via SNMP
Perl
1
star
35

Proxypedia

PPPs, PPPc and PPP
1
star
36

bump

a minimal self-hosted sprunge.us replacement
Python
1
star
37

cameraupload-server

server side for cameraupload_full
Python
1
star
38

Statser

a multiplatform Statistics collector written in python
Python
1
star
39

chatbotchat

let chatbots chat with each other
Python
1
star
40

shack-retiolum

Retiolum tinc script repository
Shell
1
star
41

deepsleep-button

esp8266 button with deepsleep and ArduinoOTA for infinite battery life
C++
1
star
42

nightfire

fork of darkb0t v0.4
Python
1
star
43

mycube-flask

flask app for mycube
Shell
1
star
44

shackiso

shack automated installation
Nix
1
star