punk-security / dnsReaper

dnsReaper - subdomain takeover tool for attackers, bug bounty hunters and the blue team!
GNU Affero General Public License v3.0
2.03k stars 167 forks source link

Make relative names in AXFR into FQDN #186

Open niclan opened 2 months ago

niclan commented 2 months ago

In the zonetransfer provider the RHS of a CNAME may be a relative name not necessarily a FQDN. So for example

www.example.com CNAME webserver

instead of

www.example.com CNAME webserver.example.com.

Note significant ending . in the second example. This PR makes relative names into FQDNs.

sonarcloud[bot] commented 2 months ago

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarCloud

niclan commented 2 months ago

I was unable to get this into a list comprehension, sorry.

imnotbrandon commented 2 months ago

Hi, thanks for the contribution!

Whilst testing this, I've discovered that false negatives are produced because we don't recursively resolve records.

This isn't an issue introduced by your code, but I thought you should be aware given the context. I've already got a working fix so I'll merge that in separately once it's properly tested.