Recently, I’ve noticed some of my friends getting hacked on Facebook and other platforms. So, I’ve compiled a list of possibilities based on my own experiences:
Let’s say you are reading an article from a malicious site. The author could create it so that it opens a tab automatically with a fake Facebook login page with the url facebook.com/APP_ID/…. . This Facebook hack is most often implemented using this Facebook developer app method.
The Facebook user gives vast permissions to a Facebook app which allows the developer to submit posts and read/send messages. The Facebook user probably didn’t read the permissions they were giving to the app and just pressed “allowed”.
Screenshot of the Facebook Write Post Permission
Screenshot of the Open Facebook General Permissions Page
If you think you’ve fell for one of these traps, do the following:
I myself have been hacked many times on the web. Through the past few years, I’ve been trying to learn how black hat hackers operate by delving through the black hat forums. I’ve also had the opportunity to learn a lot about system securities and Cisco networking through the Cyberpatriot program.
Thus, based on my experience, I thought of three key tips that will help any web user learn how to protect themselves from hackers:
Always make sure to check the url when you are logging into something if you are on a public network (ex: Starbucks Free WiFi). A dead giveaway is if the site doesn’t have the secure green lock in the left of the url box which means it’s not encrypted with HTTPS or SSL. If you don’t use a secure protocol like HTTPS or SSL, that could lead to a potential hack through data interception. Hackers use networking tools like Wireshark and Network Miner to read through the data transmitted on a current router. HTTPS or SSL would encrypt this data to prevent people to see sensitive data. If you are interested in the finer details of this, check out this article by Case Western University on identifying insecure website.
Screenshot of the URL bar of a site which uses HTTPS and SSL
Screenshot of the URL bar of a site which doesn’t use HTTPS or SSL
Double check what permissions you give sites. For example, a common thing teens use is Facebook friendship apps like this “Who will you marry?” site. This gives them access to potentially a lot of data that they can mine which could enable them to guess your password. For google apps, there are permissions that allow the app to take total control of your account (send/read emails). So, be careful!
Don’t trust anybody on the web! The most common tactic by hackers is social engineering. They usually first gain your trust and gains some personal information which then allows the hacker to get access to your account(s) through methods like bruteforcing.
Don’t run any suspicious exe or packages on your computer without running it through antivirus. I recommend Malwarebytes and AVG.
This is the first article of a new series called “Fighting against Fake News”. For the next few weeks, I’ll be writing about my technical challenges of this digital literacy research project as well as my own thoughts on the topic of misinformation. Hope you enjoy!
To preface this, I’d like to describe briefly what this digital literacy project is all about. I’m currently working on this project with the Dav-lab group at Wellesley College to help people build digital literacy skills. With the proliferation of fake news on social media platforms like Twitter and Facebook, we thought we needed to address this issue by helping people develop digital literacy skills.
We thought a way to help people develop digital literacy skills is by developing a Google Chrome extension which gamifies the user’s Facebook news feed by allowing the user to guess which Facebook friend shared what type of news content in their news feed:
Screenshot of the Open Answer Game Format of the Extension
Initially, I programmed the extension so that it parsed through the user’s Facebook news feed and marks up every post which contained an article. Recently, I realized that this parser was quite useless due to it’s over modification of posts and realized it should only modify posts shared by the user’s friend. So, I needed to program a way to get a list of Facebook friends using Javascript for an extension I was building so that I could compare a list of posts with this list of friends to make sure I’m modifying posts shared by the user’s Facebook friends.
In a previous project, I ran into a similar issue where there were no documentation for getting a list of the current user’s Facebook Friends using the Facebook’s Graph API (Facebook got rid of the /me/friends node in version 2.0). Back then, I created a simple workaround:
Unfortunately, I couldn’t use this implementation due to these privacy requirements:
I didn’t want to store any data, meaning no server side requests.
I had to be able to use this method for a chrome extension.
So, I couldn’t use the Facebook API since it stores some of the user data server side and since it can’t be tested while developing the Chrome Extension.
Ultimately, I decided to create a scraping function using Javascript. To create an effective scraper, I inspected potential facebook links that had a clear list of friends that could be easily parsed. Unfortunately, there were no paths that led to a single full list of friends.
A few days ago, my project PythonBuddy was hacked. The hacker hacked my server and replaced my whole site with a gif by running python code in the editor that used the open Python function. Here is what the code could have possibly looked like:
This hack was quite a wake up call. I had naively implemented PythonBuddy without any sandboxing.
After this incident, I scoured the web searching for a solution to prevent a hack like this from happening again. I wanted a quick fix.
Eventually, I came up with a quick solution to prevent people from using dangerous imports such as os:
This basically just blacklisted certain imports like “sys” or “os”.
While researching a fix for my program, I discovered some sandboxes that didn’t quite work out for me:
Was really aimed towards the edx platform and I couldn’t really figure how to manipulate it for my own program.
Funnily enough, the person who hacked me contacted me via Reddit today and told me about the vulnerabilities in my site and how he was trying to help secure my site:
So, I created a different version of PythonBuddy which used RestrictedPython: PythonBuddy’s Restricted Python Branch . Unfortunately, this version doesn’t allow a lot of python functions and operators to work like “yield”.
Overall, the main takeaway here is that we should always safely execute unknown code via a protected environment such as a sandbox.
Later today, I watched an amazing video from Pycon 2014 about Python sandboxing which made me realized if I were to create my own full-fledge sandbox, I would include functions that blacklist certain keywords, make builtins read in only, etc. But, right now, I hope to implement something more secure and well estabilshed like Pypy’s sandbox.
Press the eyedropper tool and select the feed section on Facebook and Twitter
Then press “Create”
Refresh Facebook and Twitter
And Voila! When you go to Facebook and Twitter, you won’t waste your time browsing through your feed. Instead, you’ll just focus on the important stuff like messages.
Instagram tips:
Disable account.
Helpful plugins for helping cure your social media addiction:
After realizing my own WPA2 home network was compromised recently, I wondered how easy it was to break into a WPA2 network. I had heard about brute forcing methods but nothing fast and efficient enough to efficiently crack a network.
Let me take a step back. Before there was WPA2, there was WEP. WEP stands for “Wired Equivalent Privacy”. WEP, like WPA2, was invented to protect WIFI networks so that it would be as secure as ethernet connections networks. Before WEP (now we are going way back), network sniffer programs could tap into WI-Fi networks with no barriers.
The basic premise of WEP was simple: create a key made up of hexadecimal values. For one to access a WEP network, they would have to have the same WEP key as the router’s key. In addition, there were two different versions of WEP: 64 bit (10 digits) and 128 bit (26 digits).
Ok, so why were WEP networks so vulnerable? There were many flaws such as how it’s set up. One quick example is that WEP uses RC4 encryption algorithm aka stream cipher. Stream ciphers are vulnerable because an intruder can flip a bit in the cipher text and the corresponding bit will be revealed. I won’t delve too deeply in the flaws of WEP, but this research paper by University of California Berkeley explains it well: http://www.isaac.cs.berkeley.edu/isaac/wep-faq.html
Next time, I will talk about the exciting new research over the past 2 years which reveal the unfortunate vulnerabilities of WPA2. (But don’t worry. If you have a long and complex password, you will most likely not be hacked!)