My Notes from Reading Web Hacking 101,
Web Hacking 101 was written by Peter Yaworski. These are my notes from Ch. 19, "Getting Started".
-
- Enumerate all sub domains (if they are in scope) using KnockPy.
knockpy example.com -w domain/sorted_knock_dnsrecon_fierce_recon-ng.txt
OR
knockpy example.com -c -w SecLists/Discovery/DNS/subdomains-top1mil-110000.txt
- Jason Haddix's
enumall
script, which requiresRecon-ng
. Note that, if you're running Kali Linux, Recon-ng is probably already installed. Also,recon-ng
can callaltdns
. But installing altdns is optional.
enumall.py example.com -a -w SecLists/Discovery/DNS/sorted_knock_dnsrecon_fierce_recon-ng.txt
- Note that to get
recon-ng
set up with API keys you'll need the very helpful info at Raikia's Hub. You'll also need to watch a YouTube video called Recon-ng:. How to add API keys.
whois
or IPV4info.com.
-
Start ZAP proxy, visit the main target site and perform a Forced Browse to discover files and directories
-
Map technologies used with Wappalyzer and Burp Suite (or ZAP) proxy
-
Explore and understand available functionality, noting areas that correspond to vulnerability types
-
Begin testing functionality mapping vulnerability types to functionality provided
-
Automate EyeWitness and Nmap scans from the KnockPy and enumall scans
sudo nmap -sS -A -PN --script=http-title -iL example.com.targets -oA example.com.nmap
- Note that the
example.com.targets
file is a sorted, uniq-ed list of hostnames from the subdomain enumeration scans described above.
- Note that the
-
Review mobile application vulnerabilities
-
Test the API layer, if available, including otherwise inaccessible functionality
-
Look for private information in GitHub repos with GitRob
-
Subscribe to the site and pay for the additional functionality to test
- Burp Suite
- ZAP Proxy
- Wappalyzer plug-in
- Burp Suite
- If it has a front-end JS library which interact with a back-end API
- Find out if it has known vulnerabilities
- Do API calls return sensitive data which is not rendered?
- Check proxy to see:
- Where files are being served from
- JS files hosted elsewhere?
- Calls to 3rd party services?
- Look for JSON files
- Attempt passing unauthorized file IDs
- Set up accounts OAuth?
- 2fA?
- Multiple users per account? Complex permissions model?
- Inter-user messaging allowed?
- Sensitive documents stored or allowed to be uploaded?
- Profile pictures allowed?
- HTML allowed, or WSISYG editor?
- Bulk importer accepting XML/XXE document?
- Create content, users, teams, etc.
- Inject payloads everywhere
- E.g.,
<img src=”x” onerror=alert(1)>
- Inject exploit code to vulnerable JS framework
- How is my content rendered?
- Are special characters encoded?
- Are attributes stripped? (What does this one mean? URL params?)
- Does XSS image payload execute?
- Test each area
- Analyze HTTP requests and responses
- Enumerate or access URLs to sensitive files as anonymous user?
- If WYSIWYG, add HTML to POST requests
- CSRF tokens present in HTTP requests that change data? Tokens validated? (CSRF)
- Can manipulate ID parameters? (Application Logic)
- Can repeat requests across two separate user accounts? (Application Logic)
- Any XML upload fields (XXE)?
- Notice any URL patterns containing record IDs? (Application Logic, HPP)
- Any URLs with redirect related parameter? (Open Redirect)
- Any requests which echo URL parameters in the response? (CRLF, XSS, Open Redirect)
- Server information disclosed? Find unpatched vulnerabilities
- Did ZAP discover anything interesting like .htpasswd or config files?
- Did Burp discover anything interesting?
- Combine sub-domain lists from KnockPy and enumall scans as input to EyeWitness for screenshots
- Accessible web panels?
- Continuous integration servers?
- Administrative consoles?
- Pass KnockPy list of IPs and pass it to
nmap
:
namp -sSV -oA OUTPUTFILE -T4 -iL IPS.csv
- Open ports?
- Vulnerable services?
- Proxy your phone traffic through Burp while using the mobile app (if no SSL pinning)
- Explore API endpoints
- Mobile Security Framework
- JD-GUI
- Review developer documentation looking for abnormalities
- Does API sanitize input?
- GitRob
- Passwords?
- Config files?
- Keys?
- Google search:
site:example.com .bash_history
- Explore paid functionality, which most other hackers likely avoid.