Skip to main content

Web Pentest - Recon

 
Refer to Simple WebPentest Checklist

Subdomain Enumeration

git clone https://github.com/TheRook/subbrute.git
python subbrute.py domain.com > subdomains.txt

git clone https://github.com/infosec-au/altdns.git
altdns -i subdomains.txt -o data_output -w words.txt -r -s results_output.txt

#paste the list into Bulk URL HTTP Status Code, Header & Redirect Checker | httpstatus.io
# this will give live hosts status

make sure to check subdomain of the sub-domains 

#Other Tools 
amass enum -passive -norecursive -noalts –df domin.txt -o  subs-1.txt
amass enum -passive -norecursive -noalts –df subs-1.txt -o  all-sub.txt

Fetching URLS for a domain

#Use GAU to get all urls  
download from https://github.com/lc/gau/releases
or 
go install github.com/lc/gau/v2/cmd/gau@latest

printf example.com | gau
cat domains.txt | gau --threads 5
gau example.com google.com
gau --o example-urls.txt example.com
gau --blacklist png,jpg,gif example.com
Recon Automation 

#Better use https://github.com/smicallef/spiderfoot 
- this automates most of the basic tasks 

#Does a good amount of Recon
GitHub - blacklanternsecurity/bbot: The recursive internet scanner for hackers. 🧡

#use ReconFTW
git clone https://github.com/six2dez/reconftw
cd reconftw/
./install.sh
./reconftw.sh -d target.com -r

#or Setup a container 
docker pull six2dez/reconftw:main
docker run -it --rm \
-v "${PWD}/OutputFolder/":'/reconftw/Recon/' \
six2dez/reconftw:main -d example.com -r
Find origin IPs to Bypass waf via match & replace in burp

shodan.io 🡺 Ssl.cert.subject.CN:"domain/subdomain"
en.fofa.info 🡺 normal search for domain/subdomain
search.censys.io 🡺 normal search for domain/subdomain
securitytrails.com 🡺 normal search for domain/subdomain
Finding Hidden paths
  • go to urlscan.io/search
    • domain.com -www.domain.com -auth.domain.com
  • Google Dorks
    • Ignore known domains and search for new endpoints/domains
    • site:domain.com -site:duplicate.domain.com
  • go to https://en.fofa.info/
    • search for a domain and select the favicon of the company
    • it shows the hash of the favicon
    • use this query to find domains with favicon hash - `http.favicon.hash:-1243154474`
Finding SPF Records

  • -all (Hard Fail): Strict rejection of emails from unauthorized servers.
  • ~all (Soft Fail): Flag or mark emails from unauthorized servers as suspicious.
  • +all (Allow All): Allows emails from any server, effectively disabling SPF checks.
  • ?all (Neutral): No strong recommendation; recipient decides.
  • while read -r domain; do echo "$domain:"; dig txt "$domain" | grep "include:_spf"; done < domains.txt

    Checking DMarc Records
    
    - Start with p=none, review reports to ensure legitimate senders are authenticated, and then move to stricter policies (p=quarantine or p=reject).
    
    Example: v=DMARC1; p=none; rua=mailto:dmarc-reports@example.com;
    
    dig txt _dmarc.example.com
    
    while read -r domain; do echo "$domain:"; dig txt "_dmarc.$domain" | grep "DMARC"; done < domains.txt
    



    Comments

    Popular posts from this blog

    POC Links for CVE's

      Serach for a CVE here first - Trickest/cve Apache CVE-2024-38475 - CVE-2024-38475 #version less than 2.4.51 CVE-2021-44790 - h ttps://www.exploit-db.com/exploits/51193 #Apache HTTP Server 2.4.50 CVE-2021-42013 - https://www.exploit-db.com/exploits/50406 use https://github.com/mrmtwoj/apache-vulnerability-testing for below CVE's CVE-2024-38472: Apache HTTP Server on Windows UNC SSRF CVE-2024-39573: mod_rewrite proxy handler substitution CVE-2024-38477: Crash resulting in Denial of Service in mod_proxy CVE-2024-38476: Exploitable backend application output causing internal redirects CVE-2024-38475: mod_rewrite weakness with filesystem path matching CVE-2024-38474: Weakness with encoded question marks in backreferences CVE-2024-38473: mod_proxy proxy encoding problem CVE-2023-38709: HTTP response splitting EXIM #suppodily should work for versions below Exim 4.96.1 - is not accurate CVE-2023-42115 - https://github.com/AdaHop-Cyber-Security/Pocy/tree/main

    Hash Extension Attacks

      #Install Dependencies sudo apt-get install libssl-dev #Download Hash Extender git clone https://github.com/iagox86/hash_extender.git cd hash_extender make #Run it /hash_extender --data 'username=admin' --secret 16 --append '&isLoggedIn=True' --signature d3a85d3b3087c7e841f84eb4316765c6e1f786074a1f1db996b2e0f8c96f197e2f55433920a630feb07daafadefbc13c947e5225fc509f8241f57f47a8df5311 --format sha512