Added documentation on using GNU parallel with MDAXFR

This commit is contained in:
Dionysus 2024-03-18 17:17:53 -04:00
parent a775d61b83
commit d8433087d7
Signed by: acidvegas
GPG Key ID: EF4B922DB85DC9DE
2 changed files with 11 additions and 5 deletions

View File

@ -3,7 +3,7 @@
![](./.screens/preview.gif) ![](./.screens/preview.gif)
## Information ## Information
MDAXFR allows you to perform a DNS [Zone Transfer](https://en.wikipedia.org/wiki/DNS_zone_transfer) against a target domain by resolving all of the domains nameservers to their respective A/AAAA records and making an AXFR attempt against each of the IP addresses. MDAXFR allows you to perform a DNS [Zone Transfer](https://en.wikipedia.org/wiki/DNS_zone_transfer) against a target domain by resolving all of the domains nameservers to their respective A/AAAA records and making an AXFR attempt against each of the IP addresses. You can also use this tool against the [Root Nameservers](https://en.wikipedia.org/wiki/Root_name_server) and [Top-level Domains](https://en.wikipedia.org/wiki/Top-level_domain) *(TLD)*, including those in the [Public Suffix List](https://en.wikipedia.org/wiki/Public_Suffix_List) *(PSL)* aswell.
## Expectations & Legalities ## Expectations & Legalities
It is expected to set *realistic* expectations when using this tool. In contemporary network configurations, AXFR requests are typically restricted, reflecting best practices in DNS security. While many nameservers now disallow AXFR requests, there may still be occasional instances where configurations permit them. Always exercise due diligence and ensure ethical use. It is expected to set *realistic* expectations when using this tool. In contemporary network configurations, AXFR requests are typically restricted, reflecting best practices in DNS security. While many nameservers now disallow AXFR requests, there may still be occasional instances where configurations permit them. Always exercise due diligence and ensure ethical use.
@ -19,13 +19,17 @@ It is expected to set *realistic* expectations when using this tool. In contempo
cat domain_list.txt | ./mdaxfr cat domain_list.txt | ./mdaxfr
``` ```
.. or for parellel lookups you can use [GNU Parallel](https://www.gnu.org/software/parallel/):
```shell
parallel -a domain_list.txt -j 10 ./mdaxfr
```
- AXFR all domains in an AXFR output file - AXFR all domains in an AXFR output file
```shell ```shell
domain="ripe.net" cat axfr-ripe.log | grep -aE "\s+IN\s+NS\s+" | grep -avE "^${domain}\.\s+" | awk '{print $1}' | sort -u | sed 's/\.$//' | ./mdaxfr domain="ripe.net" cat axfr-ripe.log | grep -aE "\s+IN\s+NS\s+" | grep -avE "^${domain}\.\s+" | awk '{print $1}' | sort -u | sed 's/\.$//' | ./mdaxfr
``` ```
###### You can also use this tool against the [Root Nameservers](https://en.wikipedia.org/wiki/Root_name_server) and [Top-level Domains](https://en.wikipedia.org/wiki/Top-level_domain) *(TLD)*, including those in the [Public Suffix List](https://en.wikipedia.org/wiki/Public_Suffix_List) *(PSL)* aswell.
- AXFR on all TLDs - AXFR on all TLDs
```shell ```shell
curl -s 'https://data.iana.org/TLD/tlds-alpha-by-domain.txt' | tail -n +2 | tr '[:upper:]' '[:lower:] | ./mdaxfr curl -s 'https://data.iana.org/TLD/tlds-alpha-by-domain.txt' | tail -n +2 | tr '[:upper:]' '[:lower:] | ./mdaxfr
@ -39,7 +43,7 @@ curl -s https://publicsuffix.org/list/public_suffix_list.dat | grep -vE '^(//|.*
## Statistics, laughs, & further thinking... ## Statistics, laughs, & further thinking...
I only wrote this to shit on **[this bozo](https://github.com/flotwig/TLDR-2/)** who took a dead project & brought it back to life by making it even worse. Rather than making a pull request to give this bloke more credit in his "tenure" as a developer, I decided to just rewrite it all from scratch so people can fork off of *clean* code instead. I only wrote this to shit on **[this bozo](https://github.com/flotwig/TLDR-2/)** who took a dead project & brought it back to life by making it even worse. Rather than making a pull request to give this bloke more credit in his "tenure" as a developer, I decided to just rewrite it all from scratch so people can fork off of *clean* code instead.
As of my last scan in 2023, I was only able to AXFR the zones for **8** out of **1,456** root TLDs, with a few of them being zones that were already retrieved by [acidvegas/czds](https://github.com/acidvegas/czds/), & **114** out of **7,977** TLDs in the [Public suffix list](https://publicsuffix.org/). The [addition scripts](./extras/) in this repository provide an additional **37** zone files. As of my last scan in 2023, I was only able to AXFR the zones for **8** *(.er, .fj, .gp, .mp, .mw, .ni, .sl, .xn--54b7fta0cc)* out of **1,456** root TLDs, & **114** out of **7,977** TLDs in the [Public suffix list](https://publicsuffix.org/). The [addition scripts](./extras/) in this repository provide an additional **37** zone files.
For laughs, here is a one-liner mass zone axfr: For laughs, here is a one-liner mass zone axfr:
```bash ```bash

4
mdaxfr
View File

@ -6,8 +6,10 @@
# ./mdaxfr <domain> # ./mdaxfr <domain>
# AXFR on a list of domains: # AXFR on a list of domains:
# cat domain_list.txt | ./mdaxfr # cat domain_list.txt | ./mdaxfr
# AXFR on a list of domains using parallel:
# parallel -a domain_list.txt -j 10 ./mdaxfr
# AXFR on all domains in an AXFR output file: # AXFR on all domains in an AXFR output file:
# domain="ripe.net" cat axfr-ripe.log | grep -aE "\s+IN\s+NS\s+" | grep -avE "^${domain}\.\s+" | awk '{print $1}' | sort -u | sed 's/\.$//' | ./mdaxfr # domain="in-addr.arpa" cat axfrout/in-addr.arpa.txt | grep -aE "\s+IN\s+NS\s+" | grep -avE "^${domain}\.\s+" | awk '{print $1}' | sort -u | sed 's/\.$//' | ./mdaxfr
# AXFR on all TLDs: # AXFR on all TLDs:
# curl -s 'https://data.iana.org/TLD/tlds-alpha-by-domain.txt' | tail -n +2 | tr '[:upper:]' '[:lower:]' | ./mdaxfr # curl -s 'https://data.iana.org/TLD/tlds-alpha-by-domain.txt' | tail -n +2 | tr '[:upper:]' '[:lower:]' | ./mdaxfr
# AXFR on all PSL TLDs: # AXFR on all PSL TLDs: