170 likes | 313 Views
Ajax Applications : A Blueprint for Disaster. Bryan Sullivan, Security Program Manager Microsoft Originally developed with Billy Hoffman, Hewlett Packard. General Ajax Security Issues. Increased attack surface Direct API access Easier to reverse-engineer Amplifies web attacks
E N D
Ajax Applications : A Blueprint for Disaster Bryan Sullivan, Security Program Manager Microsoft Originally developed with Billy Hoffman, Hewlett Packard
General Ajax Security Issues • Increased attack surface • Direct API access • Easier to reverse-engineer • Amplifies web attacks • Offline attacks …in theory…
Theory put to the test • Ajax application built using “expert” advice • Books • Blogs • Conferences
Hacker Vacations Demonstration
Lessons learned • You cannot control client-side code • Don’t store secrets in client-side code • Don’t let client-side code perform authentication/authorization functions 4. Don’t expose admin functionality • Remember web application security basics • Exercise caution when converting data to HTML on the client
Ajax Security Patterns and Antipatterns
PerformLongOp • GetStatus Pattern 1: Polling Status Calls
Antipattern 2: Holding Critical State on Client • Script variables • Flash/Silverlight variables • Offline storage mechanisms • Local Shared Objects ie “Flash cookies” • Silverlight Isolated Storage • Hidden form fields • Cookies
Pattern 2: Hold Critical State on Server • Keep session state just like Web 1.0
Antipattern 3: Single-call Authorization Check authorization here
Pattern 3: Every-call Authorization Check authorization here …and here …and here
Conclusion With great power comes great responsibility
More resources My blog: http://blogs.msdn.com/sdl/ My alias: bryansul