{“recon_scripts_v2.0”}

Recon Script v2.0

Introduction

Coming from v1.0 , I had a few ideas in order to improve v2.0. One of which was to add a progress bar and some options to decide what type of scan to do! I was initially thinking of follow the schematic of every open source tool out there with a list of configuration options ( Ex. The -A option for nmap ). After some consideration, I decided on just having the script ask what type of enumeration they would want. Maybe I’ll change it in the future but who knows

Description

This Bash script is a reconnaissance tool designed to automate the process of gathering information about a web application. It combines multiple methods for finding subdomains, directories, and more, helping to create a comprehensive picture of the web application’s structure. The script includes several steps for setting up directories, performing scans, and outputting the results to specific files.

Breakdown of the Script

Initialization and Disclaimer:
– The script starts with a comment section that explains its purpose and provides a disclaimer about its intended use for educational purposes and authorized security testing only.

Variable Declarations:
– domain: Takes the first command-line argument as the target domain.
– mode: Takes the second command-line argument as the mode of reconnaissance (service, directory, subdomain, or all).
– RED, YELLOW, WHITE, RESET, LINE: Define color codes and a line separator for formatted output.
– basic_path, service_path, directory_path, subdomain_path: Define paths for storing the results of various scans.

Progress Indicator Function:
– Defines a progress function that displays a rotating progress indicator while a background process is running.

ASCII Art and Line Separator:
– Displays ASCII art for visual separation and a line separator for better readability.

Directory Setup:
– Checks if the target domain directory and subdirectories (basic_recon, service_recon, directory_recon, subdomain_recon) exist. If not, it creates them.

Basic Enumeration:
– Executes whois and nslookup commands on the target domain and saves the outputs to whois.txt and nslookup.txt in the basic_recon directory.

Service Enumeration:
– If the serv mode is selected, creates a service_recon directory, executes an nmap scan on the target domain, and saves the output to nmap.txt.

Directory Enumeration:
– If the dir mode is selected, creates a directory_recon directory, executes ffuf and dirb scans on the target domain, and saves the outputs to appropriate files.

Subdomain Enumeration:
– If the sub mode is selected, creates a subdomain_recon directory, executes subfinder and assetfinder to find subdomains, filters alive subdomains using httprobe, takes screenshots using gowitness, and saves the outputs to appropriate files.

Mode Selection and Execution:
– Prompts the user to select a mode (serv, dir, sub, all) and executes the corresponding functions based on the user’s choice.

Final Notes

The actual amount of open source tools didnt really change, however, I implemented a progress bar, showing that the script is running instead of freezing and added options so the user can decide on what type of enumeration to use! It was a fun project, learning and implementing function and cases!

Later on to improve on this, I was thinking of maybe changing the schematic of how modes are picked like ( edsrecon -dir OR edsrecon -serv). Researching some open source tools to add onto the script is a next step as well!

Big thanks to Vickie Li’s “Bug Bounty Bootcamp” , TCM Security , GeeksForGeeks, and OpenAI for the help in creating this project!

I’m not sponsored but Vickie Li’s book is TOP TIER! Also look at TCM Security if you have any interest in penetration testing or cybersecurity in general

Resources

https://vickieli.dev/

https://www.amazon.com/Bug-Bounty-Bootcamp-Reporting-Vulnerabilities-ebook/dp/B08YK368Y3

https://academy.tcm-sec.com/courses/

https://www.geeksforgeeks.org/introduction-linux-shell-shell-scripting/

Scroll to Top