recon for real

notes of @jhaddix lives

https://book.hacktricks.xyz/generic-methodologies-and-resources/external-recon-methodology

Assets discovery

  • search engines

Domains and SubDomains

  1. Subfinder
    • subfinder -d DOMAIN -silent -all -o subfinder_output | httpx -silent -o httpx_output
    • subfinder -d domain.com -silent | httpx -status
    • subfinder -d domain | httpx -csp-probe -title
  2. Github-subdomains.py é um script parte do repositório de enumeração Github chamado “github-search”. Ele consultará a API do Github em busca de subdomains https://github.com/gwen001/github-search/blob/master/github-subdomains.py

  3. passive subdomain recon with shodan https://github.com/incogbyte/shosubgo

  4. tomnomnom tool https://github.com/tomnomnom/assetfinder

  5. theHarvester
    • theHarvester -d DOMAIN -b "anubis, baidu, bing, binaryedge, bingapi, bufferoverun, censys, certspotter, crtsh, dnsdumpster, duckduckgo, fullhunt, github-code, google, hackertarget, hunter, intelx, linkedin, linkedin_links, n45ht, omnisint, otx, pentesttools, projectdiscovery, qwant, rapiddns, rocketreach, securityTrails, spyse, sublist3r, threatcrowd, threatminer, trello, twitter, urlscan, virustotal, yahoo, zoomeye"
  6. sub, cloud, js https://github.com/nsonaniya2010/SubDomainizer

  7. VHosts / Virtual Hosts: se você encontrou um endereço IP contendo uma ou várias páginas da web pertencentes a subdomínios, você pode tentar encontrar outros subdomínios nesse IP forçando nomes de domínio VHost com força bruta nesse IP.
  8. CORS Brute Force: as vezes você encontrará páginas que retornam apenas o header Access-Control-Allow-Origin quando um domínio/subdomínio válido é definido no cabeçalho Origin
    • ffuf -w subdomains-top1million-5000.txt -u http://10.10.10.208 -H 'Origin: http://FUZZ.crossfit.htb' -mr "Access-Control-Allow-Origin" -ignore-body
  • [ ] Shodan passive recon

Recon in Cloud based infra

cloud ips:

Amazon: http://bit.ly/2vUSjED

Azure: http://bit.ly/2r7rHeR

Google Cloud: http://bit.ly/2HAsZFm

https://github.com/lord-alfred/ipranges/blob/main/all/ipv4_merged.txt (cloud providers ips)

http://kaeferjaeger.gay/ (cloud providers ips)

Github

After sub enum

[ ] Pré-Manual Testing and Automation

[ ] Test Layers

  • Open Ports and Services
  • Web Hosting Software
  • Application Framework
  • Application Custon Code or COTS
  • Application Libraries (usually javascript)

[ ] Tech-Profiling

  • webanalyze cli tool (wappalyzer)

[ ] Find cve’s and misconfigs

  • nuclei scan for vulns
  • gofingerprint (Tanner Barnes)
  • Sn1per (@xer0dayz)
  • Intrigue Core (jcran)
  • Vulners (Burp ext)
  • Jaeles Scanner (j3ssi3jjj)
  • retire.js

[ ] Service Scanning

[ ] Port Scan

  • use passive methods first, later if you care use active methods

Content/Parameter/URL Discovery

[ ] Application Analysis

  • [ ] Big Questions

    • how does the app pass data?
    • how and where does the app talk about users?
      • where = cookies, api calls; how = uid, email,username, uuid
    • does the site have multi-users or user levels?
      • App designed for multiple customers
      • App has multiple users levels
        • Admin (cms/framework)
        • account admin
        • account user
        • acount view
        • unauthenticated functionality
    • does the site have a unique threat model? (test PII data)
    • has there been past security research & vulns?
    • how does the app handle tries of xss, csrf, injection (sql, template, …)
  • [ ] spidering

    • zaproxy or burp
    • hakcrawler and gospider
  • [ ] javascript analysis

    • find some things hardcoded
    • SecretFinder https://github.com/m4ll0k/SecretFinder
    • linkfinder
    • xnLinkFinder (@xnl-h4ck3r)
    • GAP burp ext
    • minified or obfuscated js still needs to be assessed manually
  • [ ] hot areas

    • “Places” inside the application where bad things can normally happen
    • Or things i want to look at, that may indicate interesting places to explore from a hacker PoV
  • [ ] parameter analysis

  • Adding more constantly…