ultimate dom-based xss detection scanner on cloud

24
Ul#mate DOM Based XSS Detec#on Scanner On Cloud Nera W. C. Liu & Albert Yu Paranoids Yahoo

Upload: neraliu

Post on 24-Jan-2017

169 views

Category:

Software


4 download

TRANSCRIPT

Page 1: Ultimate DOM-based XSS Detection Scanner on Cloud

Ul#mate  DOM  Based  XSS  Detec#on  Scanner  On  Cloud  

Nera  W.  C.  Liu  &  Albert  Yu  Paranoids  Yahoo  

Page 2: Ultimate DOM-based XSS Detection Scanner on Cloud

•  DOM  XSS  •  Our  solu=on  •  DEMO!

Agenda

Page 3: Ultimate DOM-based XSS Detection Scanner on Cloud

Who  are  we What  people  think  we  are? What  we  think  we  are?

What  we  actually  are?

Page 4: Ultimate DOM-based XSS Detection Scanner on Cloud

DO[r]M  XSS

Page 5: Ultimate DOM-based XSS Detection Scanner on Cloud

•  Does  not  rely  on  flaws  in  applica=on  containers  •  Easier  target  for  aIacker  •  Harder  for  defender  to  detect    See  “DOM  Based  Cross  Site  Scrip=ng  or  XSS  of  the  Third  Kind”.  Amit  Klein.  2005.  hIp://www.webappsec.org/projects/ar=cles/071105.shtml  

“XSS  of  the  3rd  Kind”

Page 6: Ultimate DOM-based XSS Detection Scanner on Cloud

hDp://www.vulnerable.site/welcome.html#foo<script

Page 7: Ultimate DOM-based XSS Detection Scanner on Cloud

Sta#c  Analysis

Page 8: Ultimate DOM-based XSS Detection Scanner on Cloud

⌥⌘U

Page 9: Ultimate DOM-based XSS Detection Scanner on Cloud

If  that’s  not  enough

•  Anonymous  func=ons        •  Dynamic  loading  

Page 10: Ultimate DOM-based XSS Detection Scanner on Cloud

The  Chemistry  of  DOM  what  is  executable?

Page 11: Ultimate DOM-based XSS Detection Scanner on Cloud

The  Chemistry  of  DOM  what  is  executable?

Page 12: Ultimate DOM-based XSS Detection Scanner on Cloud

DOM  XSS  DETECTION  

Page 13: Ultimate DOM-based XSS Detection Scanner on Cloud

•  Analysis  how  “an=gen”  (untrusted  data)  get  into  our  “body”  (DOM)  

What  we  want  to  do

Page 14: Ultimate DOM-based XSS Detection Scanner on Cloud

char*

•  All  arithme=c  opera=ons  need  to  be  overridden  

•  Enable  to  propagate  through  different  context  (HTML/CSS/JS)  

Page 15: Ultimate DOM-based XSS Detection Scanner on Cloud

Tainted  Phantomjs

•  Hacking  the  JavaScriptCore  and  WebKit  engine  by  propaga=ng  the  tainted  signal  during  the  javascript  execu=on.  

Page 16: Ultimate DOM-based XSS Detection Scanner on Cloud

Source  code  of  Tainted  PhantomJS

sink  –  document.write  

Source  –  loca=on.href  

Sink  –  document.writeln  

Propaga=on  –  String.concat  

Page 17: Ultimate DOM-based XSS Detection Scanner on Cloud

Flow  Analysis

Page 18: Ultimate DOM-based XSS Detection Scanner on Cloud

•  [screenshots]

Flow  Analysis

Page 19: Ultimate DOM-based XSS Detection Scanner on Cloud

False  alarm  rate    =  non-­‐issues  /  issues  reported  More  you  fix,  the  higher  the  false  alarm  rate  Our  ul=mate  goal:    

   0  false  alarm  =  0%  rate!

Usable  Security

Page 20: Ultimate DOM-based XSS Detection Scanner on Cloud

Benchmark  and  Comparisons  peak  memory  usage

The  tainted  logic  performance  hit  is  negligible!

The  average  peak  memory  usage

Page 21: Ultimate DOM-based XSS Detection Scanner on Cloud

DEMO      hIp://www.youtube.com/watch?v=VU3YnAwc2Ag  

Page 22: Ultimate DOM-based XSS Detection Scanner on Cloud

•  hIp://www.flickr.com/photos/58053205@N06/6999839463/  •  hIp://www.flickr.com/photos/67272961@N03/6123892769/  •  hIp://upload.wikimedia.org/wikipedia/commons/7/75/UCLA_dorm_room.JPG  •  hIp://www.flickr.com/photos/44124348109@N01/4682168995/  •  hIp://www.flickr.com/photos/15923063@N00/3150765076/  •  hIp://www.flickr.com/photos/88063120@N00/3529818070/  •  hIp://en.wikipedia.org/wiki/File:Angiome_annulaire.JPG  •  hIp://www.flickr.com/photos/free-­‐stock/4817475664/  •  hIp://www.flickr.com/photos/78428166@N00/9604922912/  

Crea#ve  Commons

Page 23: Ultimate DOM-based XSS Detection Scanner on Cloud

THANK  YOU!

Page 24: Ultimate DOM-based XSS Detection Scanner on Cloud