🇵🇰XSS & Open Redirect

🔥 Perfect regex to Endpoints Analysis

(
figlet -f small -c "UUIDs" | lolcat; grep -Eo '[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}' wayback.txt | sort -u | tee >(wc -l | awk '{print "Total UUIDs: "$1}');
figlet -f small -c "JWT" | lolcat; grep -a "eyJ" wayback.txt | grep -Eo 'eyJ[A-Za-z0-9_\-\.]+' | sort -u | tee >(wc -l | awk '{print "Total JWTs: "$1}');
figlet -f small -c "Suspicious Strings" | lolcat; grep -Eo '([a-zA-Z0-9_-]{20,})' wayback.txt | sort -u | tee >(wc -l | awk '{print "Total Suspicious: "$1}');
figlet -f small -c "Credit Cards" | lolcat; grep -Eo '\b[0-9]{13,16}\b' wayback.txt | sort -u | tee >(wc -l | awk '{print "Total CCs: "$1}');
figlet -f small -c "SessionIDs" | lolcat; grep -Eo '[a-zA-Z0-9]{32,}' wayback.txt | sort -u | tee >(wc -l | awk '{print "Total SessionIDs: "$1}');
figlet -f small -c "Tokens & Secrets" | lolcat; grep -aiE 'token=|token |code=|code |secret=|secret ' wayback.txt | sort -u | tee >(wc -l | awk '{print "Total Tokens/Secrets: "$1}');
figlet -f small -c "Credentials" | lolcat; grep -aiE 'admin|pass(word|wd|wd=)|pwd|passwd|password|mail|phone|mobile|number' wayback.txt | sort -u | tee >(wc -l | awk '{print "Total Cred-like: "$1}');
figlet -f small -c "Private IPs" | lolcat; grep -Eo '((10|172\.(1[6-9]|2[0-9]|3[0-1])|192\.168)\.[0-9]{1,3}\.[0-9]{1,3})' wayback.txt | sort -u | tee >(wc -l | awk '{print "Total Private IPs: "$1}');
figlet -f small -c "All IPs" | lolcat; grep -Eo '([0-9]{1,3}\.){3}[0-9]{1,3}' wayback_domain.com.txt | sort -u | tee >(wc -l | awk '{print "Total IPs: "$1}');
figlet -f small -c "Payments" | lolcat; grep -aiE 'payment|order(id)?|pay(id)?|invoice|receipt' wayback.txt | sort -u | tee >(wc -l | awk '{print "Total Payments: "$1}');
figlet -f small -c "Roles" | lolcat; grep -aiE 'role=|privilege=|=admin' wayback.txt | sort -u | tee >(wc -l | awk '{print "Total Roles: "$1}');
figlet -f small -c "API Endpoints" | lolcat; grep -aiE '/api/|api\.|/graphql|graphql' wayback.txt | sort -u | tee >(wc -l | awk '{print "Total API Endpoints: "$1}');
figlet -f small -c "Auth Stuff" | lolcat; grep -aiE 'sso|/sso|saml|/saml|oauth|/oauth|auth|/auth|callback|/callback' wayback.txt | sort -u | tee >(wc -l | awk '{print "Total Auth: "$1}');
f
)

Subdomains Gathering

Open redirects in the login flow mostly have the session token or any other auth token in the query param.

server-side redirects always use Location response header with 3XX status code If missing Location response header but still redirects (after a small delay), it DOM-based redirect

Run open-dork.sh Script

Check Server and client side redirect then Exploit Further

Find XSS Steps

  • Check Subdomains.sh to tech based Filters Domains

  • Check Ext-dork to tech based Filters Domains

  • Check Shodan-dork to tech based Filters Domains

  • Run ext-dork.sh Script with Specific Domain

Check Hidden Paths inroborts.txt

  • Run hostname:"mytoken.us.dell.com" Shodan

  • Run host:"mytoken.us.dell.com" Fofa

  • nslookup mytoken.us.dell.com

  • Run Fuzzing with FFUF

  • Run Fuzzing with Gobuster

  • Run Fuzzing with Dirsearch

  • Run Arjun

  • Run ParamPamPam

  • Run x8 with parameters wordlist

  • https://xss.report/dashboard swagpk Synack@3434

  • https://bxsshunter.com/dashboard Synack@3434

---------------------------------------------------------------------

2

DOM XSS Check In Redirect Parameters

3

If Access token available In Redirect URL then Check Account take Over

OR Check with Burp Collaborater And Webhook URL

4

SSRF Check In Redirect OR Data Fetch and File Download Parameters

5

if SSRF then check to Reflected XSS

Example: https://mop4.com/?url=https://brutelogic.com.br/poc.svg

6

if SSRF then check to RCE

7

Blind XSS Check to Account take Over

swagpk Synack@3434
Synack@34343
8
9

Find Hidden Endpoints FOR Fuzzing

10

Find Hidden Parameters

11

Find XSS vulnerable Endpoint to check in other Subdomains

12

Confirm Vulnerable Parameter for Html injection OR Reflected XSS

13
14

Find Origin IP for Bypass WAF

Last updated