Reconnaissance
Common reconnaissance phase steps on HackTheBox machines or during penetration testing.
NmapAutomator
Well, I like to use NmapAutomator in my daily pentest activity. I just run NmapAutomator, light a cigarette, and wait for this awesome recon tool to do the job.
Port Scanning
When obtaining the IP address of a HackTheBox machine, one essential task is to perform port scanning. The most powerful tool for conducting port scanning is nmap.
TCP ports
UDP Ports
Directory Scanning
Directory scanning involves scouring the targeted directories or files on a web server to uncover security vulnerabilities. A web server typically allows access to specific directories and files. However, if these directories or files are not managed carefully by web administrators, attackers can exploit these exposed areas to gain access to sensitive information.
Directory scanning with Feroxbuster.
Subdomain / Virtualhost Brute
During the testing reconnaissance phase, testers spend time on virtual host enumeration, which is the process of discovering all the virtual hosts associated with a particular IP address or domain. This helps them find hidden or undocumented assets that might be vulnerable or misconfigured.
FFuF
Vhost Brute with FFuF (CTF style)
PureDNS
Subdomain Bruteforce with PureDNS.
Subfinder
Subdomain Enumeration with Subfinder
Technology Detection
Technology detection is a crucial aspect of penetration testing, providing insights into the software, frameworks, and platforms utilized by the target system. By employing various tools and techniques, penetration testers can identify the underlying technologies, versions, and configurations present, facilitating a deeper understanding of potential vulnerabilities and attack vectors. Amazing tool to perform technology detection is Browser add-ons Wappalyzer, or cli tool webanalyze.
WAF Detection
In web pentesting, knowing your target, including their WAF, is an important step because you need a different approach when your target is protected by a WAF.
JavaScript Analyze
If youβre pentesting web applications, you certainly come across a lot of JavaScript. Nearly every web application nowadays is using it. Frameworks like Angular, React and Vue.js place a lot of functionality and business logic of web applications into the front end. Thus, to thoroughly pentest web applications, you have to analyze their client-side JavaScript.
LinkFinder
LinkFinder is a python script written to discover endpoints and their parameters in JavaScript files.
SecretFinder
SecretFinder is a python script based on LinkFinder, written to discover sensitive data like apikeys, accesstoken, authorizations, jwt,..etc in JavaScript files.
Web Crawling
Another approach to finding endpoints on your targets. Some people like using a command-line spider for gathering endpoints. Katana is one of these security focused spiders.
katana by Projectdiscovery.
Tips
When using katana:
use "-headless" as modern CDN WAFs block many command-line spiders.
use "-js-crawl" to enable javascript parsing.
use "-jsluice" to enable syntax-tree (better) javascript parsing.
use "-display-out-scope" to know when the spider find links to other domains that might be related to your target.
Reference: https://x.com/Jhaddix/status/1802537881694544192
Vulnerability Assessment
Quick shot to find some 'low-hanging fruit' findings.
Nuclei + Katana
Note: This page is incomplete and will be regularly updated. If you have any ideas or resources that need to be added, please contact me at yuyudhn@gmail.com.
Last updated