.\" Automatically generated by Pod::Man 4.11 (Pod::Simple 3.35) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). .\" Fear. Run. Save yourself. No user-serviceable parts. . \" fudge factors for nroff and troff .if n \{\ . ds #H 0 . ds #V .8m . ds #F .3m . ds #[ \f1 . ds #] \fP .\} .if t \{\ . ds #H ((1u-(\\\\n(.fu%2u))*.13m) . ds #V .6m . ds #F 0 . ds #[ \& . ds #] \& .\} . \" simple accents for nroff and troff .if n \{\ . ds ' \& . ds ` \& . ds ^ \& . ds , \& . ds ~ ~ . ds / .\} .if t \{\ . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' .\} . \" troff and (daisy-wheel) nroff accents .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' .ds 8 \h'\*(#H'\(*b\h'-\*(#H' .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] .ds ae a\h'-(\w'a'u*4/10)'e .ds Ae A\h'-(\w'A'u*4/10)'E . \" corrections for vroff .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' . \" for low resolution devices (crt and lpr) .if \n(.H>23 .if \n(.V>19 \ \{\ . ds : e . ds 8 ss . ds o a . ds d- d\h'-1'\(ga . ds D- D\h'-1'\(hy . ds th \o'bp' . ds Th \o'LP' . ds ae ae . ds Ae AE .\} .rm #[ #] #H #V #F C .\" ======================================================================== .\" .IX Title "DNSENUM 1" .TH DNSENUM 1 "2019-10-24" "perl v5.30.0" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" dnsenum \-\- multithread script to enumerate information on a domain and to discover non\-contiguous IP blocks .SH "VERSION" .IX Header "VERSION" dnsenum version 1.2.6 .SH "SYNOPSIS" .IX Header "SYNOPSIS" dnsenum [options] \-f dns.txt .SH "DESCRIPTION" .IX Header "DESCRIPTION" Supported operations: nslookup, zonetransfer, google scraping, domain brute force (support also recursion), whois ip and reverse lookups. .PP Operations: .IP "\(bu" 5 1) Get the host's address (A record). .IP "\(bu" 5 2) Get the nameservers (threaded). .IP "\(bu" 5 3) Get the \s-1MX\s0 record (threaded). .IP "\(bu" 5 4) Perform \s-1AXFR\s0 queries on nameservers (threaded). .IP "\(bu" 5 5) Get extra names and subdomains via google scraping (google query = \*(L"allinurl: \-www site:domain\*(R"). .IP "\(bu" 5 6) Brute force subdomains from (\s-1REQUIRED\s0), can also perform recursion on subdomain that have \s-1NS\s0 records (all threaded). .IP "\(bu" 5 7) Calculate Class C \s-1IP\s0 network ranges from the results and perform whois queries on them (threaded). .IP "\(bu" 5 8) Perform reverse lookups on netranges (class C or/and whois netranges)(threaded). .IP "\(bu" 5 9) Write to domain_ips.txt file non-contiguous ip-blocks results. .SH "OPTIONS" .IX Header "OPTIONS" The brute force \-f switch takes priority over default dns.txt .SS "\s-1GENERAL OPTIONS:\s0" .IX Subsection "GENERAL OPTIONS:" .RS 4 .IP "\fB\-\-dnsserver\fR \fB" 30 .IX Item "--dnsserver " Use this \s-1DNS\s0 server to perform all A, \s-1NS\s0 and \s-1MX\s0 queries, the \s-1AXFR\s0 and \s-1PTR\s0 queries are sent to the domain's \s-1NS\s0 servers. .IP "\fB\-\-enum\fR" 30 .IX Item "--enum" Shortcut option equivalent to \-\-threads 5 \-s 20 \-w. .IP "\fB\-h\fR, \fB\-\-help\fR" 30 .IX Item "-h, --help" Print the help message. .IP "\fB\-\-noreverse\fR" 30 .IX Item "--noreverse" Skip the reverse lookup operations. Reverse lookups can take long time on big netranges. .IP "\fB\-\-nocolor\fR" 30 .IX Item "--nocolor" Disable ANSIColor output. This option is only intended to be used on consoles that do not support color output. .IP "\fB\-\-private\fR" 30 .IX Item "--private" Show and save private ips at the end of the file domain_ips.txt. .IP "\fB\-\-subfile\fR \fB" 30 .IX Item "--subfile " Write all valid subdomains to this file. Subdomains are taken from \s-1NS\s0 and \s-1MX\s0 records, zonetransfer, google scraping, brute force and reverse lookup hostnames. .IP "\fB\-t\fR, \fB\-\-timeout\fR \fB" 30 .IX Item "-t, --timeout " The tcp and udp timeout values in seconds (default: 10s). .IP "\fB\-\-threads\fR \fB" 30 .IX Item "--threads " The number of threads that will perform different queries. .IP "\fB\-v\fR, \fB\-\-verbose\fR" 30 .IX Item "-v, --verbose" Be verbose (show all the progress and all the error messages). .RE .RS 4 .RE .Sp .RS 3 \&\fBNotes:\fR neither the default domain nor the resolver search list are appended to domains that don't contain any dots. .RE .SS "\s-1GOOGLE SCRAPING OPTIONS:\s0" .IX Subsection "GOOGLE SCRAPING OPTIONS:" .RS 3 This function will scrap subdomains from google search, using query: allinurl: \-www site:domain. .RE .RS 4 .IP "\fB\-p\fR, \fB\-\-pages\fR \fB" 30 .IX Item "-p, --pages " The number of google search pages to process when scraping names, the \-s switch must be specified, (default: 20 pages). .IP "\fB\-s\fR, \fB\-\-scrap\fR \fB" 30 .IX Item "-s, --scrap " The maximum number of subdomains that will be scraped from google. .RE .RS 4 .RE .Sp .RS 3 \&\fB\s-1NOTES:\s0\fR Google can block our queries with the malware detection. Http proxy options for google scraping are automatically loaded from the environment if the vars http_proxy or \s-1HTTP_PROXY\s0 are present. \&\*(L"http_proxy=http://127.0.0.1:8118/\*(R" or \*(L"HTTP_PROXY=http://127.0.0.1:8118/\*(R". On \s-1IO\s0 errors the mechanize browser object will automatically call die. .RE .SS "\s-1BRUTE FORCE OPTIONS:\s0" .IX Subsection "BRUTE FORCE OPTIONS:" .RS 4 .IP "\fB\-f\fR, \fB\-\-file\fR \fB" 30 .IX Item "-f, --file " Read subdomains from this file to perform brute force. .IP "\fB\-u\fR, \fB\-\-update\fR \fB" 30 .IX Item "-u, --update " Update the file specified with the \-f switch with valid subdomains. .RE .RS 4 .RE .Sp .RS 35 \&\fB\-u\fR a Update using all results. .Sp \&\fB\-u\fR g Update using only google scraping results. .Sp \&\fB\-u\fR r Update using only reverse lookup results. .Sp \&\fB\-u\fR z Update using only zonetransfer results. .RE .RS 4 .IP "\fB\-r\fR, \fB\-\-recursion\fR" 30 .IX Item "-r, --recursion" Recursion on subdomains, brute force all discovered subdomains that have an \s-1NS\s0 record. .RE .RS 4 .RE .Sp .RS 3 \&\fB\s-1NOTES:\s0\fR To perform recursion first we must check previous subdomains results (zonetransfer, google scraping and brute force) for \s-1NS\s0 records after that we perform brute force on valid subdomains that have \s-1NS\s0 records and so on. \s-1NS, MX\s0 and reverse lookup results are not concerned. .RE .SS "\s-1WHOIS IP OPTIONS:\s0" .IX Subsection "WHOIS IP OPTIONS:" Perform whois ip queries on c class netanges discovered from previous operations. .RS 4 .IP "\fB\-d\fR, \fB\-\-delay\fR \fB" 30 .IX Item "-d, --delay " The maximum value of seconds to wait between whois queries, the value is defined randomly, (default: 3s). .RE .RS 4 .RE .Sp .RS 3 \&\fB\s-1NOTES:\s0\fR whois servers will limit the number of connections. .RE .RS 4 .IP "\fB\-w\fR, \fB\-\-whois\fR" 30 .IX Item "-w, --whois" Perform the whois queries on c class network ranges. \fBWarning\fR: this can generate very large netranges and it will take lot of time to perform reverse lookups. .RE .RS 4 .RE .Sp .RS 3 \&\fB\s-1NOTES:\s0\fR The whois query should recursively query the various whois providers until it gets the more detailed information including either TechPhone or OrgTechPhone by default. See: perldoc Net::Whois::IP. On errors the netrange will be a default c class /24. .RE .SS "\s-1REVERSE LOOKUP OPTIONS:\s0" .IX Subsection "REVERSE LOOKUP OPTIONS:" .RS 4 .IP "\fB\-e\fR, \fB\-\-exclude\fR \fB" 30 .IX Item "-e, --exclude " Exclude \s-1PTR\s0 records that match the regexp expression from reverse lookup results, useful on invalid hostnames. .RE .RS 4 .RE .Sp .RS 3 \&\fB\s-1NOTES:\s0\fR \&\s-1PTR\s0 records that not match the domain are also excluded. Verbose mode will show all results. .RE .SH "OUTPUT FILES" .IX Header "OUTPUT FILES" Final non-contiguous ip blocks are written to domain_ips.txt file. .PP \&\fB\s-1NOTES:\s0\fR Final non-contiguous ip blocks are calculated : .IP "\(bu" 5 1) From reverse lookups that were performed on netranges ( c class network ranges or whois netranges ). .IP "\(bu" 5 2) If the noreverse switch is used then they are calculated from previous operations results (nslookups, zonetransfers, google scraping and brute forcing). .SH "README" .IX Header "README" dnsenum: multithread script to enumerate information on a domain and to discover non-contiguous ip blocks. .SH "PREREQUISITES" .IX Header "PREREQUISITES" Modules that are included in perl 5.10.0: Getopt::Long, IO::File, Thread::Queue. .PP Other Necessary modules: Must have: Net::DNS, Net::IP, Net::Netmask. Optional: Net::Whois::IP, HTML::Parser, WWW::Mechanize. .PP Perl ithreads modules (perl must be compiled with ithreads support): threads, threads::shared. .SH "AUTHORS" .IX Header "AUTHORS" Filip Waeytens .PP tix tixxDZ .SH "MAINTAINER" .IX Header "MAINTAINER" Network Silence .SH "COPYRIGHT" .IX Header "COPYRIGHT" This program is free software; you can redistribute it and/or modify it under the terms of the \s-1GNU\s0 General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. .SH "SCRIPT CATEGORIES" .IX Header "SCRIPT CATEGORIES" Networking \&\s-1DNS\s0