Transcript
Page 1: Insane in the IFRAME -- The case for client-side HTML sanitization

David RossPrincipal Software Security EngineerTrustworthy Computing SecurityMicrosoft

Page 3: Insane in the IFRAME -- The case for client-side HTML sanitization
Page 4: Insane in the IFRAME -- The case for client-side HTML sanitization
Page 7: Insane in the IFRAME -- The case for client-side HTML sanitization
Page 10: Insane in the IFRAME -- The case for client-side HTML sanitization
Page 11: Insane in the IFRAME -- The case for client-side HTML sanitization

difficult

Page 12: Insane in the IFRAME -- The case for client-side HTML sanitization
Page 13: Insane in the IFRAME -- The case for client-side HTML sanitization

• No independent parsing / context handling

Page 15: Insane in the IFRAME -- The case for client-side HTML sanitization

document.implementation.createHTMLDocument

Page 17: Insane in the IFRAME -- The case for client-side HTML sanitization

3. Remove elements / attributes / etc. not explicitly allowed*

* Old (less-performant) approach:Build yet another DOM by copying safe elements / attributes / etc. to a new DOM during tree walk

Page 18: Insane in the IFRAME -- The case for client-side HTML sanitization
Page 19: Insane in the IFRAME -- The case for client-side HTML sanitization
Page 21: Insane in the IFRAME -- The case for client-side HTML sanitization
Page 23: Insane in the IFRAME -- The case for client-side HTML sanitization
Page 25: Insane in the IFRAME -- The case for client-side HTML sanitization
Page 26: Insane in the IFRAME -- The case for client-side HTML sanitization
Page 27: Insane in the IFRAME -- The case for client-side HTML sanitization
Page 28: Insane in the IFRAME -- The case for client-side HTML sanitization

[Demo] [Benchmark]

Options precedence / inheritance rules: (Options specified on target element) > (options specified on sanitize() call) > (default options)

Page 29: Insane in the IFRAME -- The case for client-side HTML sanitization
Page 30: Insane in the IFRAME -- The case for client-side HTML sanitization
Page 31: Insane in the IFRAME -- The case for client-side HTML sanitization
Page 33: Insane in the IFRAME -- The case for client-side HTML sanitization
Page 34: Insane in the IFRAME -- The case for client-side HTML sanitization

I just presented on HTML sanitization at OWASP AppSec EU 2013. AMA! (self.AMA)

1 Submitted 1 second ago by randomdross

0 comments share


Top Related