Code Monkey home page Code Monkey logo

dnssearch's Introduction

dnssearch

This software is a subdomain enumeration tool.

baby-gopher

Purpose

dnssearch takes an input domain ( -domain parameter ) and a wordlist ( -wordlist parameter ), it will then perform concurrent DNS requests using the lines of the wordlist as sub domains eventually bruteforcing every sub domain available on the top level domain.

It supports a custom file extension ( -ext, default to php ) and other optional arguments:

Usage of ./dnssearch:
  -consumers int
        Number of concurrent consumers. (default 8)
  -domain string
        Base domain to start enumeration from.
  -wordlist string
        Wordlist file to use for enumeration. (default "names.txt")
  -a bool
        Lookup A records ( default true )
  -txt bool
        Lookup TXT records ( default false )
  -cname bool
        Show CNAME results ( default false )

Compilation

go get github.com/evilsocket/dnssearch
cd dnssearch
go build -o dnssearch main.go

Compilation and use with Docker

docker build -t dnssearch .
docker run -it --rm dnssearch

License

This project is copyleft of Simone Margaritelli and released under the GPL 3 license.

dnssearch's People

Contributors

avnercohen avatar davidwittman avatar evilsocket avatar infoslack avatar ucnt avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

dnssearch's Issues

building/dependencies

ok so i have cloned the tool and ran everything like i was supposed to and that im having trouble building it up. i run the commands but all i get are errors

Im running Parrot Os and its been recently updated.

Docker build error

Am I doing something wrong here? On macOS Sierra. Docke

adysan@adyNUC:~$ cd git
adysan@adyNUC:~/git$ git clone https://github.com/evilsocket/dnssearch.git
Cloning into 'dnssearch'...
remote: Counting objects: 22, done.
remote: Compressing objects: 100% (16/16), done.
remote: Total 22 (delta 8), reused 19 (delta 5), pack-reused 0
Unpacking objects: 100% (22/22), done.
Checking connectivity... done.
adysan@adyNUC:~/git$ cd dnssearch/
adysan@adyNUC:~/git/dnssearch$ docker build -t dnssearch .
Sending build context to Docker daemon 2.786 MB
Step 1/9 : FROM golang:1.8 as build-stage
Error parsing reference: "golang:1.8 as build-stage" is not a valid repository/tag: invalid reference format
adysan@adyNUC:~/git/dnssearch$ docker -v
Docker version 17.03.1-ce, build c6d412e

Issue in document.

Hey,

I just found little issue with documentation.

you have written.

go get github.com/evilsocket/dnssearch
cd dirsearch
go build -o dnssearch main.go

here cd dirsearch should be changed to cd dnssearch

Use ENTRYPOINT instead of CMD in Dockerfile

AWESOME work! Thanks!

Might be good to use ENTRYPOINT instead of CMD in the dockerfile. After build and run, as shown, below is what occurs:

docker run -it --rm dnssearch -domain google.com
docker: Error response from daemon: oci runtime error: container_linux.go:247: starting container process caused "exec: "-domain": executable file not found in $PATH".

When changed to 'ENTRYPOINT ["/app/dnssearch"]' the below commands work:

docker run -it --rm dnssearch -domain google.com

docker run -it --rm dnssearch -domain google.com -consumers 10

Handle wildcard DNS record

Q here. Some people would add a *.domain.com record, this will cause all tests to return true.

Is there a way to track these and ignore these hits?

I think this can be a nice added feature, but I'm not sure I know how to tell these records from the real ones.

Error when attempting to go build -o dnssearch main.go

When I attempt to go build -o dnssearch main.go I get the following:

main.go:18:2: cannot find package "github.com/evilsocket/brutemachine" in any of:
/snap/go/1473/src/github.com/evilsocket/brutemachine (from $GOROOT)
/home/broch/src/github.com/evilsocket/brutemachine (from $GOPATH)
main.go:19:2: cannot find package "github.com/fatih/color" in any of:
/snap/go/1473/src/github.com/fatih/color (from $GOROOT)
/home/broch/src/github.com/fatih/color (from $GOPATH)
/home/broch/src/github.com/bobesa/go-domain-util/domainutil/util.go:5:2: cannot find package "golang.org/x/net/idna" in any of:
/snap/go/1473/src/golang.org/x/net/idna (from $GOROOT)
/home/broch/src/golang.org/x/net/idna (from $GOPATH)

go env
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/broch/.cache/go-build"
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/broch"
GORACE=""
GOROOT="/snap/go/1473"
GOTMPDIR=""
GOTOOLDIR="/snap/go/1473/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build657428982=/tmp/go-build -gno-record-gcc-switches"

broch@broch-desktop
OS: Ubuntu 16.04 xenial
Kernel: x86_64 Linux 4.13.0-37-generic
Uptime: 3h 55m
Packages: 2904
Shell: bash 4.3.48
Resolution: 2560x1080
DE: Unity 7.4.5
WM: Compiz
WM Theme: Radiance
Radiance [GTK2]
, Radiance [GTK3]
Icon Theme: ubuntu-mono-light
Font: Ubuntu 11
CPU: AMD Ryzen 5 1600X Six-Core @ 4GHz
GPU: GeForce GTX 1050
RAM: 9729MiB / 16034MiB

Problem with dependencies

Get this when I try to build it:

 go get github.com/evilsocket/dnssearch
 # cd /home/sdaa/golang/src/github.com/bobesa/go-domain-util; git show-ref
 b0f58b2366836c2600dac855dc832a774fc19b6e refs/heads/master
 b0f58b2366836c2600dac855dc832a774fc19b6e refs/remotes/origin/HEAD
 b0f58b2366836c2600dac855dc832a774fc19b6e refs/remotes/origin/master
 package github.com/bobesa/go-domain-util/domainutil: read |0: interrupted system call

Save to a file

I think it will be great to have ability to save output to a file with csv or other structured extension

Dealing with wildcard enabled subdomain

Hello, great work, but i am not sure how it will deal with domains which have wildcard entry (*), enabled for subdomains, for those i see can dnssearch showing every result from names.txt which is not correct!

False positive CNAME Display

by design dnssearch display A record for every host, there is -cname option to display CNAME record of the host which is working good, but in case where subdomain don't have any CNAME record, as it have only A record, cname output still shows the cname entry same as A record, which making it unreliable.

eg:

test1.site.com : A [XX.169.9.87] : CNAME peproxyfeeu01.cloudapp.net.
et.site.com : A [XX.176.43.216] : CNAME et.trulia.com.

here et.site.com have only A record but still we can see same record in CNAME as well.

2nd request:

This is not an issue but by default displaying A record is enabled, and there is no option as well, so it will be good if users have option to display A record or not.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.