As i said before sharing is caring, here i am describing one of my findings that was closed 2 weeks ago in yahoo Guesthouse https://gh.bouncer.login.yahoo.com/ and i am describing in details, how recon helped me finding a vulnerable endpoint where i achieved the SSRF.
As mentioned publicly Yahoo! Guesthouse is a set of administration tools used by Yahoo! on a daily basis. They allow Yahoo! administrators to control all aspects of the Yahoo! network, from mail and hosting accounts to server settings and hosting management. Certain parts of the system, such as error reporting tools, are also available to Yahoo!’s customer services team.
If you hunt a lot in yahoo you will notice that when you try to open some subdomains in browser you will be redirected to yahoo gueshose login page where you should enter a username and a password related to yahoo employees and then you will be redirected to the subdomain you are trying to reach as per the below :
I remember that i did scan that before, tried alot to search for vulenrable endpoints, hidden folders/files and couldn't achieve anything out of it, and obviously i don't have credentials to login,but working on another subdomain helped me finding the vulnerable endpoint in that target.
so during my normal recon for yahoo i found that target https://alpha.keyserver.yahoo.com/ when you open it you will get not found response as per the below :
so doing dirsearch took time in that target and result was great, i found a SAML endpoint https://alpha.keyserver.yahoo.com/saml that redirected me to the Yahoo Guesthouse login page i mentioned, but new thing appeared :D, it says after successful login you will be redirected to to a SAML endpoint, the endpoint was new to me in yahoo Guesthouse as per the below :
So doing view source to the page i was able to see the full endpoints which is :
Now for those who don't know, SAMLRequest and SAMLResponse in SAML are base64 encoded XML , So after decoding it and trying to test for XXE and SSRF in the XML request you might get a good bug, but i failed to exploit it , for more information about this technique you can refer to the amazing write up from @seanmeals https://seanmelia.files.wordpress.com/2016/01/out-of-band-xml-external-entity-injection-via-saml-redacted.pdf that worked for me in another private program.
What to do now ?
So even though i could exploit this, even though i also tried to bypass the SSO itself, i couldn't just move on, tried to dig more and more in this , so when i was checking the request in burp i found something special in the GET request for the above endpoint, there was a cookie BouncerSAMLRemoteSessionHost=bouncer12-os.gh.bf2.yahoo.com; as you can see the cookie value is a website/yahoo subdomain so there is a high chance for an SSRF here.
Yes i was right, as you can see below i added my VPS ip address with port 4566 in the BouncerSAMLRemoteSessionHost cookie and i had netcat listening in my VPS and received a request from dip2.gq1.yahoo.com (184.108.40.206) port 48633:
Its also important to mention that if you don't have VPS, Collaborator everywhere in burp can help you testing that thanks to @albinowax as i also confirmed that host is vulnerable to external DNS interactions in the X-Forwarded-For, so i could have just put the same value that burp sends in the cookie and confirm the issue without using a VPS.
tried to read files or escalate this ssrf and couldn't, so i reported to yahoo and got triaged immediately, bounty not received yet but hope it will be good.
Key Points Here :
1- Recon Wins, see where i reached from a “not found” response on a subdomain to a bug in another subdomain.
2- Never give up, put more efforts in what you are doing and read other hunters write-ups as it will help you to find bugs in other places.
3- For those who don't share findings where they can, i will not blame you, its your choice and i respect that but if you can just do it, do it for the community, for the new hackers here, small informations like this will help them to understand HOW to look for bugs and exploit them, we are not doing Black Magic here :)