Updated Jul 14, 2026

Recon

Build subdomain candidates for DNS brute force

Subdomain candidates from a wordlist for DNS resolution.

Agent

overview

What mksub does

mksub combines a domain with a wordlist to emit candidate subdomains for later resolution. It lowercases words, strips invalid hostname characters, and drops duplicates.

Level (-l) stacks labels. -r filters the wordlist before generation. -df builds candidates for many roots in one pass. -silent skips stdout when you only need the file.

Trickest provides mksub as a managed Recon node: domain and wordlist in, FILE and FOLDER of candidates out. Resolve with puredns or dnsx; pair with passive tools like subfinder.

source github.com/trickest/mksub

use cases

Where mksub fits

Build a brute-force resolution list

Permute a domain against a wordlist, then resolve the candidates with puredns or dnsx to find subdomains that passive sources never indexed.

Reach nested subdomain schemes

Set the level flag above 1 to generate multi-label hostnames so discovery catches naming patterns like api.staging.example.com.

Permute across a portfolio of domains

Pass a domain file with one root per line to generate candidates for a whole set of domains in a single run.

Complement passive enumeration

Run mksub-driven brute forcing alongside subfinder so active permutation fills the gaps that passive certificate and DNS feeds leave behind.

reference

mksub inputs and flags

6 inputs
NameTypeFlagDescription
domainSTRING-dDomain to generate permutations for.
wordlistFILE-wWordlist for permutations.
domain-listFILE-dfInput domain file, one domain per line.
levelSTRING-lSubdomain level to generate; level 1 produces sub.domain.com, level 2 sub.sub.domain.com (default 1).
regex-filterSTRING-rRegex to filter words from the wordlist file.
silentBOOLEAN-silentSkip writing generated subdomains to stdout for a faster run (default true).

Showing key inputs. mksub exposes 6 inputs in total.

example

Run mksub

mksub · command
# permute example.com against a wordlist, filtering to hostname-safe wordsmksub -d example.com -w subdomains.txt -r '^[a-z0-9-]+$' -l 1 > candidates.txt
sample output
api.example.comdev.example.comstaging.example.commail.example.comvpn.example.comadmin.example.comgitlab.example.comgrafana.example.com…  (1,000 candidates generated for example.com)

guidance

Choosing mksub

Use mksub when you want active subdomain brute force and need a clean candidate list first. It generates names; a resolver like puredns or dnsx confirms which ones exist. Pair with subfinder for passive coverage.

subfinder

Passive subdomain discovery from online sources. mksub generates names to brute force instead; run both for breadth.

dnsgen

Permutation generator that mutates known subdomains. mksub builds from a wordlist and domain rather than existing names.

mkpath

Sibling generator for URL paths instead of subdomains. Same wordlist approach on the HTTP layer.

faq

mksub questions

No. mksub only writes candidate hostnames. Pass its output to a resolver such as puredns, dnsx, or massdns to confirm which names resolve.

Run mksub yourself

A wordlist feeds mksub, which permutes it against a domain and hands the candidates to puredns for resolution before the live subdomains land as a queryable output.

Facts on this page come from the live Trickest tool library.