projectdiscovery / shuffledns

MassDNS wrapper written in go to enumerate valid subdomains using active bruteforce as well as resolve subdomains with wildcard filtering and easy input-output support.
https://projectdiscovery.io
GNU General Public License v3.0
1.34k stars 193 forks source link

Strange/Different Results on Running shuffledns twice #37

Closed maverickNerd closed 4 years ago

maverickNerd commented 4 years ago

I have seen this multiple times, that on running shuffledns twice I get different results, and the results does not vary by 2-5 domains but in huge numbers. This huge difference come only in first and second run.

$ cat altdns.txt| shuffledns -silent -d domain -r ips/resolvers.txt | tee a.txt
$ cat a.txt | wc -l
619
$ cat a.txt| shuffledns -silent -d domain -ips/resolvers.txt | wc -l
95

Resolvers are taken from dnsvalidator.

Strangely, if I pass the same subdomain to shuffledns it does not output as it should be:

echo 'sub.example.com' | shuffledns -silent -d example.com -r ips/resolvers.txt

but the same subdomain came in the result of : cat altdns.txt| shuffledns -silent -d domain -r ips/resolvers.txt

I have observed this issue for other domains also.

DNS Record:

dig tr.recorder.example.com

; <<>> DiG 9.11.5-P4-5.1ubuntu2.2-Ubuntu <<>> tr.recorder.example.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 17767
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 1452
;; QUESTION SECTION:
;tr.recorder.example.com.       IN      A

;; AUTHORITY SECTION:
example.com.            900     IN      SOA     ns-546.awsdns-04.net. awsdns-hostmaster.amazon.com. 1 7200 900 1209600 86400

;; Query time: 113 msec
;; SERVER: 1.1.1.1#53(1.1.1.1)
;; WHEN: Tue Jun 23 07:34:29 UTC 2020
;; MSG SIZE  rcvd: 144

No CNAME, and No A record found for this subdomain but still it came on the output of first shuffledns run.

ehsandeep commented 4 years ago

Hi @maverickNerd,

As discussed on the discord this is an issue due use of bad resolvers, as such closing this issue for now.