Security Cipher
Home Blog About Us
Resources β–Ό
πŸ—ΊοΈ Penetration Testing Roadmap 🌐 Web Application Security Checklist πŸ€– OWASP Top 10 for LLM Applications 🧠 LLM AI Security Checklist πŸ› οΈ Security Tools 🎯 Penetration Testing Tricks πŸ“„ Secure Code Explain πŸ“– Vulnerability Explain ☁️ AWS Cloud Security Checklist
My Resume
Contact Us
← Security Tools View on GitHub

dnsgen

Generates combinations of domain names from provided input to feed resolvers during subdomain discovery.

DNSGen 2.0 - Advanced DNS Name Permutation Engine πŸš€

License: MIT Python 3.9+ Code style: black

DNSGen is a powerful and flexible DNS name permutation tool designed for security researchers and penetration testers. It generates intelligent domain name variations to assist in subdomain discovery and security assessments.

DNSGen Banner

✨ Features

  • πŸ” Smart domain name permutation engine
  • πŸš„ Fast generation mode for quick assessments
  • πŸ“ Support for custom wordlists with comments
  • 🎯 Intelligent word extraction from existing domains
  • πŸ”§ Multiple permutation techniques
  • 🌍 Cloud-aware patterns and modern naming conventions

πŸš€ Quick Start

Installation

# Using pip
python -m pip install dnsgen

# Using uv (recommended for development)
git clone https://github.com/AlephNullSK/dnsgen
cd dnsgen/
python -m pip install uv
uv sync

Basic Usage

# Basic domain permutation
dnsgen domains.txt

# With custom wordlist and output file
dnsgen -w custom_wordlist.txt -o results.txt domains.txt

# Using fast mode for quick assessment
dnsgen -f domains.txt

# Pipe with massdns for resolution
cat domains.txt | dnsgen - | massdns -r resolvers.txt -t A -o J --flush 2>/dev/null

πŸ› οΈ Permutation Techniques

DNSGen 2.0 implements multiple sophisticated permutation techniques:

Core Permutators

  1. Word Insertion

    • Inserts words between domain levels
    • Example: api.example.com β†’ staging.api.example.com
  2. Number Manipulation

    • Intelligently modifies existing numbers
    • Example: api2.example.com β†’ api1.example.com, api3.example.com
  3. Word Affixing

    • Prepends/appends words to levels
    • Example: api.example.com β†’ devapi.example.com, api-dev.example.com

Cloud & Modern Infrastructure Permutators

  1. Cloud Provider Patterns

    • Adds cloud-specific naming patterns
    • Example: example.com β†’ api-aws.example.com, storage-azure.example.com
  2. Region Prefixes

    • Adds geographical region patterns
    • Example: api.example.com β†’ us-east.api.example.com
  3. Microservice Patterns

    • Generates microservice-style names
    • Example: example.com β†’ auth-service.example.com, user-api.example.com

DevOps & Tooling Permutators

  1. Internal Tooling

    • Adds common internal tool subdomains
    • Example: example.com β†’ jenkins.internal.example.com
  2. Port Prefixing

    • Adds common port numbers
    • Example: api.example.com β†’ 8080.api.example.com

πŸ“‹ Command Line Options

dnsgen [OPTIONS] FILENAME

Options:
  -l, --wordlen INTEGER  Min length of custom words (default: 6)
  -w, --wordlist PATH    Path to custom wordlist
  -f, --fast            Fast generation mode
  -o, --output PATH     Output file path
  -v, --verbose         Enable verbose logging
  --help               Show this message and exit

πŸ”§ Advanced Usage

Custom Wordlists

DNSGen 2.0 supports commented wordlists for better organization:

# Environment Names
dev
staging
prod

# Cloud Providers
aws
azure
gcp

# Tools and Services
jenkins
gitlab
grafana

Integration with MassDNS

Get clean resolved domains:

# Generate and resolve
dnsgen hosts.txt > wordlist.txt
massdns -r resolvers.txt -o S wordlist.txt | grep -e ' A ' | \
  cut -d 'A' -f 1 | rev | cut -d "." -f1 --complement | \
  rev | sort | uniq > resolved_domains.txt

🀝 Contributing

Contributions are welcome! Here's how you can help:

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature/amazing-feature
  3. Commit your changes: git commit -m 'Add amazing feature'
  4. Push to the branch: git push origin feature/amazing-feature
  5. Open a Pull Request

See CONTRIBUTING.md for more details.

πŸ“š Resources

  • Subdomain Enumeration: 2019 Workflow
  • Subdomain Enumeration: Doing it a Bit Smarter
  • Project Documentation

πŸ“œ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ™ Acknowledgments

  • Original concept by Aleph Null s.r.o.
  • Inspired by altdns
  • massdns for DNS resolution

πŸ“Š Project Status

  • βœ… Core functionality complete
  • πŸ—οΈ Adding more permutation techniques
  • πŸ“ Improving documentation
  • πŸ§ͺ Adding tests

Made with ❀️ by the security community

Press Escape to close the search panel.

Donate

Buy me a Coffee

Penetration Testing Services - Fiverr

Buy me a Coffee

Penetration Testing Services

penetration Testing Services

Web Application Security Quiz

Web Application Security Quiz

Daily Bug Bounty Writeups - Twitter

Daily Bug Bounty Writeups

Download our Latest Android Application

Guide for Penetration Testing

Daily Bug Bounty Writeups - Telegram

Daily Bug Bounty Writeups

Author

Piyush
Senior Product Security Engineer

Ethical Hacker || Penetration Tester || Gamer || Blogger || Application Security Engineer

READ ARTICLE

Donate

Buy me a Coffee

Recent Posts

  • Web Cache Poisoning in 2026: A Practical Playbook (One Request, Every Victim)
    Web Cache Poisoning in 2026: A Practical Playbook (One Request, Every Victim)
    July 19, 2026/
    0 Comments
  • Is AI Killing Bug Bounty? What the 2026 CVE Flood Really Means for Hunters
    Is AI Killing Bug Bounty? What the 2026 CVE Flood Really Means for Hunters
    July 17, 2026/
    0 Comments
  • AI Pentest Tools in 2026: What Actually Works (T3MP3ST, PentestGPT, Caido and More)
    AI Pentest Tools in 2026: What Actually Works (T3MP3ST, PentestGPT, Caido and More)
    July 16, 2026/
    0 Comments

Follow Us

SecurityCipher

Practical security guides, vulnerability deep-dives, and hands-on resources for bug bounty hunters and penetration testers.

Useful Links

  • Blogs
  • About
  • Contact

Recent Post

  • Web Cache Poisoning in 2026: A Practical Playbook (One Request, Every Victim)
  • Is AI Killing Bug Bounty? What the 2026 CVE Flood Really Means for Hunters
  • AI Pentest Tools in 2026: What Actually Works (T3MP3ST, PentestGPT, Caido and More)
Β© 2026 SecurityCipher. All rights reserved. Privacy Policies Β· Terms & Conditions