r/hackthebox • u/Upset_Ease_3206 • Aug 13 '24
Released My Recon Tool (Reconis) for OSCP and HTB Prep – Feedback Welcome!
Hey everyone,
I’ve been working on a script called Reconis that’s up on GitHub. It’s designed to help with network enumeration and reconnaissance, especially for those of you preparing for the OSCP or working on HTB challenges. Here’s a detailed look at what Reconis can do:
Features of Reconis:
Automated Nmap Scans (TCP and UDP):
Reconis automates both quick and detailed Nmap scans. It handles TCP and UDP scans, and you can choose to output results in XML format for further analysis. It also identifies and logs any errors during scanning, so you know exactly what went wrong if something doesn’t work as expected.
2. Vulnerability Scanning:
After identifying open ports, Reconis can run Nmap’s vulnerability scripts (`-sV --script=vuln`) on those ports to check for known issues. The output is cleaned and saved to a file, making it easy to review later.
3. Searchsploit Integration:
The tool integrates with Searchsploit to automatically map discovered services to known vulnerabilities. It processes the JSON output from Searchsploit, filters relevant exploits, and logs them for each service. If Searchsploit doesn't find any exploits, the tool will indicate this in the results.
4. /etc/hosts Management:
Reconis automatically updates the `/etc/hosts` file with domains discovered during scans. Before adding entries, it checks for duplicates to keep the file clean. It extracts domain names and hostnames from the Nmap output and adds them to the hosts file, ensuring proper resolution during further testing.
5. Enum4linux Support:
For Windows environments, Reconis can automate the use of Enum4linux to enumerate SMB shares, users, and other details. The output is cleaned of ANSI escape sequences for readability and is saved for easy reference.
6. Domain Scoring (Experimental):
This feature scores domains based on HTTP headers and status codes to help prioritize which ones might be worth a closer look. It uses a curl command to inspect HTTP responses, scoring domains based on factors like status codes, content length, and the presence of cookies. The best domain for further testing is selected automatically.
7. Feroxbuster Integration:
Reconis integrates with Feroxbuster to automate directory and file discovery on web servers. The tool customizes the file extensions based on the web server detected (e.g., PHP for Apache, ASPX for IIS). You can use the default wordlist provided or specify a custom one if you need something specific.
8.CherryTree Documentation:
All findings from Nmap scans, vulnerability scans, and SMB enumeration are documented in a CherryTree format. The document is structured with nodes for scanning and enumeration, exploitation, and reporting. Each service and port has its own section, including notes, Searchsploit results, and vulnerability scan data.
9. Comprehensive Logging:
Every command executed by Reconis is logged, along with its output. This includes errors and any updates made to system files like `/etc/hosts`. The logging ensures transparency and makes troubleshooting easier.
10. Interactive Prompts:
The tool provides interactive prompts with validation and tab completion, making it user-friendly. You can choose whether to run certain tasks like Feroxbuster or vulnerability scans based on your needs. The prompts guide you through the process, but the script also allows for modifications if you want to customize the commands.
11. Tool Check and Installation:
Before starting, Reconis checks if required tools (like Nmap, Feroxbuster, Enum4linux) are installed. If any tools are missing, it informs you, so you can install them before proceeding.
Why I Made This:
I’m still learning, so this script might have some rough edges. But I figured it could be helpful for others too, especially if you’re prepping for OSCP or doing HTB stuff. I’m planning to add more tools and make the script more customizable. If you try it out and have any feedback or suggestions, I’d be really grateful!
I’m also currently looking for a job in cybersecurity. I recently graduated with a Master’s in Cybersecurity and would love the opportunity to interview if anyone knows of any openings. 😄
Check it Out:
If this sounds useful to you, check out Reconis on GitHub here: https://github.com/empyr3an/Reconis
Thanks for taking the time to read this!