ajax applications : a blueprint for disaster

17
Ajax Applications : A Blueprint for Disaster Bryan Sullivan, Security Program Manager Microsoft Originally developed with Billy Hoffman, Hewlett Packard

Upload: veata

Post on 07-Feb-2016

34 views

Category:

Documents


0 download

DESCRIPTION

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 - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Ajax Applications : A Blueprint for Disaster

Ajax Applications : A Blueprint for Disaster

Bryan Sullivan, Security Program ManagerMicrosoft

Originally developed with Billy Hoffman, Hewlett Packard

Page 2: Ajax Applications : A Blueprint for Disaster

2

General Ajax Security Issues

• Increased attack surface• Direct API access• Easier to reverse-engineer• Amplifies web attacks• Offline attacks

…in theory…

Page 3: Ajax Applications : A Blueprint for Disaster

Theory put to the test

• Ajax application built using “expert” advice

• Books• Blogs• Conferences

3

Page 4: Ajax Applications : A Blueprint for Disaster

DEMONSTRATIONHacker Vacations

4

Page 5: Ajax Applications : A Blueprint for Disaster

Lessons learned

1. You cannot control client-side code2. Don’t store secrets in client-side code3. Don’t let client-side code perform

authentication/authorization functions4. Don’t expose admin functionality5. Remember web application security basics6. Exercise caution when converting data to

HTML on the client

5

Page 6: Ajax Applications : A Blueprint for Disaster

PATTERNS AND ANTIPATTERNSAjax Security

6

Page 7: Ajax Applications : A Blueprint for Disaster

Antipattern 1: Domino Effect

holdSeat

makeOffer

chargeAccount

bookSeat

7

Page 8: Ajax Applications : A Blueprint for Disaster

Pattern 1: Polling Status Calls

8

PerformLongOp

GetStatus

Page 9: Ajax Applications : A Blueprint for Disaster

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

9

Page 10: Ajax Applications : A Blueprint for Disaster

Pattern 2: Hold Critical State on Server

• Keep session state just like Web 1.0

10

Page 11: Ajax Applications : A Blueprint for Disaster

Antipattern 3: Single-call Authorization

11

holdSeat

makeOffer

chargeAccount

Check authorization here

Page 12: Ajax Applications : A Blueprint for Disaster

Pattern 3: Every-call Authorization

12

holdSeat

makeOffer

chargeAccount

Check authorization here

…and here

…and here

Page 13: Ajax Applications : A Blueprint for Disaster

Antipattern 4: Exposing Admin Libraries

13

Page 14: Ajax Applications : A Blueprint for Disaster

Pattern 4: Segregate Admin Libraries

14

Page 15: Ajax Applications : A Blueprint for Disaster

Use with care: Client-side Data Binding

15

Page 16: Ajax Applications : A Blueprint for Disaster

Conclusion

With great power comes great responsibility

16

Page 17: Ajax Applications : A Blueprint for Disaster

More resources

17

My blog:http://blogs.msdn.com/sdl/

My alias:bryansul