Crawling with Different User-Agent Headers

Ứng dụng có thể serve các endpoints khác nhau cho các User-Agent khác nhau, đặc biệt là khi ứng dụng di động sử dụng cùng backend với ứng dụng web. Sau khi đã đi qua một vòng toàn bộ ứng dụng, ta có thể sử dụng extension Multi Session Replay để replay lại các request của một target với một User-Agent khác sử dụng các rule giống với các rule trong “Match and Replace” của Burp Suite:

Xem thêm: [7 Overlooked recon techniques to find more vulnerabilities](https://www.intigriti.com/researchers/blog/hacking-tools/7-overlooked-recon-techniques-to-find-more-vulnerabilities)

Forced Browsing

Chúng ta chỉ nên thực hiện brute-force directory (forced browsing) cho các app nào đáng ngờ và chỉ thực hiện 1-2 lần duy nhất với các tool tự động (ffuf, dirsearch). Sau khi có được danh sách các directory ban đầu, chúng ta sẽ đào sâu vào từng path một cách thủ công sử dụng Intruder.

Sau nhiều lần thực hiện forced browsing, mặc dù phát hiện ra được nhiều directory nhưng lại không thể tìm được các file bên trong các directory này do có WAF hoặc do sự thiếu sót của wordlist.

Khi thực hiện brute-force directory, files, etc, rất có khả năng chúng ta sẽ bị WAF block. Chúng ta sẽ chấp nhận việc bị block và chạy brute-force lần nữa với wordlist được xáo trộn. Chạy một lần có thể miss nhưng chạy nhiều lần thì sẽ giảm được tỷ lệ miss. Mấu chốt là không chạy một lần mà liên tục chạy lại. Có thể xây dựng hạ tầng để chạy theo chu kỳ.

Viewing Webpack Bundled Source Code Using Browsers

Chúng ta có thể xem deobfuscated source code của Webpack thông qua trình duyệt (tab Debugger đối với Firefox hoặc tab Sources đối với Chrome/Edge):

IDOR Cheat Sheet

Các phương pháp khi test IDOR: IDOR Cheat Sheet

Corsy

Trước kia, corsy được chạy mà không có credentials cho một loạt các URLs. Tuy nhiên, việc chạy như vậy không giúp detect được các lỗ hổng CORS misconfig vì nó sẽ không trả về sensitive data mà có ACAO header. Thay vào đó, ta chỉ nên target một domain/subdomain nào đó và chạy để xác định CORS misconfig.

[Intigriti on X: "Automating CORS vulnerabilities can sometimes be quite easy: 😎 1. Discover subdomains using OWASP Amass/Subfinder 2. Run list with Corsy: $ corsy -i ./targets.txt 3. Look for authenticated endpoints on the host that disclose sensitive data to craft a proof of concept 🔗 https://t.co/lqu0Sak4SR" / X](https://x.com/intigriti/status/1932001529302528307)

Reverse DNS Lookup

Sử dụng zdns hoặc massdns (dnsx bị treo):

ax scan default-login-ips.txt -m massdns -o default-login-ips-massdns.txt --extra-args '-t PTR'

Next.js Endpoints

Ta có thể nhanh chóng tìm các endpoint của ứng dụng sử dụng Next.js bằng lệnh sau trong console:

console.log(__BUILD_MANIFEST.sortedPages) or javascript​:console.log(__BUILD_MANIFEST.sortedPages.join('\n'))

Sensitive File Discovery

Tìm tất cả các file nhạy cảm từ danh sách các URLs:

grep -E "\.xls|\.xml|\.xlsx|\.json|\.pdf|\.sql|\.doc|\.docx|\.pptx|\.txt|\.zip|\.tar\.gz|\.tgz|\.bak|\.7z|\.rar|\.log|\.cache|\.secret|\.db|\.backup|\.yml|\.gz|\.config|\.csv|\.yaml|\.md|\.md5"

Sử dụng đối với kết quả của httpx:

cat urls-passive-httpx.txt | grep -vEi '403|404|405' | grep -E "application/vnd\.ms-excel|application/xml|text/xml|application/vnd\.openxmlformats-officedocument\.spreadsheetml\.sheet|application/json|application/pdf|application/sql|application/msword|application/vnd\.openxmlformats-officedocument\.wordprocessingml\.document|application/vnd\.openxmlformats-officedocument\.presentationml\.presentation|text/plain|application/zip|application/x-zip-compressed|application/gzip|application/x-gzip|application/x-gtar|application/octet-stream|application/x-7z-compressed|application/vnd\.rar|application/x-rar-compressed|application/yaml|text/yaml|application/x-yaml|text/csv|text/markdown"

Sử dụng google dork để tìm các file nhạy cảm của một wildcard nào đó:

site:*.example.com (ext:doc OR ext:docx OR ext:odt OR ext:pdf OR ext:rtf OR ext:ppt OR ext:pptx OR ext:csv OR ext:xls OR ext:xlsx OR ext:txt OR ext:xml OR ext:json OR ext:zip OR ext:rar OR ext:md OR ext:log OR ext:bak OR ext:conf OR ext:sql)

WAF Filtering Parentheses Bypass

title: WAF Filtering Parentheses Bypass
Use a call function that doesn't use parentheses, like this one:
 
💥 `onerror=alert;throw 1` 💥
 
This works because `onerror=alert` sets `alert` as the global error handler and then `throw 1` throws an error. That error is caught by the onerror handler… which is alert!
 
So `alert(1`) is triggered without using parentheses 😎
 
#tips #XSS

403 Bypass Techniques

Sau đây là các tips dùng để bypass 403 thủ công:

  • Thêm vào các ký tự đặc biệt:

    • Thêm ./ hoặc %2e. Ví dụ: /admin trở thành /admin/./ hoặc /admin%2e/
    • Thêm / vào cuối path. Ví dụ: /admin thành /admin/
    • Sử dụng các ký tự encoded chẳng hạn như %20 cho khoảng trắng
    • Một số ví dụ khác:
      • /admin/.
      • //admin//
      • /./admin/..
      • /.;/admin
      • //;//admin
      • /admin.'son
  • Thay đổi HTTP method: có thể GET /admin trả về 403 nhưng POST /admin thì lại không.

  • Thêm vào các header sau dùng để giả mạo localhost IP hoặc internal IP chẳng hạn như 127.0.0.1, localhost hay 169.254.169.254:

    • X-Originating-Ip
    • X-Forwarded-For
    • X-Forwarded
    • Forwarded-For
    • X-Remote-Ip
    • X-Remote-Addr
    • X-Proxyuser-Ip
    • X-Original-Url
    • Client-Ip
    • True-Client-Ip
    • Cluster-Client-Ip
    • Host

    Có thể sử dụng httpx với flag -H để thực hiện.

  • Thay đổi địa chỉ IP hoặc sử dụng VPN

[Mastering 403 Forbidden Bypass Techniques ✨ | by Abhijeet Kumawat | Cyber Security Write-ups](https://cybersecuritywriteups.com/mastering-403-forbidden-bypass-techniques-2ab393f1c77f)

Về công cụ:

Chúng ta sẽ sử dụng [devploit/nomore403: 🚫 Advanced tool for security researchers to bypass 403/40X restrictions through smart techniques and adaptive request manipulation. Fast. Precise. Effective.](https://github.com/devploit/nomore403?tab=readme-ov-file) vì nó đáp ứng đủ tất cả các chức năng của các công cụ trên.

Tìm related assets dựa trên favicon hash sử dụng httpx:

cat subdomains.txt | httpx -favicon

Find Emails From a Domain

subfinder -d canva.com | katana -f email

Turn Subdomains into Endpoints

subfinder -d <target> -silent | httpx -silent | katana -f ufile

Resources