Hi everyone, Today, I'm going to share how I found a Local File Inclusion that affected companies like Facebook, Linkedin, Dropbox and many others.
The LFI was located at the cloud system of Oracle Responsys. For those who do not know Responsys is an enterprise-scale cloud-based business to consumer (B2C). Responsys gives every Business their own "private IP" to use the system in a private way. Business are not sharing IP with other companies.)
How did I found this bug?
Well as usual I was looking for bugs and I note that Facebook was sending me developer emails from the subdomain em.facebookmail.com. For example on my inbox, I had emails from firstname.lastname@example.org
This got me interested on the subdomain em.facebookmail.com and after a quick DIG I note that this subdomain was connected to "Responsys" which I had previously seen in other Pentests
Responsys is providing em.facebookmail.com with the email services as you can see above. The original link I found in my inbox was something like this:
I note that the parameter "_ri_=" is required in order to generate a valid request. And after a bit of testing around, I found that the system was not correctly handling double URL Encoding and using a correct value at the parameter "_ri_" I could inject "%252fetc%252fpasswd" into the URL path.
This was not properly sanitized and was allowing directory traversal characters to be injected and with this retrieve internal files from the affected server.
An example of the Vulnerable URL:
Soon as I saw the vulnerability I knew that this LFI was not only affecting Facebook but also many other companies. All of them using different Private IPs provided by Responsys.
A quick Google Search show me other affected companies with this same bug.
Copying a valid value from the parameter _ri_ to the target company I could retrieve internal information using the same technique.
The impacts of exploiting a Local File Inclusion (LFI) vary from information disclosure to complete compromise of the systems. In this case the impact it worst because one vulnerability affected multiple companies data.
I report this bug to Oracle and the bug got fixed within a week.