Search
-::DESCRIPTION
-::DATE
Showing posts with label Facebook Bugs. Show all posts
Showing posts with label Facebook Bugs. Show all posts
Reading Local Files from Facebook's Server | Writeup by Josip Franjkovic
Labels:
Facebook Bugs
Today we gonna post a POC of Reading Local Files From Facebook's Server by Josip Franjkovic.. He found this bug in the year of 2014 and also got rewarded with $5500 bounty by Facebook Security Team.
Let me continue this post with his own words...
Writeup :
========
In the year of 2014, I found a vulnerability in Facebook which allowed me to read local files from Facebook's servers. The vulnerable part of Facebook was their Careers resume uploader, located at every job offer, for example this one.
You can upload any extension there, so I decided to upload a .php file - one can always hope. Of course, it was not executed nor could I get file path, but contents of the file were returned, after being base64 encoded. Next thing I tried was to name my file /etc/passwd, "file:///etc/passwd" and couple others. None of these worked.
Couple tries later I uploaded a zipped .php file, and the response contained unzipped, base64'd contents of .php. If you read Facebook's Bounty Hunter's Guide you will know where this leads. The guide describes how one researcher uploaded zip with symlink to /etc/passwd, and couple steps later Facebook returned few lines of /etc/passwd.
I have done exactly the same, so:
1. create a symlink to /etc/passwd (or any other file you want to read)
2. zip the created link while preserving symlinks:
3. upload test.zip as your resume, system will unzip it
4. the response to POST will have details of (whole) /etc/passwd or other file.
Screenshot of response containing /etc/passwd :
================================
I have speculated about symlinking a directory, but never tried it. Neal from Facebook thought that this might get me contents of files from the directory, but not necessarily filenames. We shall never know.
Timeline :
=======
Nov 30, 2014 09:45 - vulnerability reported
Nov 30, 2014 17:58 - reply from Facebook's security (Neal) saying they cannot reproduce bug
Nov 30, 2014 18:08 - update from Neal, they can reproduce it
Nov 30, 2014 19:10 - temporary fix has been pushed, disabling resume uploads
Dec 01, 2014 ~23:00 - more permanent fix pushed, now server no longer responds with contents of uploaded resume (Emrakul)
Dec 05, 2014 18:15 - bounty of $5500 awarded (Neal).
Dec 05, 2014 ~19:00 - objection about reward sent to Facebook's team
Dec 06, 2014 ~23:30 - Neal from Facebook explains this is actually a third party system they run
I'd like to ramble a bit about the award for this bug. When I found it, it looked like a critical bug that could allow me to read parts of Facebook's source. It turned out to actually be a third party software they used to analyse uploaded resumes, therefore I could not actually access any part of Facebook's internals. The network this system is hosted on was pretty locked down, too.
Basically, this is a bug that looks really critical, but is much lower severity. It is an exact opposite to a low severity bug I found some time ago that turned out to be more dangerous.
Lessons learned :
===========
Read all write-ups you can get your hands on. I would never think of uploading the zip with symlinks if I did not read Facebook's blog. Philippe has a good list of Facebook bugs here.
Some bugs are not what they look like :-)
Huge thanks to researcher who first used ZIP with symlinks, and to Facebook for blogging about it, and their security team for being awesome as always, fixing the bug in 10 hours on Sunday.
Let me continue this post with his own words...
Writeup :
========
In the year of 2014, I found a vulnerability in Facebook which allowed me to read local files from Facebook's servers. The vulnerable part of Facebook was their Careers resume uploader, located at every job offer, for example this one.
You can upload any extension there, so I decided to upload a .php file - one can always hope. Of course, it was not executed nor could I get file path, but contents of the file were returned, after being base64 encoded. Next thing I tried was to name my file /etc/passwd, "file:///etc/passwd" and couple others. None of these worked.
Couple tries later I uploaded a zipped .php file, and the response contained unzipped, base64'd contents of .php. If you read Facebook's Bounty Hunter's Guide you will know where this leads. The guide describes how one researcher uploaded zip with symlink to /etc/passwd, and couple steps later Facebook returned few lines of /etc/passwd.
I have done exactly the same, so:
1. create a symlink to /etc/passwd (or any other file you want to read)
ln -s /etc/passwd link
zip --symlinks test.zip link
4. the response to POST will have details of (whole) /etc/passwd or other file.
Screenshot of response containing /etc/passwd :
================================
I have speculated about symlinking a directory, but never tried it. Neal from Facebook thought that this might get me contents of files from the directory, but not necessarily filenames. We shall never know.
Timeline :
=======
Nov 30, 2014 09:45 - vulnerability reported
Nov 30, 2014 17:58 - reply from Facebook's security (Neal) saying they cannot reproduce bug
Nov 30, 2014 18:08 - update from Neal, they can reproduce it
Nov 30, 2014 19:10 - temporary fix has been pushed, disabling resume uploads
Dec 01, 2014 ~23:00 - more permanent fix pushed, now server no longer responds with contents of uploaded resume (Emrakul)
Dec 05, 2014 18:15 - bounty of $5500 awarded (Neal).
Dec 05, 2014 ~19:00 - objection about reward sent to Facebook's team
Dec 06, 2014 ~23:30 - Neal from Facebook explains this is actually a third party system they run
I'd like to ramble a bit about the award for this bug. When I found it, it looked like a critical bug that could allow me to read parts of Facebook's source. It turned out to actually be a third party software they used to analyse uploaded resumes, therefore I could not actually access any part of Facebook's internals. The network this system is hosted on was pretty locked down, too.
Basically, this is a bug that looks really critical, but is much lower severity. It is an exact opposite to a low severity bug I found some time ago that turned out to be more dangerous.
Lessons learned :
===========
Read all write-ups you can get your hands on. I would never think of uploading the zip with symlinks if I did not read Facebook's blog. Philippe has a good list of Facebook bugs here.
Some bugs are not what they look like :-)
Huge thanks to researcher who first used ZIP with symlinks, and to Facebook for blogging about it, and their security team for being awesome as always, fixing the bug in 10 hours on Sunday.
Posted by Pentesting-Lab at 23:00 0 comments
Hijacking any Facebook Account with SMS | Writeup by Include Security
Labels:
Facebook Bugs
Today we have POC of Hijacking a Facebook Account just with an simple SMS by a British Security Consultant fin1te from Include Security... He found this bug in the year of 2013.
Lets continue with his own words...
This post will demonstrate a simple bug which will lead to a full takeover of any Facebook account, with no user interaction.
Facebook gives you the option of linking your mobile number with your account. This allows you to receive updates via SMS, and also means you can login using the number rather than your email address.
The flaw lies in the /ajax/settings/mobile/confirm_phone.php end-point. This takes various parameters, but the two main are code, which is the verification code received via your mobile, and profile_id, which is the account to link the number to.
The thing is, profile_id is set to your account (obviously), but changing it to your target’s doesn’t trigger an error.
To exploit this bug, we first send the letter F to 32665, which is Facebook’s SMS shortcode in the UK. We receive an 8 character verification code back.
We enter this code into the activation box (located here), and modify the profile_id element inside the fbMobileConfirmationForm form.
Submitting the request returns a 200. You can see the value of __user (which is sent with all AJAX requests) is different from the profile_id we modified.
Note: You may have to reauth after submitting the request, but the password required is yours, not the targets.
An SMS is then received with confirmation.
Now we can initate a password reset request against the user and get the code via SMS.
Another SMS is received with the reset code.
We enter this code into the form, choose a new password, and we’re done. The account is ours.
Fix
====
Facebook responsed by verifying that you have permission to modify the phone number on the profile denoted by profile_id.
Timeline
=========
23rd May 2013 - Reported
28th May 2013 - Acknowledgment of Report
28th May 2013 - Issue Fixed
Note
======
The bounty assigned to this bug was $20,000, clearly demonstrating the severity of the issue
Lets continue with his own words...
This post will demonstrate a simple bug which will lead to a full takeover of any Facebook account, with no user interaction.
Facebook gives you the option of linking your mobile number with your account. This allows you to receive updates via SMS, and also means you can login using the number rather than your email address.
The flaw lies in the /ajax/settings/mobile/confirm_phone.php end-point. This takes various parameters, but the two main are code, which is the verification code received via your mobile, and profile_id, which is the account to link the number to.
The thing is, profile_id is set to your account (obviously), but changing it to your target’s doesn’t trigger an error.
To exploit this bug, we first send the letter F to 32665, which is Facebook’s SMS shortcode in the UK. We receive an 8 character verification code back.
We enter this code into the activation box (located here), and modify the profile_id element inside the fbMobileConfirmationForm form.
Submitting the request returns a 200. You can see the value of __user (which is sent with all AJAX requests) is different from the profile_id we modified.
Note: You may have to reauth after submitting the request, but the password required is yours, not the targets.
An SMS is then received with confirmation.
Now we can initate a password reset request against the user and get the code via SMS.
Another SMS is received with the reset code.
We enter this code into the form, choose a new password, and we’re done. The account is ours.
Fix
====
Facebook responsed by verifying that you have permission to modify the phone number on the profile denoted by profile_id.
Timeline
=========
23rd May 2013 - Reported
28th May 2013 - Acknowledgment of Report
28th May 2013 - Issue Fixed
Note
======
The bounty assigned to this bug was $20,000, clearly demonstrating the severity of the issue
Posted by Pentesting-Lab at 23:48 0 comments
XSS on Facebook Graph API | Writeup by Pavel Toporkov
Labels:
Facebook Bugs
Today we have POC of XSS on Facebook by Pavel Toporkov. Let me continue this post with his words.
One day, browsing Facebook I discovered an interesting tool – Graph API Explorer. It's a tool designed to work with Facebook Graph API. It allows reading or posting data on Facebook, testing permissions, etc. So what can it actually do?
Make JSONP request to graph.facebook.com with some callback to include this JSON data in the page. Of course, at first I tried to include callback parameter in the request, but the result was unsuccessful. After lots of tries to inject something, I found an interesting script that exists on almost every Facebook domain. It's login.php which allows redirection to any *.facebook.com page.
First, I tried to make redirection to http://graph.facebook.com/me?callback=alert, and it worked! I got alert with the [Object object] text. Great!
https://developers.facebook.com/tools/explorer?method=GET&path=login.php?next%3dhttps%253a//graph.facebook.com/me%253fcallback%253dalert
But of course, it couldn’t stop unless I would be able to run arbitrary code. I just needed to find any place on *.facebook.com where I could store my malicious code. My first try was to send file to another user via Facebook messages. All I did was just sending an evil.txt file with malicious code, and changing its content-type to text/javascript. After that, this file was available via the following link:
https://www.facebook.com/ajax/messaging/attachment.php?attach_id=&mid=&hash=
The file becomes available only for the receiver of the message, but we can make a specially crafted .gif file containing Javascript code (thanks to @isciurus), send it to the victim, get the link to the malicious file and leverage that link to exploit the vulnerability. The victim will get the image, click on it, and because of "Content-Disposition" header it will be saved to the victim’s computer and will behave like a normal .gif image. So, nothing suspicious. Anyway, I bet, there are lots of places on *.facebook.com where we can store our payload.
Ok, let’s try to execute our code. A try ... resulting in a failure. There is the "content-security-policy" header, which disallows running this code. It seems like I should find another place to store my code.... But wait! Internet Explorer ignores this header because it requires "x-content-security-policy header". So, I checked it in IE 10 and it worked out great.
https://developers.facebook.com/tools/explorer?method=GET&path=login.php?next%3dhttps://www.facebook.com/ajax/messaging/attachment.php%253fattach_id%253d%2526mid%253d%2526hash%253d
I conducted XSS, got a reward, lots of fun and, in addition, made a cool screenshot ;)
One day, browsing Facebook I discovered an interesting tool – Graph API Explorer. It's a tool designed to work with Facebook Graph API. It allows reading or posting data on Facebook, testing permissions, etc. So what can it actually do?
Make JSONP request to graph.facebook.com with some callback to include this JSON data in the page. Of course, at first I tried to include callback parameter in the request, but the result was unsuccessful. After lots of tries to inject something, I found an interesting script that exists on almost every Facebook domain. It's login.php which allows redirection to any *.facebook.com page.
First, I tried to make redirection to http://graph.facebook.com/me?callback=alert, and it worked! I got alert with the [Object object] text. Great!
https://developers.facebook.com/tools/explorer?method=GET&path=login.php?next%3dhttps%253a//graph.facebook.com/me%253fcallback%253dalert
But of course, it couldn’t stop unless I would be able to run arbitrary code. I just needed to find any place on *.facebook.com where I could store my malicious code. My first try was to send file to another user via Facebook messages. All I did was just sending an evil.txt file with malicious code, and changing its content-type to text/javascript. After that, this file was available via the following link:
https://www.facebook.com/ajax/messaging/attachment.php?attach_id=&mid=&hash=
The file becomes available only for the receiver of the message, but we can make a specially crafted .gif file containing Javascript code (thanks to @isciurus), send it to the victim, get the link to the malicious file and leverage that link to exploit the vulnerability. The victim will get the image, click on it, and because of "Content-Disposition" header it will be saved to the victim’s computer and will behave like a normal .gif image. So, nothing suspicious. Anyway, I bet, there are lots of places on *.facebook.com where we can store our payload.
Ok, let’s try to execute our code. A try ... resulting in a failure. There is the "content-security-policy" header, which disallows running this code. It seems like I should find another place to store my code.... But wait! Internet Explorer ignores this header because it requires "x-content-security-policy header". So, I checked it in IE 10 and it worked out great.
https://developers.facebook.com/tools/explorer?method=GET&path=login.php?next%3dhttps://www.facebook.com/ajax/messaging/attachment.php%253fattach_id%253d%2526mid%253d%2526hash%253d
I conducted XSS, got a reward, lots of fun and, in addition, made a cool screenshot ;)
Posted by Pentesting-Lab at 22:40 0 comments
How I hacked your unverified facebook accounts | Writeup by Abhibandu Kafle
Labels:
Facebook Bugs
In the year of 2014, an Nepali Security Researcher, Abhibandu Kafle, found a bug on Facebook that allows him to delete any unverified account (By unverified, he means those accounts who didnot yet verify their email address linked to facebook). Here's a little write-up on this bug by his own words.
Here is how I did it :
There is(was , now) this sign up function, which lets you create new facebook account. The twist is, when you use a facebook account that already has an account in facebook (with its email unverified), the response you get is :
When clicked on the "Insert the confirmation code instead" it lets you enter 5-digit number only code.
Pretty simple , eh?
Lets generate a dictionary from 00000 to 99999.
#!/usr/bin/env python
def add_zeros(end,tot):
zeros=''
while (len(zeros)<(len(tot)-len(end))):
zeros=zeros+'0'
return zeros+end
verification_code=5
code=''
path=raw_input(" where do you want to store your dictionary file. eg. D:\derp\foo.txt ")
loop_range=verification_code-len(code)
nines=''
for i in range(0,loop_range):
nines=nines+'9'
nine=int(nines)
fob=open(path,'w')
for i in range(0,nine+1):
j=str(i)
if len(j)<len(nines):
j=add_zeros(j,nines)
number=code+j+'\n'
fob.write(number)
fob.close()
print 'Generated and Saved!'
def add_zeros(end,tot):
zeros=''
while (len(zeros)<(len(tot)-len(end))):
zeros=zeros+'0'
return zeros+end
verification_code=5
code=''
path=raw_input(" where do you want to store your dictionary file. eg. D:\derp\foo.txt ")
loop_range=verification_code-len(code)
nines=''
for i in range(0,loop_range):
nines=nines+'9'
nine=int(nines)
fob=open(path,'w')
for i in range(0,nine+1):
j=str(i)
if len(j)<len(nines):
j=add_zeros(j,nines)
number=code+j+'\n'
fob.write(number)
fob.close()
print 'Generated and Saved!'
Now, straightforward stuff! I fired up Burp, "Swiss army knife" for me.
Notice something peculiar in the last request?
Yes, the response length changes to show that you've made the correct guess. (AJAX response in burp response says that).
Some math work :
possible password = 100,000
If , no. of requests = 100/sec
Time taken to find out "teh code" (worst case scenerio) = 15 minutes
The impact :
I could permanently delete any unverified facebook accounts within 15 minutes. You would try to recover using "password recover" feature but all your friends, PM's would be gone. You would have to create entirely new account.
All I had to do was squander my bandwidth (and sit back and relax).
How did I find out if an account was unverified?
Well, one way was to sign up using that email and see the response (if you are asked to enter confirmation code or not).
For a large number of emails, the other way was to enumerate facebook users first, to find out if the email had a facebook account and then use "Change email address field" to sort out which accounts have facebook associated with it and are still unverified.
8 hours later i got reply from Facebook Team and was patched within 3 days of submission, however they were making strange changes for about a month even after bounty payout (in their mobile platforms and mobile apps).
and a handsome bounty followed up:
Posted by Pentesting-Lab at 23:00 0 comments
Logical Bug on Facebook Pages | Writeup by Uttam Soren
Labels:
Facebook Bugs,
Uttam Soren
A few days ago we have posted writeup of a Bug in Facebook Acquisitions allows to access anyone's account by Uttam Soren. Today we gonna post writeup of Logical Bug on Facebook Pages again by Uttam Soren..
As per him, On the month of July,2014 I found a Logical Bug on Facebook Pages. There were two issues on the Facebook Pages.
1. Normal User Blocks the Admin of a Facebook Page:
It was very simple i.e. block the admin of any Facebook Page then you could post on that page and your posts to the page would not be visible to admin hence admin cannot delete your posts or comments and also cannot ban you from that page.
2. Admin Blocks the Other Admin of Same Page:
If a page has two or more than two admins then if any one admin posts on behalf of page then other admins can see who has posted that particular post as there would be information about it like "Posted by Uttam Soren".
But I found that if one adimn (Admin_1) blocks the other admin (Admin_2) or admins (Admin_3, Admin_4, Admin_5,...) of same page then if Admin_1 posts on behalf of page then other admins (Admin_2, Admin_3, Admin_4,...) cannot know who has posted that post as the information will not shown to them as they were blocked by Admin_1 and only post time is visible to them.
I quickly reported both isuses to Facebook. First issue got duplicate as someone had already reported it to Facebook but second issue was unknown to them.
Later they fixed the bug and rewarded me with $500 USD.
Timeline :
============
SAT, JUL 19, 2014 11:51 AM - Report Sent
WED, JUL 23, 2014 3:30 AM - Escalation by Facebook
SAT, AUG 2, 2014 5:55 PM - Fix Deployed by Facebook
SAT, AUG 2, 2014 5:55 PM - Bounty Awarded of $500 USD by Facebook
As per him, On the month of July,2014 I found a Logical Bug on Facebook Pages. There were two issues on the Facebook Pages.
1. Normal User Blocks the Admin of a Facebook Page:
It was very simple i.e. block the admin of any Facebook Page then you could post on that page and your posts to the page would not be visible to admin hence admin cannot delete your posts or comments and also cannot ban you from that page.
2. Admin Blocks the Other Admin of Same Page:
If a page has two or more than two admins then if any one admin posts on behalf of page then other admins can see who has posted that particular post as there would be information about it like "Posted by Uttam Soren".
But I found that if one adimn (Admin_1) blocks the other admin (Admin_2) or admins (Admin_3, Admin_4, Admin_5,...) of same page then if Admin_1 posts on behalf of page then other admins (Admin_2, Admin_3, Admin_4,...) cannot know who has posted that post as the information will not shown to them as they were blocked by Admin_1 and only post time is visible to them.
I quickly reported both isuses to Facebook. First issue got duplicate as someone had already reported it to Facebook but second issue was unknown to them.
Later they fixed the bug and rewarded me with $500 USD.
Timeline :
============
SAT, JUL 19, 2014 11:51 AM - Report Sent
WED, JUL 23, 2014 3:30 AM - Escalation by Facebook
SAT, AUG 2, 2014 5:55 PM - Fix Deployed by Facebook
SAT, AUG 2, 2014 5:55 PM - Bounty Awarded of $500 USD by Facebook
Posted by Pentesting-Lab at 06:23 0 comments
SSRF/XSPA bug on Facebook | Writeup by Paul OS
Labels:
Facebook Bugs,
Paul OS
Hello friends, Today we gonna post POC of SSRF/XSPA Vulnerablity on Facebook This bug has been submitted to Pentesting Lab by Paul Os.
According to him,
An application is vulnerable to Cross Site Port Attacks (SSRF/XSPA) if the application processes user supplied URLs and does not verify/sanitize the backend response received from remote servers before sending it back to the client.
An attacker can send crafted queries to a vulnerable web application to proxy attacks to external Internet facing servers, intranet devices and the web server itself using the advertised functionality of the vulnerable web application. The responses, in certain cases, can be studied to identify service availability (port status, banners etc.) and even fetch data from remote services in unconventional ways.
XSPA allows attackers to target the server infrastructure, mostly the intranet of the web server, the web server itself and any public Internet facing server as well. This Vulnerability can be used for:
1) Port Scanning remote Internet facing servers, intranet devices and the local web server itself. Banner grabbing is also possible in some cases.
2) Exploiting vulnerable programs running on the Intranet or on the local web server.
when sending a message to a user in the chat section it is possible to add websites... and Facebook will go check the link to get favicon and title.
If we for example give it, http://target.com:80/ it will print out the contents of the site since http/80 runs there. but if we gave it closed ports like http:// target.com:31337/ , it will suffer to get output thus, reaveling if port is open or closed.
Now the issue has been fixed and Facebook have put mitigation strategies for possible abuse to scan internal servers or so... :-)
According to him,
An application is vulnerable to Cross Site Port Attacks (SSRF/XSPA) if the application processes user supplied URLs and does not verify/sanitize the backend response received from remote servers before sending it back to the client.
An attacker can send crafted queries to a vulnerable web application to proxy attacks to external Internet facing servers, intranet devices and the web server itself using the advertised functionality of the vulnerable web application. The responses, in certain cases, can be studied to identify service availability (port status, banners etc.) and even fetch data from remote services in unconventional ways.
XSPA allows attackers to target the server infrastructure, mostly the intranet of the web server, the web server itself and any public Internet facing server as well. This Vulnerability can be used for:
1) Port Scanning remote Internet facing servers, intranet devices and the local web server itself. Banner grabbing is also possible in some cases.
2) Exploiting vulnerable programs running on the Intranet or on the local web server.
when sending a message to a user in the chat section it is possible to add websites... and Facebook will go check the link to get favicon and title.
If we for example give it, http://target.com:80/ it will print out the contents of the site since http/80 runs there. but if we gave it closed ports like http:// target.com:31337/ , it will suffer to get output thus, reaveling if port is open or closed.
Now the issue has been fixed and Facebook have put mitigation strategies for possible abuse to scan internal servers or so... :-)
Posted by Pentesting-Lab at 22:58 0 comments
Bug in Facebook Acquisitions allows to access anyone's account | Writeup by Uttam Soren
Labels:
Facebook Bugs,
Uttam Soren
Couple of years ago, an India Security Researcher, Uttam Soren , found a bug in Facebook acquisition that allows to gain the access of any user account. He reported it to Facebook and Facebook rewarded him with $1000.
Let me continue his writeup with his own words...
Since I started Bug Hunting in 2014 I was trying to find bugs in Facebook but it already has too many bug hunters hunting it and making it more secure meaning it's not easy to find bugs on it. So I decided to look into facebook's acquisitions. I googled and found the list of facebook's acquisitions in wikepedia page (List of Mergers and Acquisitions by Facebook). That time Moves was the latest acquistion of Facebook & Moves is very much in scope.
I downloaded the android app on my friend's android phone as the app was not supported on my phone. Created an account using the app and then logged in to my newly created Moves account on my laptop. It was a very simple website, you login to your account, you can see your Account Info, Connected Apps, Change your Email address, Change your Password, Sign Out of Phone, Export Data or Delete Account. Found nothing till 1/2 hours, thought it is well secured. Then decided to check the OWASP's top 10 vulnerabilities for 2013 and Broken Authentication & Session Management was on #2. Started to test Broken Authentication & Session Management on Moves. Started Burp Suite and configured it to intercept my browser's requests & responses. Logged in to Moves account and clicked on Account Info, captured the request on Burp and sended it to Burp Repeater then clicked on Sign Out. After signed out of account replayed the captured request and in response there was no error, the captured request was still valid.
The PLAY_SESSION=[value] was not expiring after users sign out of account. Same PLAY_SESSION=[value] could be used again & again to access the account without giving any login credentials. So if any attacker somehows got that PLAY_SESSION=[value] could access the account without knowing the users credendtials. Aslo if users finds that their account has been compromised then users would change their passwords to secure their accouts but in Moves session was not getting invalidated after any password change. So it clearly means that if attacker had got users PLAY_SESSION=[value] then their is no option for users to recover their accounts.
Quickly reported it to Facebook. They fixed it and rewarded me with $1000 USD and listed on their Whitehat Thanks page.
Timeline :
=============
SUN, JUN 15, 2014 6:48 PM - Report Sent
TUE, JUN 17, 2014 3:49 AM - Escalation by Facebook
WED, JUN 18, 2014 11:31 PM - Fix Deployed by Facebook
THU, JUN 19, 2014 2:36 AM - Bounty Awarded of $1000 USD by Facebook
Posted by Pentesting-Lab at 23:29 0 comments
Facebook Bug allows to post on behalf of anyone | Writeup by Anand Prakash
Labels:
Facebook Bugs
Hello guys, today we have write up of an Indian Security Researcher, Anand Prakash, who found a bug on Facebook which allows him to post on behalf of anyone.
Let me continue this with his own words...
Facebook recently introduced "Say Thanks", an experience that lets Facebook user to create personalized video cards for their facebook friends.
To create a Thanks video, a user needs to visit facebook.com/thanks and have to choose a friend. A user can select a different theme and edit photos and posts that represent their friendship.
Once you are ready you have to click on the "Share" button and your video will be shared on your timeline with the friend tagged. It will show up on your's as well as the friend's timeline.
So, I started digging up as soon as "Say Thanks" was launched.
Below are the few things that I tried :
1) Posting on the behalf of non-Facebook friend.
2) Posting on the behalf of a Facebook friend.
Interestingly, posting on behalf of your Facebook friends worked.
After the successful exploitation a video was posted from victim's profile saying thanks.
Bug type : Insecure direct object reference ( OWASP A4 )
Steps to reproduce:
1) Go to https://www.facebook.com/thanks
2) Choose any friend from your list. Now on the top up corner click on "Share video" option.
3) Now before posting make sure Burp Suite's Interceptor is turned on to capture the request.
Click on "Post Video" now, you will see below kind of
request in Burp suite:
POST /thanks/send/async/ HTTP/1.1
Host: www.facebook.com
fb_dtsg=YYYYYY&message_text=Hey Anand, I made you a video to say thanks for being such a good friend. You can make your own at facebook.com/thanks #saythanks&message=Hey @[1234543:Anand], I made you a video to say thanks for being such a good friend.
You can make your own at facebook.com/thanks #saythanks&cache_version=24&content=[]&content_count=0&receiver={"id":1234543,"fbid":1234543,"name":"Anand Prakash","imageURL":"","gender":2,"greeting":"Hey Anand","shortName":"Anand","relationship":-1," relationshipName":null,"firstName":"Anand","genderType ":"MALE","profilePhoto":"","profilePhotoID":8359028035," profilePhotoBegin":"}& sender={"id ": 131232524 ,"name":"Sangwan Manisha","firstName":"Manisha","genderType":"FEMALE"
,"profilePhoto":"","profilePhotoID":,"profilePhotoBegin":"","profilePhotoBeginID":328985902339}
×tamp=1417279810172&theme_details={}
&theme_id=DEFAULT_THEME&privacyx=9238943&__
user=1234543__a=1&__dyn=&__req=13&ttstamp=__rev=1512134
4) I changed the sender={id=XXXXX to victim's Facebook ID (here XXXXX) and in few seconds video got posted from the victim's Facebook profile.
Timeline:
==========
Nov 14, 2014 12:41am - Report Sent to Facebook Security team
Nov 14, 2014 2:00am - Initial Reply from Mordecai saying he is not able to reproduce the issue
Nov 14, 2014 8:17am - Confirmation of vulnerability from Neal Poole
Nov 14, 2014 10:42am - Issued fixed by Facebook
Nov 14, 2014 11:44am - Fix verification by me
Nov 19, 2014 10:10am - Bounty of $12,500 awarded by Facebook.
Posted by Pentesting-Lab at 03:04 0 comments
Facebook - Linkshim Evasion and URL Redirection : Write Up by Paul OS
Labels:
Facebook Bugs,
Paul OS,
POC
One of the Good Facebook Bug Hunter, Paul OS, has submitted URL Redirection Bug of Facebook to Pentesting-Lab.
Lets Check out the write up by his own words.
Web applications frequently redirect and forward users to other pages and websites, and use untrusted data to determine the destination pages. Without proper validation, attackers can redirect victims to phishing or malware sites, or use forwards to access unauthorized pages.
Recently I was browsing through Facebook mobile (m.facebook.com) and I found a notification that a friend tagged me into a post… well the post wasn’t that interesting so I decided to hide it. When clicking on hide I notice the URL parameter contained a parameter called ‘continue’ followed by stories.php
https://m.facebook.com/feed_menu/?story_fbid=808015282566492&id=100000740832129&confirm=h&continue=stories.php&perm&no_fw=1&_rdr
So I figured that can lead to a URL redirection if I changed the continue parameter to something like http://evilzone.org but the Linkshim was rechecking and returning it back to m.facebook.com/http://evilzone.org but the redirection wasn’t successful but then I noticed that parameter can be tricked using path transversal tricks like ../
When I gave the url parameter something like
&continue=../http://evilzone.org
I was able to bypass the Linkshim and get a successful redirection to Evilzone.org (which by the way is a blocked link by Facebook).
So the full parameter for redirection including the Linkshim evasion was
https://m.facebook.com/feed_menu/?story_fbid=808015282566492&id=100000740832129&confirm=h&continue=../http://evilzone.org&perm&no_fw=1&_rdr
And none of the other parameters needs to be accurate;
the story_fbid and id parameters can be any number so we don’t need victim’s special parameters to execute redirection.
Now the issue have been fixed and Facebook has promised to reward me with 1000$USD for this bug. I would like to thank the Facebook Security Team so much for their cool support and generous amount.
Posted by Pentesting-Lab at 07:33 0 comments
Subscribe to:
Posts (Atom)

















