Feeds

Cross-site hacks and the art of self defence

The new browser wars

The Essential Guide to IT Transformation

Hackers can force your browser to send requests to any site they want. It's not even hard - all they have to do is get you to view an email or a web page.

Unless the site is specifically protected against this - and almost none are - then attackers can make your browser do anything you can do, and they can use your credentials and your access privileges. They can do things like set preferences, create payees and change passwords.

Generally, browsers stop cross-site communication by following the "same-origin policy". This rule is pretty simple: if your site has a different origin - protocol, domain, and port don't all match - you aren't allowed to access information from or send requests to the other site. Without this simple rule, there would be no security on the internet. Every website could access data from every other one - you'd need a separate web browser for every website.

Unfortunately, the same-origin policy is nowhere near airtight. Attackers don't even need an exploit to bypass it. They can simply embed an IMG, SCRIPT, IFRAME, or FORM tag that references the targeted website in an HTML page. When the victim's browser renders this tag, it generates a request and sends it to the targeted website - right around the same-origin policy. This is a feature of all browsers - it's used by many applications to grab images from other sites and to post from data to services.

Attackers can use this loophole to forge requests that appear to be coming from a legitimate user. These are called cross-site request forgeries, or CSRF, for short. Take a look at the old CSRF attack on Netflix, below.

 

<img src=http://www.netflix.com/AddToQueue?movieid=70011204 width="1" height="1" border="0">
Attackers can submit forms on your behalf as well.
<body onload="document.forms[0].submit()">
<form method="POST" action="https://bank.com/transfer.do">
       <input type="hidden" name="account" value="123456789"/>
       <input type="hidden" name="amount" value="2500"/>
</form>

The attacker can post this image tag anywhere - a blog, a wiki, a website, even an email message. Anyone who accidentally browses a page containing the attack while logged into Netflix will have a movie silently added to their queue.

More complex attacks involve a sending series of requests and delays, allowing the attacker to execute a series of actions in a row. In a strange way, a CSRF attack is a sort of program that executes web instructions on behalf of the attacker.

Imagine your browser suddenly turned evil and started trying to mess up your life. What could it do? It might raid the email account you're currently logged into. Maybe it would go after any bank accounts and healthcare sites you're using. Did you click "remember my login" on any websites? Guess what, your renegade browser is logged in and can take over those accounts.

Build a business case: developing custom apps

Next page: Separate browsers

More from The Register

next story
14 antivirus apps found to have security problems
Vendors just don't care, says researcher, after finding basic boo-boos in security software
Secure microkernel that uses maths to be 'bug free' goes open source
Hacker-repelling, drone-protecting code will soon be yours to tweak as you see fit
Only '3% of web servers in top corps' fully fixed after Heartbleed snafu
Just slapping a patched OpenSSL on a machine ain't going to cut it, we're told
How long is too long to wait for a security fix?
Synology finally patches OpenSSL bugs in Trevor's NAS
Israel's Iron Dome missile tech stolen by Chinese hackers
Corporate raiders Comment Crew fingered for attacks
Roll out the welcome mat to hackers and crackers
Security chap pens guide to bug bounty programs that won't fail like Yahoo!'s
HIDDEN packet sniffer spy tech in MILLIONS of iPhones, iPads – expert
Don't panic though – Apple's backdoor is not wide open to all, guru tells us
Researcher sat on critical IE bugs for THREE YEARS
VUPEN waited for Pwn2Own cash while IE's sandbox leaked
prev story

Whitepapers

Implementing global e-invoicing with guaranteed legal certainty
Explaining the role local tax compliance plays in successful supply chain management and e-business and how leading global brands are addressing this.
The Essential Guide to IT Transformation
ServiceNow discusses three IT transformations that can help CIO's automate IT services to transform IT and the enterprise.
Consolidation: The Foundation for IT Business Transformation
In this whitepaper learn how effective consolidation of IT and business resources can enable multiple, meaningful business benefits.
How modern custom applications can spur business growth
Learn how to create, deploy and manage custom applications without consuming or expanding the need for scarce, expensive IT resources.
Build a business case: developing custom apps
Learn how to maximize the value of custom applications by accelerating and simplifying their development.