Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Selenium Security Scanner

Selenium Security Scanner

In this session we explore how Selenium tests can drive dynamic security scans of your application for vulnerabilities like Cross Site Scripting (XSS).

http://www.youtube.com/watch?v=xW2ZQDF-2CQ

Greg Wester

June 12, 2013
Tweet

More Decks by Greg Wester

Other Decks in Technology

Transcript

  1. Building a pyramid base ◦ Test without the DOM ◦

    Load scripts and specs into a raw javascript engine ◦ IE ScriptEngine, Firefox SpiderMonkey, Google V8/D8
  2. The new UI automation strategy ◦ Bottom: Script developers write

    javascript unit tests ◦ Middle: Testing with a headless DOM – e.g. Phantom.js ◦ Top: WebDriver is for testing browser compatibility
  3. Selenium Driven Vulnerability Scanner ◦ Uses Selenium tests to traverse

    the pages in the app ◦ Captures HTTP request/response in a local proxy ◦ Replays HTTP requests ◦ Fuzzes evil inputs to headers, paramters
  4. About Vulnerabilities ◦ Cross Site Scripting (XSS) ◦ XSS can

    be reflected or stored ◦ XSS can happen in the server (common) or DOM (new class of vuln) ◦ Cross Site Request Forgery (CSRF)
  5. Start up the local proxy process $> java burp.StartBurp \

    -classpath burp.jar;BurpProxyExtender.jar \ loadconfig=my_config \ asport=8080 \ ashost=your-dev-box \ saveconfig=output_state \ report=new_report.html
  6. Start up the selenium proxy $> java –jar selenium.jar \

    -DproxyHost=127.0.0.1 \ -DproxyPort=8888 \ -timeout 120 \ -multiwindow \ -userExtensions sfdcselenium.js \ -Dwebdriver.chrome.driver=/path/to/goog \ -firefoxProfileTemplate
  7. 99 Problems ◦ CSRF tokens expired on replayed requests ◦

    Selenium failures and flappers interrupt the run ◦ Run time doubles even with concurrent requests ◦ Requires a special license from BURP ◦ Need granular runs that feed into the CI loop, Test Failure Mgmt System ◦ Several processes, talk over RMI