'html5'에 해당되는 글 2건

  1. 2012.09.25 HTML5 Top 3 Vulnerability by CEOinIRVINE 2
  2. 2012.09.25 HTML5 Security & Mobile by CEOinIRVINE

HTML5 Top 3 Vulnerability

Hacking 2012. 9. 25. 04:59

Top 3 HTML5 Vulnerability Risk Categories

Forrester urges HTML5 adoption, but security researchers say secure coding should be in place from the start

Aug 08, 2012 | 04:44 AM | 

By Ericka Chickowski, Contributing Writer
Dark Reading
 
New advice out from Forrester Research during the past week urges companies to step up the pace of their HTML5 adoption to keep up with mobility trends and enable better online customer experiences. But as HTML5 gains relevance in the enterprise, developers need to think carefully about the vulnerabilities that their new code may introduce into their organizations' Web infrastructure.

Click here for more of Dark Reading's Black Hat articles.

"We are at an inflection point," Peter Sheldon, an analyst for Forrester, wrote yesterday in a blog post. "With consumer adoption of HTML5-'capable' desktop browsers widespread and web developer understanding of the technology rapidly maturing, HTML5 is no longer an emerging toolset for mobile and tablet development. Instead, it is fast becoming the de facto standard for web experience innovation across touch points."

He says that leading brands, such as Apple, Best Buy, and Four Seasons Hotels, are taking advantage of advanced HTML5 to enhance customers' online experience, and that e-business teams within other enterprises need to leverage the specification for improved competitive differentiation. It needn't involve a wholesale rip-and-replace of existing code, as HTML5 is essentially an extension of existing W3C HTML standards, he explains.

"The decision to start using HTML5 or CSS3 does not require any changes to or throwing away of existing code," Sheldon said. "Instead, e-business teams can simply enhance the user experience of existing sites by incrementally using the new features of HTML5. HTML5 puts more tools in the box, but it doesn’t change the fundamentals of how to build the website."

If organizations are to do it right, though, one of those fundamentals needs to be a thorough secure coding process. As one Indian researcher highlighted at Black Hat recently, the rich capabilities afforded by HTML5 open up a whole new world of attack opportunities for hackers.

"HTML5 has lots of components that, if they are not securely coded, can cause a number of new attack vectors," said Shreeraj Shah, founder and director of Blueinfy Solutions. "By leveraging these vectors, one can craft stealth attacks and silent exploits [that are] hard to detect and easy to compromise."

He explained at the show that in many cases a full-fledged HTML5 site offers enough functionality that it could almost be likened to a small operating system running in the browser. With HTML5 it is possible to create sites that locally store small databases on the client. As he demonstrated in his talk, components like local storage, enhanced XMLHttpRequest (XHR), Document Object model (DOM), and webSQL that make advanced features possible greatly increase a user's attack surface if coded improperly.

In his talk, Shah ran through a number of different vulnerabilities and demonstrated proof-of-concepts for many, with all of them falling under three main categories.

1. XHR And Tag Vulnerabilities
The first, XHR and tag vulnerabilities, stem from enhancements to XHR in HTML5 that changes HTTP request and response to allow cross-domain calls by following what is called the Cross Origin Resource Sharing (CORS) policy. This change greatly enhances the potency of Cross Site Request Forgery (CSRF) attacks, enabling more stealthy CSRF attacks that can send CSRF on the raw stream of data from the browser and which can not only be sent with the request, but also sent back with the response.

"So it is like crosssite response extraction," he said.

Also in this category, Shah lumped in Cross Site Scripting (XSS) attacks that take advantage of the surfeit of new tags, attributes, and events offered up through HTML5.

"This is definitely an interesting attack vector to bypass an existing blacklist or whitelist because these are a whole new set of tags that can possibly cause XSS," he said.

2. Thick Feature Vulnerabilities
The next category of vulnerabilities Shah called out stem from the fat client functionality brought forth by HTML5. The support of local storage and session storage through HTML5's storage API makes it possible for attackers to use XSS to do blind enumeration of local storage variables and eventually get access to local storage. Similarly, if a local file system is created using SQL Lite to store a database locally, attackers can potentially run SQL injection attacks against that database through attacks leveraging blind WebSQL enumeration.

"So we are still dealing with SQL injection on the server side and now we have SQL injection on the client side using XSS," he said.

3. DOM Vulnerabilities
Finally, the third big category that Shah ran through were vulnerabilities around DOM.

For example, HTML5 now makes it possible for developers to create an HTML-5 based application that runs on a single DOM without any refreshes necessary. This is a boon for performance, but it also makes DOM-based XSS a "sleeping giant" in Shah's mind.

"Essentially, what is going to happen is when you have a DOM-based XSS, that XSS will remain throughout the application life cycle," he said.

In the same vein, HTML5's support of caching pages for offline usage opens the possibility of cache poisoning. And the way that the widgets, gadgets, and modules popular with HTML5 applications share.

As Shah noted in a paper written in conjunction with his talk, the vendor-neutral, browser-native nature of HTML5 is finally starting to gain the specification traction within developer communities. He noted that the attacks he detailed are just the tip of the iceberg because "HTML5 is just warming up."

As different libraries and ways of development continue to emerge, new attack surfaces are bound to come up. That is why Shah said he believes developers need to start thinking about these possible vulnerabilities from the outset of their HTML5 initiatives.

Have a comment on this story? Please click "Add Your Comment" below. If you'd like to contact Dark Reading's editors directly, send us a message.

'Hacking' 카테고리의 다른 글

Metasploit : Bind TCP ? Reverse TCP?  (1) 2012.11.06
Samsung Galaxy S III Hacking  (0) 2012.09.27
HTML5 Security & Mobile  (0) 2012.09.25
Burp Suite Tutorial – The Intruder Tool  (7) 2012.08.10
Understanding the iOS Security Architecture  (0) 2012.08.08
Posted by CEOinIRVINE
l

HTML5 Security & Mobile

Hacking 2012. 9. 25. 04:56

Last week, I discussed some of the new, exciting functionality that is available as part of HTML5 and how it applies to the enterprise.  While this new functionality presents several new opportunities to change how content and functionality is delivered to employees and customers, there are security and compatibility concerns that must be understood prior to embarking on a great HTML5 journey.
 
Today, we'll discuss some of the more common security concerns raised as part of the HTML5 specification as well as compatibility issues you may face while implementing some of the new HTML5 components.  In some cases, I'll include notes on how certain issues can be avoided.
 
Security
The new benefits of HTML5 aren't without their security concerns and potential for abuse.  Some of the concerns below may not be applicable for mobile apps deployed at the enterprise level, but worth reviewing nonetheless.
  • Web Storage: To the point, there are security concerns with client-side storage.  There is a large potential for abuse if not implemented properly. Here are some security concerns that should be reviewed as part of planning and design.  Keep this in mind while reading (credit toOpera for the verbiage), origin is the tuple of scheme/host/port.  Thus, http://captechventures.com, http://blogs.captechventures.com, https://captechventures.com and http://captechventures.com:80 are all different origins.
    • Storage is assigned on a per origin basis so DNS spoofing is possible which would allow intruders access to a users data. SSL can be used to prevent this.
    • While this will probably not be an issue in the enterprise (since Geocities has left us - moment of silence), Web Storage should not be used where more than one user is using different pathnames on one domain.  For example, if I implemented Web Storage at captechventures.com/nathan/ it would be accessible by captechventures.com/jones/ (note: not valid URLs).
    • Databases are stored locally, on the client, which allows would-be attackers to download a copy of your database and create very precise attacks by issuing plain SQL statements. There's no need to employ injection techniques when you have the database. While this may not immediately impact mobile devices (retrieving content from them is not straight-forward), proper security should be put in place - phone locks, data retention periods (e.g. if the new lead has been sent to the CRM system, wipe it from the local database), etc.
    • The fact that the database resides on the client also opens up the potential for attacks on your backend enterprise systems. Your schema is now widely known; very targeted, malicious queries can be created.  Proper consideration should be given to your mobile storage design - client-side storage should only store a small subset of what may be available at an enterprise level.  Therefore, design a new schema specific to that subset rather than deploying your enterprise design.  
  • Cross-Domain Capabilities: The new capabilities in HTML5 such as canvas, audio and video make it easy to access content across domains and continue to 'mashup' information.  However, this could introduce information leakage.  There are safe-guards being put in place to help prevent information leakage.  For example, the canvas element contains an attribute called origin-clean which indicates whether the content originates from a different origin (see Opera's explanation of origin above) or not.  If the origin-clean flag is set to false, calling the toDataURL() or getImageData() methods of the element would raise a SECURITY_ERRexception.
  • Geolocation: Geolocation presents a host of privacy concerns - you're pinpointing  the location of the device and therefore the user. While not always 100% accurate, geolocation should be used sparingly, requesting location information only when absolutely necessary to improve the user experience.  Proper warnings and terms must be included to make the user aware that you are storing location information and potential consequences.  Broadcasting that you're home (GPS coordinates included) once a day for months and then telling the world you're in Maui on vacation may have unfortunate consequences.
  • Forms: Javascript is client-side code and, as such, you lose a lot of control. While client-side validation, especially on a mobile device, can be powerful you should always validate form submissions server-side to ensure integrity.  Yes, this may require an extra round-trip, on occasion, but if someone has malicious intent, I wouldn't worry if they eat another 120KB of their data plan.
  • KeyGen: This is a post for another day, but HTML5 also includes the keygen element which facilitates the creation of private and public keys for identity verification - think enterprise security, banking, etc.  You should note that adoption is not standardized, documentation is sparse, and Microsoft has even asked that it be removed from the HTML5 specification all-together.  Here is one link I found useful if you're itching to dig deeper.
Compatibility
Creating a web-based version of a mobile application is quicker and typically more cost effective to deploy than platform native applications. Firstly, you don't need an in-house Objective-C developer and iPhone OS (iPad/iPod included) API guru, Java developer, and someone versed in thecumbersome Blackberry API's.  HTML5 web-applications, simplistically speaking, require a web developer and web designer. Secondly, you don't have a platform specific approval process to battle.  Consider the source, but even Google's VP of Engineering points out that not many companies are rich enough to build native apps in support of each mobile platform.
 
That being said, there are compatibility issues to consider when looking at HTML5 for your mobile application.  HTML5 is still in draft status and is not supported by all mobile browsers.  Mobile Safari (iPhone), the Android browser support quite a few, but not all, changes in the HTML5 specification.  Opera Mini supports some (currently, around 10%) but is constantly evolving and was recently approved for use on the iPhone. IE Mobile 6.0 still doesn't appear to have much support for HTML5.  I'm still researching what will be available as part of the new Windows Mobile version 7.0, but am not holding my breath.
 
Blackberry is beginning to implement some of the specification (e.g. the datalist element), in some of it's browsers but it's still not ready for prime time.  With multiple versions of their browser running on multiple versions of the OS, building for the Blackberry will be challenge. This has been heralded as one of the biggest obstacles for HTML5 to overcome in order to go mainstream.  In my humble opinion, as Android and the iPhone continue to gain market share, Blackberry will pick up the pace of innovation.
 
In the mean time, creating a lighter version for Windows Mobile and Blackberry, while frustrating, is an option.  Another potential option would be to deploy Opera Mini to your Windows and Blackberry devices. It runs on each platform and, while it only supports about 10% of the specification now, it is evolving. Remember, Opera was a core contributor to Web Applications 1.0.

If you're interested in discussing how CapTech can help mobilize your enterprise, contact Jack Cox, the Mobile Service Offering lead.


'Hacking' 카테고리의 다른 글

Samsung Galaxy S III Hacking  (0) 2012.09.27
HTML5 Top 3 Vulnerability  (2) 2012.09.25
Burp Suite Tutorial – The Intruder Tool  (7) 2012.08.10
Understanding the iOS Security Architecture  (0) 2012.08.08
Cydia Repositories  (7) 2012.08.05
Posted by CEOinIRVINE
l