Kind of Hacking

 

How to Hack Any Facebook Account...Again!





just to clarify there is no need for any installed apps on the victim's account, Even if the victim has never allowed any application in his Facebook account I could still get full permission on his account via Facebook Messenger app_id (This bug works on any browser),

Also, It's important to mention that there is a special regex protection in Facebook Messenger app_id (app_id=220764691281998),

I was able to bypass it. 

Bug 1:

Reported this bug at 6/03/2013, Facebook Security Team Fixed it immediately ,

Also reported more OAuth bugs at 26/02/2013, Facebook Security Team Fixed it very quickly

Regarding Facebook OAuth Double URL Encoding (Firefox), Reported at 6/02/2013, Fixed it very quickly

Details:


Facebook Security was trying to protect OAuth Token Hijacking attacks by using  Regex Protection (%23xxx!,%23/xxx,/)

Facebook rejected one hash sign request in redirect_uri, next parameter (next=%23/xxxx,next=%23xxx!) to avoid OAuth Attacks,

Instead, Facebook allow two or more hash sign request in redirect_uri,next parameter (next=%23/xxx/%23/xxx)


That's because no one was thinking there is a way to exploit Facebook OAuth with Multiple hash sign request


So Can we exploit OAuth with two hash sign request? (%23/x/%23/xxxx)?,


The answer is yes!,


I found that there is a strange behavior of redirection when a user use multiple hash sign request in facebook.com


Multiple Hash Sign Request Example:


Redirect to:


And:


Redirect to:


Amazing How Things Works ;)


Now, After we know that we can use multiple hash sign request (#/xxx/#/xxx)



in our redirect_uri, next parameter to bypass the one hash sign (#/xx) regex protection in Facebook OAuth (next=http://facebook.com/#/xxx),


There is more to it in order to use that behavior to exploit the OAuth Bug once again,
I found out that Facebook OAuth rejects unauthorized subdomains in redirect_uri, next parameter,


For example:


Facebook allows only subdomains of Facebook Mobile Version,


Such as:


But rejects unknown subdomains:





Again, Bad News!
That's Because In any mobile version of Facebook (touch.facebook.com,m.facebook.com,0.facebook.com),We won't see the multiple hash sign behaviour in our request


For Example:


This request will not be valid, Will not redirect us to the messages screen,


Anyway, I need a subdomain like the same official domain of facebook.com,


I need it to exploit the strange redirection behavior with multiple hash sign request  (#/xx/#/xx) under facebook.com
At first sight it seems that facebook rejects any subdomain except the mobile subdomain version (touch.facebook.com,etc...),


I found that if I use facebook as a subdomain (facebook.facebook.com), I can bypass this protection,


Sometimes the answer is right in front of you :).
Wait a second!,


For now it seems that I can access to files / directories in facebook.com via the redirect_uri,next parameter right?,
But i can't access my app that redirect victims to the attacker's external website (files.nirgoldshlager.com) , To Save the access_token of the victim,
That's Because my "malicious" App located at touch.facebok.com/apps/xxxapps.facebook.com/apps/xxxx

I thought of a few ways to exploit this situation,


1.


Create a Page Tab in Facebook Page that redirect to external website (files.nirgoldshlager.com),


2.


Try to access my app from facebook.com domain


3.


Find a Site Redirection Vulnerability in facebook.com.


I tried to use my App or Page tab in redirect_uri,next parameter
For Example:


A.


(My "Malicious" App, Located in facebook.com)

B.


(Page Tab that redirect to external website, Located in facebook.com)


Bad news again!


I cant use this methods because there is to much redirection process in this attack,


The Access_token of the victim will not be sent to an external site after 3 redirection requests in GET URL, That's sucks!


I was thinking again, Maybe there is some way to redirect the victim directly to my app located intouch.facebook.com/apps/myapp to limit the redirection process to three times for example.


So, I found that there is a file called l.php in facebook.com, I'm sure most of you familiar with this file,


This file is responsible of redirecting people to external websites, In this case Facebook provide a warning message, Ask the user to confirm the redirection before they redirect him,


Seems I'm lost again, 


I found that if i use 5 byte before the external website in l.php,


I can bypass this warning message when i redirect the victim to subdomains of facebook.com


For example:


Warning message:


Bypass warning message by using  5 byte , Redirect to touch.facebook.com subdomain:


Cool!,


Now lets combine all of these methods to bypass Facebook OAuth,


Exploit Summary


1. 


Using facebook.facebook.com subdomain to bypass subdomain regex protection in OAuth (facebook.facebook.com)


2.


Exploit the strange redirection behavior in facebook.com with multiple hash signs (https://facebook.facebook.com/#/x/#/l/ggggg;touch.facebook.com/apps/sdfsdsdsgs)


3.


Bypass the warning message in l.php with 5 byte (https://www.facebook.com/l/ggggg;touch.facebook.com)


4.


Redirect the victim to external websites located in files.nirgoldshlager.com via my Facebook app, To save the victim access_token in a log file 


Final PoC One Click (Works On All Browsers, Bypass 2-STEP Verification, Access token never expired until the victim changed his password):


 Full description of permission for Facebook Messenger Access Token:


ads_management create_event create_note email export_stream manage_friendlists manage_groups manage_notifications manage_pages offline_access photo_upload publish_actions publish_checkins publish_stream read_friendlists read_insights read_mailbox read_page_mailboxes read_requests read_stream rsvp_event share_item sms status_update video_upload xmpp_login


 And???

Bug 2.

This bug was fixed a few weeks ago,
I wanted to find something unique for Facebook users that are using Firefox Browser!,
I found that an attacker is able to encode his payload with Double URL Encoding (%25xx) to attack Facebook users under Firefox Browser and bypass Facebook OAuth regex protection.
This behavior bypasses the hash sign regex protection in touch.facebook.com, facebook.com   , x.facebook.com,etc..

How to Hack Facebook Password in 5 Ways


Check out the following post from fonelovetz blog on facebook account hacking.
This is one of the most popular questions which I'm asked via my email.And today I'm going to solve this problem one it for all.Even though i have already written a few ways of hacking a facebook password.Looks like i got to tidy up the the stuff here.The first thing i want to tell is.You can not hack or crack a facebook password by a click of a button.That's totally impossible and if you find such tools on the internet then please don't waste your time by looking at them! They are all fake.Ok now let me tell you how to hack a facebook account.




I'll be telling you 5 of the basic ways in which a beginner hacker would hack.They are:



1.Social Engineering
2.Keylogging
3.Reverting Password / Password Recovery Through Primary Email
4.Facebook Phishing Page/ Softwares
5.Stealers/RATS/Trojans

I'll explain each of these one by one in brief.If you want to know more about them just search at www.searchr.us.I'm just trying to give you a rough idea of each field of hacking!

You must also see: 


How to Prevent Facebook Hacking
How to Deactivate any Facebook Account

Social Engineering

This is one of the most easiest ways of hacking.If your good at human manipulation and extracting information out of a conversion between you and your victim then this is the best trick for you.Go to "https://www.facebook.com/recover.php" and check out exactly what information you need to extract from your victim in the conversion.The most basic things would include "Birthday,Secret Question etc".Make sure you don't bump into a stranger and directly ask him the details.Drag the conversation for a while.Make yourself look trust able and then extract one by one slowly

Keylogging 

Keylogging has always been my favourite(Because i coded a few keyloggers :p).This is the most stealthy and easiest way to hack.Once your keylogger has been injected its up to the program to get the passwords that are enetered on a computer.The tricky part of keylogging is "How to inject a Keylogger".But you can always use email attachments or even use something like "Money.exe" as your keylogger.If you want free keyloggers,you can try some of mine or others.

http://hackmeout.blogspot.com/search/label/Keylogger

Password Reverting through Primary Email 

There are two ways of doing this.If you have access to your victim's primary email then you can use facebook "Recovery" form to easily send the password to your victim's pimary email.If you don't know your victim's primary email and don't have access to it.Then i would suggest this Hack Facebook by Reverting.I had written that tutorial long time back and I guess it comes of some use now !This technique doesn't need any keylogging or injecting a file.

Hack Facebook Password Recovery

This is also an effective technique if you know your victim well,if the victim is your friend or someones friend then you can quite easily acquire the basic information and probably use this technique effectively the then!

How to hack Facebook Password Recovery

Facebook Phishing Page/ Phishing software

This is the most EASIEST and SIMPLEST way of hacking a facebook account.I don't recommend Facebook Phishing pages anymore as people are not that dumb these days to fall for this trick.But who know's your victim might just beat the record.So try this phishing page "How to hack Facebook with Phishing Page" which i made ages ago.

Apart from Phishing pages,you can also try Phishing softwares which are quite convincing and a lot of people fall for this trick.I have made 2 Phishing softwares for Yahoo and Facebook.Here is a phishing software for Facebook called "Facebook Hacking Software"

Note: Phishing softwares DO NOT actually hack the account.They just mislead your victim in hacking account.Read that article properly before you use it

Stealers / Remote Administration Tools (RATs) / Trojans

These are basically malwares which can be used to extract saved information from the victim's computer.Again for this trick you need a few trojans to use which you can get from http://www.hackmeout.net/2011/10/cybergate-tutorial-and-free-download.html.All the trojans on that site are free.Once again the major drawback of this method is that you cannot use this technique without injection.

No comments:

Post a Comment