Part 1 – How Did We Get Here?
Two words…. Netscape Navigator.
Let me back up a bit and go back to the beginning. 1990!
Shortly after the earth cooled and life began, Sir Tim Berners-Lee just decided to invent the world wide web. This was approximately 1990 give or take any prior research and general acceptance of the idea. He also put together the first browser confusingly and yet inspirationally called “WorldWideWeb”.
Well now you know how that all started and why it’s called what it is. For those of you who were toddlers or perhaps not even born yet a world without the web sounds like a time when everything was in black and white, lit by open flame, the notion of evolution was exciting and new and tablets were made from stone.
Since then things have evolved. The browser which began as a simple visual interpretation of a “markup” language used to create a textual representation of visual elements is now a dangerously functional run-time environment potentially comparable to our host operating system, (eg. Linux, Windows, MacOS) more than you might expect. Developers may compare the browser to the Java Virtual Machine (JVM) or the Common Language Runtime (CLR) upon which many of newer desktop the applications you enjoy run.
The original language of the Browser was HTML ( Hyper Text Markup Language ). Waaaay back in 1995 I had a web development company. Back then, in order to be a web developer you had to know how to make static HTML pages and potentially, if you had mad website skills, have a handle on early versions Adobe Photoshop to make simple buttons and graphics using the new and game changing “bevel” and “drop shadow” filters which were rocking the graphics world at the time. In 1995 buttons just got real baby.
In the 90s the browser world was very different. There was no Chrome (there was no google for most of it), or Firefox or Safari. Early browsers like Lynx ( an actual text based browser kind of like Great Britain’s old teletext channel ) and NCSA Mosiac gave way to more commercially developed works like Netscape Navigator.
I was a big Netscape guy. It was next level. In 1995 however, windows bundled their first version of Internet Explorer into the much promoted Windows 95 and Netscape essentially threw it’s rattle out of the pram over that and engaged in a anti-competitive law suit that would eventually put them, if not out of business, very much onto the back foot (even though they were right). Netscape did however succeed in, and should be credited for, spawning two legendary foundation technologies. One of these was the Mozilla foundation which brought us Firefox.
Fast forward slightly to around 2004 when DOM Level 3 was published, adding support for sexy new event handling among other super fun new features. It’s no surprise that software security guru Gary McGraw released his seminal book Software Security shortly afterwards in 2006. Web page and web sites were now being called web applications and things were changing fast. Faster than we potentially realised at the time.
Just so we all know what’s going on with this browser language and what it now enabled developers creating web applications to do:
Essentially the language can rewrite everything on the page. It has total control and is was turned largely form based interactions into… well let’s say it… Facebook. Facebook and Google Mail are serious web applications. Also organisational tools like Trello, Wunderlist and Evernote are great examples of what is possible within the browser. A web application with dynamic content, real-time updates and interactivity between users.
Skipping forward to the present day (roughly 2018), going back 15 years, what a modern web application does, you would have expected to have to download and run something on your computer, now known as “the desktop”, like Microsoft Word or Excel. Even those desktop juggernauts are now available in a web hosted form leaving it seeming pretty strange when you have to actually download something. It fills me with dread these days and I generally assume that it’s some kind of malicious malware if a download is required (and so should you actually). Things have changed.
Let’s take a look at the modern Browser Power and what it can do to compromise our own security and what we should watch out for.
To reiterate the capabilities of a modern browser and the web applications we load into them
We should also consider the change in application development from desktop to web based. There are some key differences in the trust model that we should acknowledge and take into consideration. With the legacy model where we download and run an application, we trusted the organisation (eg. Microsoft) and therefore the product. Once the product was installed and proven we trusted it to continuing being trustworthy because we hadn’t changed it. Additionally there were no shortage of virus checking software solutions like McAfee and Comodo ready to jump on anything that looked out of sorts.
In those days our big threat was when Microsoft added scripting to their suite of Office products and so began the malicious Word document era which ran took a trust application and used it against us to run all sorts of wonderful malicious code and still does. Check out the ransomware podcast for details on that. Yes people still get fooled into opening dangerous Word or Excel documents AND allow for the scripts to run.
Getting back to the trend towards web applications, if we consider the trust model, we’ve be taught to trust something we’ve already used successfully. What we need to acknowledge is that each time we return to something like Facebook or Netflix, it’s highly unlikely we’re actually running the same application in our browser even though it make roughly or exactly look the same. Take a look at Netflix for a highly advanced example of how development really works today. They are the benchmark continuous integration and deployment boasting an approximate 16 minutes between a developing changing the code and it being deployed globally. https://medium.com/netflix-techblog/how-we-build-code-at-netflix-c5d9bd727f15
We are heavily reliant on developers making changes we can trust in real time and having processes to safe guard the security of the applications that we are running in our browsers to ensure that the trust we are giving them, often without proper or perhaps any consideration is valid.
In the case of major players like Facebook, LinkedIn and Netflix, security is paramount and a secure development culture, tools and processes are all part of the environment but that isn’t necessarily the same for every organisation, in particular smaller companies who haven’t the expertise or knowledge of to even really know what they are missing. The demand for web applications is turning many companies who previously thought of themselves as a courier company, a banking company, a hardware manufacturer, a hotel or restaurant, a book store, an… insert company here… into a software company.
In terms of Web Applications there are organisations like the Open Web Application Security Project (or OWASP for short) (and yes their logo is a wasp) who are regularly assessing the top 10 security problems for such applications and providing as much assistance as possible to ensure developers and organisations are educated and prepared so the world of application security is, for the most part (and by that we don’t see major applications we deal with daily getting hacked) under relative control.
The browser itself is somewhat different. The attack surface is continually changing and growing. To be transparent, the phrase attack surface is security geek speak for looking at an application and looking at how complex the outward facing interface is. Kind of like looking at your house and really checking for every way an intruder could get in. That’s the attack surface.
The house really works as an analogy. Problems with security can be the architecture itself (eg, poor design or poor materials or outdated foundations), extensions (did you really need that conservatory?), or bad builders (you get what you pay for). The browser is no different.
Part 2 – Exploiting the Attack Surface
In this section we talk about known exploits in the browser from how file types have tricked the browser, and the OS, into giving away credentials to hacked browser extensions, to crypto mining to the potential for trusted websites to undermine our confidence and off up malvertising and lead us off the safe path. While we discuss a few examples, we are only scraping the surface of what is possible.
In short… it’s a quick, learn from the mistakes of the past, cautionary tale about browsing the internet in the modern (2018) world. I would be worried that I was dating this post but, as it’s a tech blog (podcast), it’ll be dated faster than you can say Betamax.
Just last year researcher Bosko Stankovic found a way to exploit an older and essentially outdated file extension called .scf. Ever heard of that file extension? Me neither. It’s like an early predecessor of the .lnk shortcut link. If you’re a security savvy individual you may recall that the Stuxnet breach which attempted to destroy Iran’s nuclear program. This was done through a powerful malware which got into the system via a malicious .lnk file. Yes a malicious shortcut file. Crazy isn’t it. Stankovic found that because Chrome will download known safe file types without asking it will download a .scf file. You may think that you still need to run malicious files right? What’s even more exciting about this is that… well you know when you visit a folder in explorer and it creates cool little icons for each file? A .scf file can specify the location of that Icon which means without executing anything explorer will go to the location to find it and that location doesn’t have to be on your computer. It can be remote. If the remote computer pretends to be an SMB server, the Server Message Block (SMB) protocol works will initiate the NTLM (NT Lan Manager) challenge/response authentication mechanism. Stankovic proved that this will allow a remote agent to capture the windows credentials which could be used for all sorts of nasty ends.
THAT NEW EXTENSION!
Lets consider for a moment browser extensions. Do you use any? In Firefox I used to have one called DownloadThemAll. In Chrome I have a few like Adobe Acrobat and Buffer (social media). Other popular extensions are Pinterest, Cisco Webex, Evernote Clipper. You might have Chrome extensions and not really realise it. It’s a worth a check. In Chrome it’s under the vertical (…) on the far right. Then navigate to “more tools” and “extensions”. Make sure you recognise everything there and be sure when you add an extension that you are happy with the privileges you give it. It can even be worth removing and re-adding an extension to see what it asks for if you’ve had it for a while and can’t remember what you agreed to upon installing it.
For a recent example of just what’s possible, in the month of February 2018, a company called TextHelp had their plugin (plugin = extension) called BrowseAloud hacked such that anyone using it (more than 5,000 websites) ended up running some malware/crypto-jacking software known as Coinhive. Coinhive takes advantage of the processing power of a your computer or device to mine the cryptocurrency Monero. Check out our 2 part podcast on Blockchain, Security and the Cryptocurrency Boom!
What was interesting about that effort to mine currencies on behalf of the bad guys is that, technically you don’t really have to hack anything to make that happen. Recently a Starbucks in Buenos Aires, Argentina was using their “Wait for a few moments while we connect you” page to mine cryptocurrency on the laptops of coffee enthusiasts who logged into their local wifi. It wasn’t clear if this was Starbucks or the Wifi provider. We didn’t see anything mentioned in the press about anyone being “hacked” so we will leave that one to speculation.
Consider also that anyone can write an extension for Chrome or Firefox and make it available. It’s worth noting that a bit more like Apple, Chrome only downloads extensions from its own store which could be considered much safer. However… very much like some of the applications available in the Google Play store for Android phones aren’t actually safe or well intended, the same goes for browser extensions.
While writing a new malicious extension is possible, in order to get it into the store could reveal some much desired anonymity. What seems to be a more typical route for extension hackers is to use that old classic, phishing emails, to try to compromise the developer group working on the extension or plugin to gain access to their Chrome Web Store. If they can gain those credentials, they can simply just swap out a known trusted (there’s that word again) extension for a similar but different version.
Just in 2017 these extensions were compromised.
Infinity New Tab
I find it of particular ironic interest when the bad guys take what is meant to be a security or privacy aid like VPN and use that against us. I’m referring more to Betternet than TouchVPN as TouchVPN is more marketed at trying to get out of country Netflix shows (it works… I tested it… purely research of course).
In the case of many of the compromised extensions above, the result was an interception of traffic to present malicious advertising in order to push viewers to malicious or spoofed websites which may attempt to steal credentials or download malware.
Something I mentioned in our podcast on Passwords was how it was possible to intercept user names and passwords held by the browsers password manager by presenting an invisible login screen while a user was already logged into a known domain.
As an example of DOM XSS… have you ever copied and pasted a URL you wanted a friend to see into an email and thought, “holy shittake mushrooms that’s a huge URL!”. Typically URLs have a ton of extra tokens and cookies and other crap that make it hard to understand. Sometimes there are simple parameters on the URL line like look a bit like ?language=French. That’s a good example because lots of sites are language specific.
Here’s a link to a random Brewdog link that showed up while I was on Facebook. We so used to seeing links like that we might not notice a malicious version.
A final chink in the browser armour (if you imagine armour made of lettuce or origami birds) is advertising. Or malvertising as it’s come to be known. Even simpler non web-app sites are allowing for remote advertising servers to inject advertising code which displays advertising onto their page. For high-profile and reputable websites, there is an opportunity to bypass firewalls and undermine even the most cautious user like yours truly.
In 2015, malvertising was responsible for the deployment of the CryptoWall Ransomware which took $1 million of ransom money by infecting over 600,000 computers.
Malvertising can inject code to exploit the user locally (like crypto-miners) or something to abuse the trust of the host site and lure you to a too-good-to-be-true offer on a remote malicious site.
BUT WAIT, THERE’S MORE!
There is a sub-set of that called Like Jacking. A new one in the world of social media. This one can trick in you into Liking something on Facebook! How dare they! Surely you value your Likes as much as I do.
Tricking users into enabling their webcam and microphone through Flash (though this has been fixed since originally reported)
Making users follow someone on Twitter
Sharing or liking links on Facebook
Getting likes on Facebook fan page or +1 on Google+
Clicking Google AdSense ads to generate pay-per-click revenue
Playing YouTube videos to gain views
Following someone on Facebook
WHAT CAN WE DO?
In summary… When you’re using coded web applications, browser extensions or even visiting a simpler websites which are allowing for remote advertising servers to inject content, there is an opportunity for malicious code to take advantage of your resources, your private information, and your trust.
When you think about it… what I just said covers about 99.9% of the websites you visit and probably a reasonable portion of the time you spend on your computer or device (I haven’t even gotten started on Android devices as that is a whole other podcast).
The best thing you can do, and I say this a lot, is keep all of your tech up to date. OS, phones, browsers, home routers, software of any kind. Using out of date browsers is like using windows XP. Old browsers have old vulnerabilities. It’s hard enough to protect yourself in 2018 without acting like it’s 2009.
Also… a close 2nd is to make sure, if you can, that you are browsing the Internet as a least-privilege user account (i.e. without administrator privileges). If you’re on a work computer or a Mac, this is probably already the case. This limits the ability of a security exploit in a web browser from compromising the whole operating system.
In the case of the crypto-jacking, it’s actually pretty harmless. While you’re making money for somebody else, there hasn’t been many cases of it having an alternative agenda. Evidence of live crypto-jacking could be found by hitting Ctrl Alt Del on a PC, launching the Task Manager. Sort the processes by Memory or CPU usage and there will likely be several tabs from your favourite browser in the top 25 for memory usage. It’s worth closing each browser tab one by one to find the offender and just don’t use that site again. It’s that easy.
In terms of what can WE do… it’s limited other than be aware. There’s is far more onus on developers of these trust applications and extensions to ensure there are secure from design to deployment and far too often, they haven’t either the expertise or motivation.
Further to the what can we do… I’ll step into irony corner for a moment and mention that there are adblocker browser extensions. Yes I realise I’m recommending an extension. Things like AdBlock Plus can help with Browser security. It’ll help with the malvertising but introduce a new browser plugin and a new vector of trust. At least they have a lot more to lose if their plugin is compromised somehow. Other options exist like https://www.qualys.com/free-tools-trials/browsercheck/personal/
Finally I feel I should mention Privacy mode in the browser. You would be mistaken if you think this means Security mode.
Privacy mode, also known as “I don’t want my partner to know about my porn” Mode keeps your recently history non-persistent but doesn’t protect from the things we’ve discussed in this article. We’ll talk more about what Private mode actually means in a podcast on privacy and keeping your data safe.