52
SECURITY <!doctype html> Ville Säävuori · · OWASP Helsinki · 15.6.2011 beyond the attack vectors

HTML5 Security

Embed Size (px)

DESCRIPTION

HTML5 Security -- Beyond attack vectors. Slides from my presentation at OWASP meeting in Helsinki Finland, 15 June 2011.

Citation preview

Page 1: HTML5 Security

SECURITY<!doctype html>

Ville Säävuori · · OWASP Helsinki · 15.6.2011

beyond the attack vectors

Page 2: HTML5 Security

I AM NOT A SECURITY EXPERT(But a Web Developer :)

Page 3: HTML5 Security

<!doctype html>

Page 4: HTML5 Security

html

Page 5: HTML5 Security

• API Metering

• Backups & Snapshots

• Counters

• Cloud/Cluster Management Tools

• Instrumentation/Monitoring

• Failover

• Node addition/removal and hashing

• Auto-scaling for cloud resources

• CSRF/XSS Protection

• Data Retention/Archival

• Deployment Tools

• Multiple Devs, Staging, Prod

• Data model upgrades

• Rolling deployments

• Multiple versions (selective beta)

• Bucket Testing

• Rollbacks

• CDN Management

• Distributed File Storage

• Distributed Log storage, analysis

• Graphing

• HTTP Caching

• Input/Output Filtering

• Memory Caching

• Non-relational Key Stores

• Rate Limiting

• Relational Storage

• Queues

• Rate Limiting

• Real-time messaging (XMPP)

• Search

• Ranging

• Geo

• Sharding

• Smart Caching

• Dirty-table management

http://randomfoo.net/2009/01/28/infrastructure-for-modern-web-sites

Page 6: HTML5 Security
Page 7: HTML5 Security
Page 8: HTML5 Security

complex

http://www.flickr.com/photos/stuckincustoms/5069047950/

Page 9: HTML5 Security
Page 10: HTML5 Security

what is it?

Page 11: HTML5 Security

Markup likeGuido

intended it.

Page 12: HTML5 Security

Markup likeGuido Tim

intended it.

Page 13: HTML5 Security

Not Just Markup

anymore.

Page 14: HTML5 Security

security

Page 15: HTML5 Security

<audio> <video>

<footer>

<header>

<canvas>

Page 16: HTML5 Security

<audio>

Page 17: HTML5 Security

<audio src='foo.mp4'

preload='auto'>

Page 18: HTML5 Security

<input type='email' required pattern='.*@syneus\.fi'>

Page 19: HTML5 Security

HTTP/1.1 200 OKDate: Wed, 15 Jun 2011 17:45:00 GMTServer: Nginx/1.0.4Access-Control-Allow-Origin: http://syneus.fi

Page 20: HTML5 Security

local storagelocalStorage.setItem('name', 'Hello World!');

Page 21: HTML5 Security

Web Forms 2.0

Page 22: HTML5 Security

SVG

Page 23: HTML5 Security

CSS3div > p:last-of-type { ... }

Page 24: HTML5 Security

GeoLocationnavigator.geolocation.getCurrentPosition(show_map);

Page 25: HTML5 Security

<iframe sandbox="allow-scripts">

Page 26: HTML5 Security

in the wild

http://www.flickr.com/photos/sharkbait/2992242065/

Page 27: HTML5 Security

http://www.flickr.com/photos/rainbirder/5068808204/

common issues

Page 28: HTML5 Security

XSShttp://www.flickr.com/photos/rainbirder/5068808204/

Page 29: HTML5 Security

XSRFhttp://www.flickr.com/photos/rainbirder/5068808204/

Page 30: HTML5 Security

SQL Injectionhttp://www.flickr.com/photos/rainbirder/5068808204/

Page 31: HTML5 Security

Clickjackinghttp://www.flickr.com/photos/rainbirder/5068808204/

Page 32: HTML5 Security

ways to protect

http://www.flickr.com/photos/soldiersmediacenter/5285447846/

Page 33: HTML5 Security

understand threats

http://www.flickr.com/photos/soldiersmediacenter/5285447846/

Page 34: HTML5 Security

understand threats

http://www.flickr.com/photos/soldiersmediacenter/5285447846/

no, really.

Page 35: HTML5 Security

sanitation

http://www.flickr.com/photos/soldiersmediacenter/5285447846/

Page 36: HTML5 Security

test your code

http://www.flickr.com/photos/soldiersmediacenter/5285447846/

Page 37: HTML5 Security

test your code

http://www.flickr.com/photos/soldiersmediacenter/5285447846/

regularly.

Page 38: HTML5 Security

test your code

http://www.flickr.com/photos/soldiersmediacenter/5285447846/

often.

Page 39: HTML5 Security

stay updated

http://www.flickr.com/photos/soldiersmediacenter/5285447846/

Page 40: HTML5 Security

The answers to your Security Questions are case sensitive and cannot contain special characters like an apostrophe,

or the words “insert,” “delete,” “drop,” “update,” “null,” or “select.”

— Sacramento Credit Union

Page 41: HTML5 Security

?

http://www.flickr.com/photos/remydwd/48898192/

Page 42: HTML5 Security

http://www.flickr.com/photos/amagill/51806161/

Best practices

Page 43: HTML5 Security

trust no one

http://www.flickr.com/photos/furryscalyman/673915993/

Page 44: HTML5 Security

use good toolsLet frameworks help you.

Page 45: HTML5 Security

but don’t trust them blindlyAgain. Understand what you’re doing.

Page 46: HTML5 Security

use secure protocols

HTTPS over HTTP

Page 47: HTML5 Security

outsource

hire someone

use a checklist

or

but at least

Page 48: HTML5 Security

understand your users

Mere mortals don’t behave like nerds.

Page 49: HTML5 Security

educate themWhy is it important to have a good password?

Page 51: HTML5 Security

Kiitos!Ville Säävuori

@uninen