How a Facebook Account Is Stolen: With Android, It Takes Five Seconds

Loading

FaceNiff screen with a red power button and Passive mode OFF and Stealth mode OFF controlsWhat does a hacker need to break into someone else’s Facebook account? Not a million dollars, special equipment or exceptional knowledge. All it takes is a rooted Android phone, a Wi-Fi network and five seconds.

Animal repellents Non-destructive
deterrence of
rodents,
wildlife
and snakes.

Every network administrator knows Wireshark (formerly Ethereal), as does any reverse engineer trying to work out how different applications communicate over the web. Wireshark analyzes all traffic on the selected network adapter, so you can see what happens when, for example, a file starts syncing to Dropbox or you begin sending an email.

 

SSL-encrypted communication (HTTPS) is invisible to Wireshark, or rather, you will only see a jumble of encrypted characters. But if you log in to an unencrypted webmail service, for example, you can easily find a readable username and password in Wireshark. One more reason to use SSL wherever possible.

If you learn to use Wireshark and understand network protocols, it can tell you almost everything. But it is not for the average person. –

App for finding an FB password

The category of sniffers and packet analyzers also includes the Firefox add-on Firesheep, the SSLSniff application and, finally, the Android program FaceNiff. That is what we will discuss today: it is incredibly insidious, yet so simple…

Wireshark packet analysis window showing captured network traffic
Wireshark

FaceNiff

FaceNiff is a packet analyzer for the Android operating system with administrator privileges. To run it, you therefore need what is known as root access on your phone, which will fortunately put most of you off. But with the growing popularity of CyanogenMod and other unofficial rooted ROMs, even that is really just a minor obstacle.

Unlike Wireshark, FaceNiff can be operated by absolutely anyone, because it is a single-purpose application. It analyzes network traffic and looks for data packets going to Facebook’s servers. This allows the application to list people on your network who are currently communicating on the social network. But it does not stop there: it also reveals their session ID, a unique connection identifier that it uses to give you access to their profile. How is that possible? You will find out in the next paragraph.

Android and FaceNiff screenshots with application menus and red and green start buttons

Starting FaceNiff is almost criminally simple; essentially, it takes just two clicks

Facebook mobile interface screenshots showing menus, a profile and account security settings

Dropbox, Google, Facebook… It Works the Same Everywhere

Logging in to most web services is based on a session, a unique identifier that the browser receives when you successfully log in. The browser then retains it throughout the connection, often in cookies. Whenever it needs something from the service, such as checking via Ajax whether a new email has arrived, it also sends this identifier to the server in its request so that the other end knows who we are. This means we do not have to go through the login process again every time the page refreshes or a request is made.

Advertisements

The problem arises when this identifier is sent unencrypted, which is still the most common situation because there are not that many services offering SSL. If an attacker used one of the programs mentioned above at that moment, they could discover the identifier quite easily and misuse it.

A similar principle can be used to break secure logins, although not the identifier itself:

By default, Facebook protects you only halfway. An unwanted eavesdropper will not discover your username and password, because SSL is always used during authentication. After that, however, you communicate over ordinary HTTP, and all the information is readable to an intruder.

Take Control of Someone Else’s Facebook in Two Clicks

Is it true? I could not resist installing FaceNiff on my Android phone. Instead of the official ROM, I use CyanogenMod 7 with root access, so it was very easy. All I had to do was connect to the company network over Wi-Fi and start the program. It immediately begins scanning network traffic and, if it detects data packets containing a Facebook connection identifier, lists the vulnerable contacts.

A list of Facebook contacts found on the local network. If I tap one of them, I reach the profile using the stolen identifier and gain the same privileges as its actual owner.

Then all you have to do is click the unfortunate person’s icon, and a Facebook page opens in the browser with the substituted identifier. Even though you do not know the Facebook account password, you gain complete control over the profile. You can send messages under that person’s name, view photos or simply delete everything. Thanks to the stolen identifier, Facebook thinks you are someone else entirely. But let me warn you straight away: doing this would be a serious violation of the law.

Widespread Use Makes It Very Easy

You might argue that, as an attacker, I could wait for hours before someone on the network uses Facebook and sends a packet containing an identifier. In reality, it will take only a few seconds. Thanks to Ajax, Facebook loaded in a browser is constantly sending something to its server and communicating in the background, so you will find an identifier on a larger network very quickly indeed.

A much greater danger awaits people sitting in a restaurant’s outdoor seating area in summer. Every other restaurant now offers Wi-Fi, and in larger cities you can be virtually certain that someone nearby will be using Facebook. Mobile applications should not be a problem, since they should use SSL in every case, but the other users can be detected.

Advertisements

How Can You Defend Yourself?

The defense is relatively simple: always communicate with Facebook exclusively through SSL encryption. How do you configure this? Log in to Facebook, click Account in the top bar, then Account Settings in the menu, and find Account Security in the dialog. Finally, check Browse Facebook on a secure connection (HTTPS) whenever possible. Log out, clear your cookies if necessary, then log back in, and you should now be invisible. Although who knows what other potential back door Facebook may have left ajar for online spies.

Make Facebook Communicate Using SSL

You will find plenty of similar tools on the web, because the principle behind the attack is as old as the web itself. FaceNiff focuses specifically on Facebook, but general-purpose sniffers can uncover sessions for practically any service operating on a similar principle. Services that do not use SSL for logging in also risk making your password relatively easy to discover. In that case, even choosing a super-strong password that would take hackers 250,000,000,000 years to crack will not help you in the slightest.

The internet is nowhere near as secure and anonymous as we sometimes naively think.

This article is not a guide to committing crimes. I have simply used it to show how vulnerable everyday web services are without SSL. Do not look for the program on Android Market, and expect possible further complications, which I will not explain here. The application is also paid software. In freeware mode, it reveals only the first three accounts.

Advertisements
AliExpress

Leave a Reply

Your email address will not be published. Required fields are marked *