All Projects → dabasanta → DNSExplorer

dabasanta / DNSExplorer

Licence: other
Bash script that automates the enumeration of domains and DNS servers in the active information gathering.

Programming Languages

shell
77523 projects

Projects that are alternatives of or similar to DNSExplorer

wifi-penetration-testing-cheat-sheet
Work in progress...
Stars: ✭ 149 (+351.52%)
Mutual labels:  penetration-testing, offensive-security, ethical-hacking
H4cker
This repository is primarily maintained by Omar Santos and includes thousands of resources related to ethical hacking / penetration testing, digital forensics and incident response (DFIR), vulnerability research, exploit development, reverse engineering, and more.
Stars: ✭ 10,451 (+31569.7%)
Mutual labels:  penetration-testing, ethical-hacking
Pentest Notes
Collection of Pentest Notes and Cheatsheets from a lot of repos (SofianeHamlaoui,dostoevsky,mantvydasb,adon90,BriskSec)
Stars: ✭ 89 (+169.7%)
Mutual labels:  penetration-testing, offensive-security
Buffer overflow
Don't let buffer overflows overflow your mind
Stars: ✭ 131 (+296.97%)
Mutual labels:  penetration-testing, offensive-security
Awesome Oscp
A curated list of awesome OSCP resources
Stars: ✭ 804 (+2336.36%)
Mutual labels:  penetration-testing, offensive-security
Penetration Testing Cheat Sheet
Work in progress...
Stars: ✭ 69 (+109.09%)
Mutual labels:  penetration-testing, offensive-security
Black Widow
GUI based offensive penetration testing tool (Open Source)
Stars: ✭ 124 (+275.76%)
Mutual labels:  penetration-testing, offensive-security
Vanquish
Vanquish is Kali Linux based Enumeration Orchestrator. Vanquish leverages the opensource enumeration tools on Kali to perform multiple active information gathering phases.
Stars: ✭ 449 (+1260.61%)
Mutual labels:  penetration-testing, offensive-security
Reconnoitre
A security tool for multithreaded information gathering and service enumeration whilst building directory structures to store results, along with writing out recommendations for further testing.
Stars: ✭ 1,824 (+5427.27%)
Mutual labels:  penetration-testing, offensive-security
Crithit
Takes a single wordlist item and tests it one by one over a large collection of websites before moving onto the next. Create signatures to cross-check vulnerabilities over multiple hosts.
Stars: ✭ 182 (+451.52%)
Mutual labels:  penetration-testing, offensive-security
Knary
A simple HTTP(S) and DNS Canary bot with Slack/Discord/MS Teams & Pushover support
Stars: ✭ 187 (+466.67%)
Mutual labels:  penetration-testing, offensive-security
Rapidscan
🆕 The Multi-Tool Web Vulnerability Scanner.
Stars: ✭ 775 (+2248.48%)
Mutual labels:  penetration-testing, offensive-security
Vhostscan
A virtual host scanner that performs reverse lookups, can be used with pivot tools, detect catch-all scenarios, work around wildcards, aliases and dynamic default pages.
Stars: ✭ 767 (+2224.24%)
Mutual labels:  penetration-testing, offensive-security
Thecollective
The Collective. A repo for a collection of red-team projects found mostly on Github.
Stars: ✭ 85 (+157.58%)
Mutual labels:  penetration-testing, offensive-security
Chimera
Chimera is a (shiny and very hack-ish) PowerShell obfuscation script designed to bypass AMSI and commercial antivirus solutions.
Stars: ✭ 463 (+1303.03%)
Mutual labels:  penetration-testing, offensive-security
Punk.py
unix SSH post-exploitation 1337 tool
Stars: ✭ 107 (+224.24%)
Mutual labels:  penetration-testing, offensive-security
East
Exploits and Security Tools Framework 2.0.1
Stars: ✭ 283 (+757.58%)
Mutual labels:  penetration-testing, offensive-security
Badkarma
network reconnaissance toolkit
Stars: ✭ 353 (+969.7%)
Mutual labels:  penetration-testing, offensive-security
Nosqlmap
Automated NoSQL database enumeration and web application exploitation tool.
Stars: ✭ 1,928 (+5742.42%)
Mutual labels:  penetration-testing, offensive-security
brutekrag
Penetration tests on SSH servers using brute force or dictionary attacks. Written in Python.
Stars: ✭ 30 (-9.09%)
Mutual labels:  penetration-testing, ethical-hacking

DNSExplorer

DNSExplorer is a shell script that automates the enumeration process of a domain or DNS server and its subdomains using 'host' as the main tool.

Its goal is enum the domains and subdomains using the default server in the revolv.conf file to give an overview of the DNS service.

Dependencies

  • OpenSSL
  • cURL
  • host (dnsutils / bind-utils)
  • ping (net-tools)

Use cases

Ideal for RedTeam scenarios where a quick view of the internal or external DNS network landscape is required.

It is useful in initial and post-exploit enumeration phases on unix systems.

Usage

You can use the script with the default DNS server defined by the system or service provider by using:

./DNSExplorer.sh <domain.name>

If you want to use a specific DNS server to resolve the query, use:

./DNSExplorer.sh <domain.name> <dns.server>

As you can see, with a specific DNS server you can to obtain more information about your target.

Paranoiac exec

The script leaves few local traces that are hardly detected. It can also be run directly from github if you have an internet connection:

wget -O - https://raw.githubusercontent.com/dabasanta/DNSExplorer/main/DNSExplorer.sh | bash

The script saves temporary files in the /tmp/dnsexplorer/ folder which are deleted at the end of its execution, in case of a runtime error it is a good idea to delete this directory if the evidence worries you a lot.

Operation modes

The script has two main modes of operation, which correspond to a basic enumeration of a domain and its DNS servers in order to discover more subdomains.

ZoneTransfer

After discovering the DNS servers behind a domain, the script tries to do an AXFR zone transfer on each of the servers with an NS record.

In case all servers fail and zone transfer is not possible, or DNSSec is enabled, the script will automatically switch to brute force function.

BruteForce

Automatic: The brute force function takes danielmiessler dictionary: bitquark-subdomains-top100000.txt And it cuts it to 1,000 records. This corresponds to the top 1,000 of the most used subdomains globally by organizations.

Custom: In case you have a custom dictionary and you want to fuzz the subdomains with information taken from your information gathering phase, you can specify the file path.

This file must be specified using the basolute path, or just the name if it is in the same directory as the script. Note: The file must be text and correspond to the "ASCII text" format, any other format will not be for the script.

TLS SAN Validation

The script validates if it can connect to the domain using openssl against port 443 in order to find a secure website, then it inspects its TLS certificate for SAN records and displays them to the user.

Port 443 is used by default because the vast majority of domains on the internet host their secure web service on that port. However, this can be changed in the script code for specific cases.

HTTPS subdomains by crt.sh

More info about this in certificate.transparency.dev.

Thanks to @UnaPibaGeek by her tool written in python: CTFR.

The functionality is the same: The script search in the crt.sh database about the domain name that are auditing by DNSExplorer.sh

This works very well in the public-face of our target where PKI infrastructure is used.

Save output to file

To save output to a file, just redirect the STDOUT to the file by using '>' character.

./DNSExplorer.sh e-corp.evil >> results.txt

This saves the entire output with the color codes, to read the file and view with colors use more command: more results.txt

If you want export the results in clear text use:

DNSExplorer-minimal.sh e-corp.evil >> results.txt

DNSExplorer-minimal

Ideal to be run in hostile shell environments, for example a low-privilege remote reverse shell. Unnecessary output and bash colors have been removed, the script has been shortened to optimize its performance by removing unnecessary line breaks.

Its functionality is identical to that of the original script, it has only been optimized a little more at the shell scripting level, leaving aside the aesthetics of the code.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].