Puredns
Puredns Agent Setup for Subdomain Enum

Puredns Command

Using {{rootDomain}} ReconNess replace {{rootDomain}} to the root domain, for example, yahoo.com if we define that as a root domain adding the Target
If we have massdns in the folder /app/massdns/bin/massdns
1
puredns bruteforce subdomains.txt {{rootDomain}} --resolvers resolvers.txt --bin /app/massdns/bin/massdns -q
Copied!

Puredns Script

1
using ReconNess.Core.Models;
2
3
var match = System.Text.RegularExpressions.Regex.Match(lineInput, @"([^\.\/]+)(\.[^\.\/]+)+(?:\/|$)");
4
if (match.Success)
5
{
6
return new ScriptOutput { Subdomain = match.Groups[0].Value };
7
}
8
9
return new ScriptOutput();
Copied!
Check the Readme on GitHub to know more about the Script.

Puredns Dockerfile Entry

1
# -------- Agents dependencies --------
2
3
# To allow run Puredns inside the docker
4
5
RUN apt-get update && apt-get install -y git build-essential wget
6
RUN wget https://dl.google.com/go/go1.14.6.linux-amd64.tar.gz
7
RUN tar -C /usr/local -xzf go1.14.6.linux-amd64.tar.gz
8
RUN git clone https://github.com/blechschmidt/massdns.git && cd massdns && make
9
RUN GO111MODULE=on /usr/local/go/bin/go get github.com/d3mondev/puredns/v2
10
11
# -------- End Agents dependencies --------
Copied!

Puredns Command for Docker

1
/root/go/bin/puredns bruteforce /app/Content/wordlists/subdomain_enum/default.txt {{rootDomain}} --resolvers /app/Content/wordlists/dns_resolver_enum/default.txt --bin /app/massdns/bin/massdns -q
Copied!
Last modified 5mo ago