Skip to content

Commit 6840b01

Browse files
authoredNov 16, 2020
Merge pull request KathanP19#117 from febinrev/master
Create find_OpenRedirect_trick.md
2 parents 5674e47 + 8091ff6 commit 6840b01

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed
 
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
## A small trick to find Open Redirection if you couldn't find any Redirection parameters.
2+
3+
*"I apply this everytime while testing web applications and found many Open Redirects and even an XSS using this trick!"*
4+
5+
### Steps:
6+
------------------------------------------------------------------------------------------------------------------------------------------------------------
7+
1. If the Applictaion have a user Sign-In/Sign-Up feature, then register a user and log in as the user.
8+
9+
2. Go to your user profile page , for example : samplesite.me/accounts/profile
10+
11+
3. Copy the profile page's URL
12+
13+
4. Logout and Clear all the cookies and go to the homepage of the site.
14+
15+
5. Paste the Copied Profile URL on the address bar
16+
17+
6. If the site prompts for a login , check the address bar , you may find the login page with a redirect parameter like the following
18+
- https://samplesite.me/login?next=accounts/profile
19+
- https://samplesite.me/login?retUrl=accounts/profile
20+
21+
7. Try to exploit the parameter by adding an external domain and load the crafted URL
22+
eg:- https://samplesite.me/login?next=https://evil.com/
23+
(or)
24+
https://samplesite.me/login?next=https://samplesite.me@evil.com/ #(to beat the bad regex filter)
25+
26+
8. If it redirects to evil.com , thers's your open redirection bug.
27+
28+
9. Try to leverage it to XSS
29+
eg:- https://samplesite.me/login?next=javascript:alert(1);//
30+
31+
-------------------------------------------------------------------------------------------------------------------------------------------------------------
32+
33+
#### Author: [febinrev](https://twitter.com/febinrev)

0 commit comments

Comments
 (0)
Please sign in to comment.