SlideShare una empresa de Scribd logo
1 de 48
Dmitry Savintsev
Yahoo!
Finding Bad Needles on
a Worldwide Scale
Who I am
• Security Engineer (Paranoid Labs)
• Developer and Paranoid
• Custodian of internal XSS scanner
• “Gopher” – Go champion
Agenda
• Scope: Reflected XSS & Big Scanning
• Webseclab – test suite and playground
• Scanmus – internal XSS scanner
• Gryffin - Scaling up through CD
• Contextdetect - Fight for Quality
• Next Steps
• Lessons and Summary
Reflected “Server-Side” XSS
• Large scale automated scanning
• Focus on a specific vulnerability type
– reflected server-side XSS
• Improve and learn
• XSS remains a leading cause of incidents
– and BugBounty payouts
Cross-Site Scripting (XSS)
Screenshot from https://www.owasp.org/index.php/Top_10_2013-A3-Cross-Site_Scripting_(XSS)
Large Scale Testing
• Low tolerance for noise / False Positives
• Large websites require high quality
automatic scanning
• Claim: accurate detection of reflected
XSS flaws is not yet a fully solved
problem!
Webseclab
Why Webseclab
• Need for “frozen” tests
– cannot wait for the right thing to come up in
prod!
– need to model the previous cases
• “Playground” – environment to experiment
and iterate
• Documentation and communication
Webseclab
• Based on multiple (internal) predecessors
– ad-hoc PHP scripts, NodeJS app
• In Go - for ease of deployment, and more!
Webseclab Cases
• Reflected and DOM XSS
• Real-life cases
– Collection of Yahoo XSS experience
• Includes real issues as well as False
Positives (FPs)
– learn from both kinds of scanning mistakes,
False Negatives and False Positives
Easy Install
1. Download the binary
fromhttps://github.com/yahoo/webseclab/releases
2. chmod 755 webseclab-mac
3. Run it!
$ ./webseclab-mac
=> Webseclab running on http://127.0.0.1:8080!
Webseclab Demo
• http://127.0.0.1:8080
Webseclab and Open Source
• Open source:
– http://github.com/yahoo/webseclab
• Would love open source security projects
to use it (more)
– as well as anyone else! (Training, teaching…)
• Plans to use Webseclab for OWASP ZAP
CD testing
Arachni & Webseclab
• 3 issues identified – all fixed
• Segmentation fault on a webseclab test:
https://github.com/Arachni/arachni/issues/543
• Double-encoded payload (doubq.1):
https://github.com/Arachni/arachni/issues/581
• Textarea injections:
https://github.com/Arachni/arachni/issues/579
OWASP ZAP
https://code.google.com/p/zaproxy/issues/list?can=2&q=XSS&sort=-id
a few False Positive and False Negative
issues identified and reported:
• XSS False Positive on injections into script block (Webseclab
/xss/reflect/js3_fp?in=)
• XSS False Negative on double-encoded script injections
• XSS False Negative on script injections into the Referer HTTP
header
• False Negative XSS on injection outside of HTML tags
w3af
• Many _fp URLs show in the scan results
• Will follow up with the project members
– Possibly a feature not a bug
Industry Parallels
https://github.com/google/firing-range
Gruyere:
Screenshots and images taken from:
Gruyere: https://google-gruyere.appspot.com/
Wavsep: https://code.google.com/p/wavsep/
Webgoat: http://webgoat.github.io/
Scanmus
Scanmus
• Yahoo internal reflected XSS scanner
– picks up a few other issues as well (SQLi,
path traversal, etc.)
• Written by Rasmus Lerdorf while at Yahoo
• Helped to find many XSS bugs
• Missed by many ex-Yahoos!
Scanmus internals
(simplified version)
• A set of tests
– all based on real issues and incidents
• Request payload
• Expected string or regexp
• If matches, show as a (potential) finding.
Scanmus test example
'full.1' =>
array('send'=>'%22%3E%3Cscript%3Ealert(%22xss%2
2);%3C%2Fscript%3E',
'expect'=>'"><script>alert("xss");</script>',
'fail_msg'=>'Full Javascript hack worked!',
'notify'=>true, 'replace'=>1,
'level'=>3,
'name'=>'full.1',
'charset_check'=>false,);
Sample payloads
• %22onmouseover=%22alert(document.cookie)
• foo%20onmouseover=alert(document.cookie)//
• javascript:alert(123);(//
• alert(142);(
• foo'+alert('xss')(//
• </script>foo<script>alert(135);</script>
• %0d%0a%0d%0a%3Cscript%3Ealert(document.cookie
)%3C/script%3E
• "><img src=foobar onerror=alert(13579)>
• <img src=foobar onerror=alert(13579)>
Context detections
• Context adjustments done with regular
expressions:
// if single_quote_closing_tag_check is set, we check to see
if the injection happens inside a tag with a single-quoted
attribute. If it doesn't, then we ignore this hit.
if(isset($test['single_quote_closing_tag_check']) &&
$test['single_quote_closing_tag_check']) {
$m = preg_quote($test['expect']);
if(!preg_match("~=s*'[^']*{$m}[^<]*>~",$text)) return;
if(preg_match("~=s*"[^"]*{$m}[^<]*>~",$text)) return;
}
Gaps and Problems
• Speed and coverage
– single-threaded scanner
– some scans taking hours or days!
• Accuracy, especially False Positives
– overwhelming noise
• Quality of findings and reports
– difficult to understand
Solution Direction
• Rewrite everything from scratch!
• Set up a reliable test suite
– Webseclab
• Separate crawler and fuzzer
• Accuracy: brainstorm on better context
detection
Gryffin and CD
Continuous Delivery
• Company Direction: Launch Velocity
• “Commit to production with no human
intervention”
• Needed to adapt security scanning
CD “Firehose”
• Hundreds of releases
per day
• Number of Gryffin scans
per month:
Month # of scans
01/15 6,482
02/15 19,780
03/15 43,538
04/15 13,226
Gryffin
• Optimized crawler
– Smart deduplication
• Framework to run multiple scanners
– both internal and open-source
• Management of distributed tasks
• Reporting – aggregation of findings
Gryffin plugins
• Scanmus
• Tainted PhantomJS (DOM XSS scanner)
• Arachni scanner
• skipfish
• sqlmap
CD integration
Commit
Build
Push to Stage Cloud
Crawl & Deduplicate
Scan
URL
URLs
Gryffin Results
• Continuous CD-driven scanning
• Less reliance on engineers doing scans
• Comparison of results from multiple
scanners
– Scanmus vs. Arachni vs. Skipfish …
Coming soon…
Gryffin talk accepted for OWASP
AppSecUSA ’15!
September 22-25, 2015 in San Francisco
Gaps and Problems (Gryffin)
• Accuracy of scanners
• Large amount of False Positives
– especially noticeable when you scan (almost)
everything!
• Difficult to triage and analyze
• Must do something, quick!
Contextdetect
Scanner and Context
• Context vital for:
– Secure coding (prevention)
– Scanning or testing (detection)
• Consider alert(document.cookies):
– Innocuous in the normal HTML text context
– Executable in Javascript block
– … unless in a properly quoted string!
Parsing “boxes”
• HTML or JS parser break the
source into “boxes”
• Inside of “box” same
processing
• User input should never be
able to draw its own boxes
and borders between them!
Injection detection theory (1)
Active content – Javascript/CSS
• Inject a “breaker”
– ex. Javascript with unbalanced parens
• Check if syntax is broken
– Using a real parser
Injection detection theory (2)
HTML Contexts
• Inject ABC where:
• “A” and “C” are identifiable unique strings
• B is the “context breaker”
– ex. single or double quote, a tag, a space…
• Check if A and C are in the same context “box”
– Using an HTML5 parser
Contextdetect
• Go-based library and application
• Uses an HTML5 parser & Javascript
parser
http://godoc.org/golang.org/x/net/html
http://godoc.org/github.com/robertkrimen/otto/parser
• Performs verification of Scanmus findings
• Connected via JSON bridge
– Microservices!
Contextdetect Impact
• Allowed to achieve practically 0% False
Positive rate!
• Reduced False Negatives as well
• Allowed to provide more meaningful
findings messages
– based on the context unit, not line of response
Summary / Next Steps
Next Steps
• Writing a Go-based scanner
– Context-driven scenario-based detection
• Using experience from the Contextdetect
project
• Using and growing Webseclab tests
– more open-source community outreach
Lessons
• Scanner / tool is only as good as its tests
• Use multiple scanners for cross-checking
and to get the best of each
• Real parsers (HTML5/JS/CSS) for
accurate context-based detection and
verification
• Go is an effective tool for large-scale
server-side systems (security and more)
Summary
• Webseclab – foundation for improving
scanning systems
• Gryffin – framework for scaling up, CD
integration, multiple tool plug-ins
• Contextdetect – using Go HTML5 and
Javascript parsers for context-oriented
verification, eliminated known False
Positives.
Questions?
Thank You!
Dmitry Savintsev
@dimisec
https://github.com/dmitris
dsavints@yahoo-inc.com
Image attributions
Go gopher is the work of Renee French licensed under Creative Commons Attributions 3.0:
https://blog.golang.org/gopher
http://gommavulcanizzata.deviantart.com/art/Inkscape-Lightbulb-
94339717?q=gallery%3AGommaVulcanizzata%2F7267989&qo=0
http://commons.wikimedia.org/wiki/File:U.S._Navy_Petty_Officer_3rd_Class_Jordan_Crouse_aims_a_fire_hose_on_a_
simulated_fire_during_a_general_quarters_drill_aboard_the_amphibious_assault_ship_USS_Iwo_Jima_(LHD_7)_as_th
e_ship_operates_in_the_Gulf_of_Aden_1 (original: http://www.defense.gov/dodcmsshare/newsphoto/2012-
10/hires_121017-N-OR551-040.jpg, Public domain photograph from Defense.gov News Photos archive)
https://www.flickr.com/photos/vialbost/12481376133/ - “Merci / Thank you”

Más contenido relacionado

La actualidad más candente

Lares from LOW to PWNED
Lares from LOW to PWNEDLares from LOW to PWNED
Lares from LOW to PWNEDChris Gates
 
BSides_Charm2015_Info sec hunters_gathers
BSides_Charm2015_Info sec hunters_gathersBSides_Charm2015_Info sec hunters_gathers
BSides_Charm2015_Info sec hunters_gathersAndrew McNicol
 
Entomology 101
Entomology 101Entomology 101
Entomology 101snyff
 
AllDayDevOps ZAP automation in CI
AllDayDevOps ZAP automation in CIAllDayDevOps ZAP automation in CI
AllDayDevOps ZAP automation in CISimon Bennetts
 
OWASP 2013 APPSEC USA Talk - OWASP ZAP
OWASP 2013 APPSEC USA Talk - OWASP ZAPOWASP 2013 APPSEC USA Talk - OWASP ZAP
OWASP 2013 APPSEC USA Talk - OWASP ZAPSimon Bennetts
 
There’s an OpenBullet Attack Config for Your Site – What Should You Do?
There’s an OpenBullet Attack Config for Your Site – What Should You Do?There’s an OpenBullet Attack Config for Your Site – What Should You Do?
There’s an OpenBullet Attack Config for Your Site – What Should You Do?DevOps.com
 
OWASP 2013 APPSEC USA ZAP Hackathon
OWASP 2013 APPSEC USA ZAP HackathonOWASP 2013 APPSEC USA ZAP Hackathon
OWASP 2013 APPSEC USA ZAP HackathonSimon Bennetts
 
Security Testing - Zap It
Security Testing - Zap ItSecurity Testing - Zap It
Security Testing - Zap ItManjyot Singh
 
Red Team Methodology - A Naked Look
Red Team Methodology - A Naked LookRed Team Methodology - A Naked Look
Red Team Methodology - A Naked LookJason Lang
 
Effective approaches to web application security
Effective approaches to web application security Effective approaches to web application security
Effective approaches to web application security Zane Lackey
 
Is code review the solution?
Is code review the solution?Is code review the solution?
Is code review the solution?Tiago Mendo
 
Automated Security Testing
Automated Security TestingAutomated Security Testing
Automated Security Testingseleniumconf
 
Owasp tds
Owasp tdsOwasp tds
Owasp tdssnyff
 
Sandbox vs manual malware analysis v1.1
Sandbox vs manual malware analysis v1.1Sandbox vs manual malware analysis v1.1
Sandbox vs manual malware analysis v1.1Michael Gough
 
Hunting for the secrets in a cloud forest
Hunting for the secrets in a cloud forestHunting for the secrets in a cloud forest
Hunting for the secrets in a cloud forestSecuRing
 
From 0 to 0xdeadbeef - security mistakes that will haunt your startup
From 0 to 0xdeadbeef - security mistakes that will haunt your startupFrom 0 to 0xdeadbeef - security mistakes that will haunt your startup
From 0 to 0xdeadbeef - security mistakes that will haunt your startupDiogo Mónica
 
JavaOne 2014 Security Testing for Developers using OWASP ZAP
JavaOne 2014 Security Testing for Developers using OWASP ZAPJavaOne 2014 Security Testing for Developers using OWASP ZAP
JavaOne 2014 Security Testing for Developers using OWASP ZAPSimon Bennetts
 
Learn to pen-test with OWASP ZAP
Learn to pen-test with OWASP ZAPLearn to pen-test with OWASP ZAP
Learn to pen-test with OWASP ZAPPaul Ionescu
 
2017 DevSecCon ZAP Scripting Workshop
2017 DevSecCon ZAP Scripting Workshop2017 DevSecCon ZAP Scripting Workshop
2017 DevSecCon ZAP Scripting WorkshopSimon Bennetts
 

La actualidad más candente (20)

Lares from LOW to PWNED
Lares from LOW to PWNEDLares from LOW to PWNED
Lares from LOW to PWNED
 
BSides_Charm2015_Info sec hunters_gathers
BSides_Charm2015_Info sec hunters_gathersBSides_Charm2015_Info sec hunters_gathers
BSides_Charm2015_Info sec hunters_gathers
 
Entomology 101
Entomology 101Entomology 101
Entomology 101
 
AllDayDevOps ZAP automation in CI
AllDayDevOps ZAP automation in CIAllDayDevOps ZAP automation in CI
AllDayDevOps ZAP automation in CI
 
OWASP 2013 APPSEC USA Talk - OWASP ZAP
OWASP 2013 APPSEC USA Talk - OWASP ZAPOWASP 2013 APPSEC USA Talk - OWASP ZAP
OWASP 2013 APPSEC USA Talk - OWASP ZAP
 
There’s an OpenBullet Attack Config for Your Site – What Should You Do?
There’s an OpenBullet Attack Config for Your Site – What Should You Do?There’s an OpenBullet Attack Config for Your Site – What Should You Do?
There’s an OpenBullet Attack Config for Your Site – What Should You Do?
 
OWASP 2013 APPSEC USA ZAP Hackathon
OWASP 2013 APPSEC USA ZAP HackathonOWASP 2013 APPSEC USA ZAP Hackathon
OWASP 2013 APPSEC USA ZAP Hackathon
 
Security Testing - Zap It
Security Testing - Zap ItSecurity Testing - Zap It
Security Testing - Zap It
 
Red Team Methodology - A Naked Look
Red Team Methodology - A Naked LookRed Team Methodology - A Naked Look
Red Team Methodology - A Naked Look
 
Effective approaches to web application security
Effective approaches to web application security Effective approaches to web application security
Effective approaches to web application security
 
Is code review the solution?
Is code review the solution?Is code review the solution?
Is code review the solution?
 
Automated Security Testing
Automated Security TestingAutomated Security Testing
Automated Security Testing
 
Owasp tds
Owasp tdsOwasp tds
Owasp tds
 
Sandbox vs manual malware analysis v1.1
Sandbox vs manual malware analysis v1.1Sandbox vs manual malware analysis v1.1
Sandbox vs manual malware analysis v1.1
 
Zed Attack Proxy (ZAP)
Zed Attack Proxy (ZAP)Zed Attack Proxy (ZAP)
Zed Attack Proxy (ZAP)
 
Hunting for the secrets in a cloud forest
Hunting for the secrets in a cloud forestHunting for the secrets in a cloud forest
Hunting for the secrets in a cloud forest
 
From 0 to 0xdeadbeef - security mistakes that will haunt your startup
From 0 to 0xdeadbeef - security mistakes that will haunt your startupFrom 0 to 0xdeadbeef - security mistakes that will haunt your startup
From 0 to 0xdeadbeef - security mistakes that will haunt your startup
 
JavaOne 2014 Security Testing for Developers using OWASP ZAP
JavaOne 2014 Security Testing for Developers using OWASP ZAPJavaOne 2014 Security Testing for Developers using OWASP ZAP
JavaOne 2014 Security Testing for Developers using OWASP ZAP
 
Learn to pen-test with OWASP ZAP
Learn to pen-test with OWASP ZAPLearn to pen-test with OWASP ZAP
Learn to pen-test with OWASP ZAP
 
2017 DevSecCon ZAP Scripting Workshop
2017 DevSecCon ZAP Scripting Workshop2017 DevSecCon ZAP Scripting Workshop
2017 DevSecCon ZAP Scripting Workshop
 

Destacado

L3DSR - Overcoming Layer 2 Limitations of Direct Server Return Load Balancing
L3DSR - Overcoming Layer 2 Limitations of Direct Server Return Load BalancingL3DSR - Overcoming Layer 2 Limitations of Direct Server Return Load Balancing
L3DSR - Overcoming Layer 2 Limitations of Direct Server Return Load BalancingJan Schaumann
 
Primum non nocere - Ethical Obligations in Internet Operations
Primum non nocere - Ethical Obligations in Internet OperationsPrimum non nocere - Ethical Obligations in Internet Operations
Primum non nocere - Ethical Obligations in Internet OperationsJan Schaumann
 
Eric Lafortune - The Jack and Jill build system
Eric Lafortune - The Jack and Jill build systemEric Lafortune - The Jack and Jill build system
Eric Lafortune - The Jack and Jill build systemGuardSquare
 
Business Case for Agile - Time for ROI Check
Business Case for Agile - Time for ROI CheckBusiness Case for Agile - Time for ROI Check
Business Case for Agile - Time for ROI CheckTathagat Varma
 
Velocity 2015 linux perf tools
Velocity 2015 linux perf toolsVelocity 2015 linux perf tools
Velocity 2015 linux perf toolsBrendan Gregg
 
10 tips on how to maximise your mobile advertising spend 121008
10 tips on how to maximise your mobile advertising spend 12100810 tips on how to maximise your mobile advertising spend 121008
10 tips on how to maximise your mobile advertising spend 121008Tom Horsey
 
Tumblr 101 for un (round 2)
Tumblr 101 for un (round 2)Tumblr 101 for un (round 2)
Tumblr 101 for un (round 2)jnooyen
 
Introducing the Open Advertising Protocol
Introducing the Open Advertising ProtocolIntroducing the Open Advertising Protocol
Introducing the Open Advertising ProtocolJoe Pych
 
Advanced PPC and SEO for Higher Education
Advanced PPC and SEO for Higher Education Advanced PPC and SEO for Higher Education
Advanced PPC and SEO for Higher Education Hanapin Marketing
 
The Future of Vertical Search Engines
The Future of Vertical Search EnginesThe Future of Vertical Search Engines
The Future of Vertical Search EnginesTed Drake
 
Net Loss: The Killing of Marine Mammals in Foreign Fisheries
Net Loss:  The Killing of Marine Mammals in Foreign FisheriesNet Loss:  The Killing of Marine Mammals in Foreign Fisheries
Net Loss: The Killing of Marine Mammals in Foreign Fisherieslpackard
 
Forget the Web
Forget the WebForget the Web
Forget the WebRemy Sharp
 
Google Display Network (GDN) : Building Brand Engagement
Google Display Network (GDN) : Building Brand  Engagement Google Display Network (GDN) : Building Brand  Engagement
Google Display Network (GDN) : Building Brand Engagement Vũ Văn Hiển
 
Hadoop Summit Amsterdam 2014: Capacity Planning In Multi-tenant Hadoop Deploy...
Hadoop Summit Amsterdam 2014: Capacity Planning In Multi-tenant Hadoop Deploy...Hadoop Summit Amsterdam 2014: Capacity Planning In Multi-tenant Hadoop Deploy...
Hadoop Summit Amsterdam 2014: Capacity Planning In Multi-tenant Hadoop Deploy...Sumeet Singh
 
Dataiku pig - hive - cascading
Dataiku   pig - hive - cascadingDataiku   pig - hive - cascading
Dataiku pig - hive - cascadingDataiku
 

Destacado (20)

Chef introduction
Chef introductionChef introduction
Chef introduction
 
August trends
August trendsAugust trends
August trends
 
Be a Superhero
Be a SuperheroBe a Superhero
Be a Superhero
 
L3DSR - Overcoming Layer 2 Limitations of Direct Server Return Load Balancing
L3DSR - Overcoming Layer 2 Limitations of Direct Server Return Load BalancingL3DSR - Overcoming Layer 2 Limitations of Direct Server Return Load Balancing
L3DSR - Overcoming Layer 2 Limitations of Direct Server Return Load Balancing
 
Primum non nocere - Ethical Obligations in Internet Operations
Primum non nocere - Ethical Obligations in Internet OperationsPrimum non nocere - Ethical Obligations in Internet Operations
Primum non nocere - Ethical Obligations in Internet Operations
 
Eric Lafortune - The Jack and Jill build system
Eric Lafortune - The Jack and Jill build systemEric Lafortune - The Jack and Jill build system
Eric Lafortune - The Jack and Jill build system
 
Business Case for Agile - Time for ROI Check
Business Case for Agile - Time for ROI CheckBusiness Case for Agile - Time for ROI Check
Business Case for Agile - Time for ROI Check
 
The HTML5 WebSocket API
The HTML5 WebSocket APIThe HTML5 WebSocket API
The HTML5 WebSocket API
 
Velocity 2015 linux perf tools
Velocity 2015 linux perf toolsVelocity 2015 linux perf tools
Velocity 2015 linux perf tools
 
Culture
CultureCulture
Culture
 
10 tips on how to maximise your mobile advertising spend 121008
10 tips on how to maximise your mobile advertising spend 12100810 tips on how to maximise your mobile advertising spend 121008
10 tips on how to maximise your mobile advertising spend 121008
 
Tumblr 101 for un (round 2)
Tumblr 101 for un (round 2)Tumblr 101 for un (round 2)
Tumblr 101 for un (round 2)
 
Introducing the Open Advertising Protocol
Introducing the Open Advertising ProtocolIntroducing the Open Advertising Protocol
Introducing the Open Advertising Protocol
 
Advanced PPC and SEO for Higher Education
Advanced PPC and SEO for Higher Education Advanced PPC and SEO for Higher Education
Advanced PPC and SEO for Higher Education
 
The Future of Vertical Search Engines
The Future of Vertical Search EnginesThe Future of Vertical Search Engines
The Future of Vertical Search Engines
 
Net Loss: The Killing of Marine Mammals in Foreign Fisheries
Net Loss:  The Killing of Marine Mammals in Foreign FisheriesNet Loss:  The Killing of Marine Mammals in Foreign Fisheries
Net Loss: The Killing of Marine Mammals in Foreign Fisheries
 
Forget the Web
Forget the WebForget the Web
Forget the Web
 
Google Display Network (GDN) : Building Brand Engagement
Google Display Network (GDN) : Building Brand  Engagement Google Display Network (GDN) : Building Brand  Engagement
Google Display Network (GDN) : Building Brand Engagement
 
Hadoop Summit Amsterdam 2014: Capacity Planning In Multi-tenant Hadoop Deploy...
Hadoop Summit Amsterdam 2014: Capacity Planning In Multi-tenant Hadoop Deploy...Hadoop Summit Amsterdam 2014: Capacity Planning In Multi-tenant Hadoop Deploy...
Hadoop Summit Amsterdam 2014: Capacity Planning In Multi-tenant Hadoop Deploy...
 
Dataiku pig - hive - cascading
Dataiku   pig - hive - cascadingDataiku   pig - hive - cascading
Dataiku pig - hive - cascading
 

Similar a Badneedles

Web a Quebec - JS Debugging
Web a Quebec - JS DebuggingWeb a Quebec - JS Debugging
Web a Quebec - JS DebuggingRami Sayar
 
How do JavaScript frameworks impact the security of applications?
How do JavaScript frameworks impact the security of applications?How do JavaScript frameworks impact the security of applications?
How do JavaScript frameworks impact the security of applications?Ksenia Peguero
 
OWASP SF - Reviewing Modern JavaScript Applications
OWASP SF - Reviewing Modern JavaScript ApplicationsOWASP SF - Reviewing Modern JavaScript Applications
OWASP SF - Reviewing Modern JavaScript ApplicationsLewis Ardern
 
Usersnap and the javascript magic behind the scenes - ViennaJS
Usersnap and the javascript magic behind the scenes - ViennaJSUsersnap and the javascript magic behind the scenes - ViennaJS
Usersnap and the javascript magic behind the scenes - ViennaJSUsersnap
 
Web Development using Ruby on Rails
Web Development using Ruby on RailsWeb Development using Ruby on Rails
Web Development using Ruby on RailsAvi Kedar
 
Do you lose sleep at night?
Do you lose sleep at night?Do you lose sleep at night?
Do you lose sleep at night?Nathan Van Gheem
 
OWASP AppSec EU - SecDevOps, a view from the trenches - Abhay Bhargav
OWASP AppSec EU - SecDevOps, a view from the trenches - Abhay BhargavOWASP AppSec EU - SecDevOps, a view from the trenches - Abhay Bhargav
OWASP AppSec EU - SecDevOps, a view from the trenches - Abhay BhargavAbhay Bhargav
 
DevOps, CLI, APIs, Oh My! Security Gone Agile
DevOps, CLI, APIs, Oh My!  Security Gone AgileDevOps, CLI, APIs, Oh My!  Security Gone Agile
DevOps, CLI, APIs, Oh My! Security Gone AgileMatt Tesauro
 
Code Quality - Security
Code Quality - SecurityCode Quality - Security
Code Quality - Securitysedukull
 
Abusing bleeding edge web standards for appsec glory
Abusing bleeding edge web standards for appsec gloryAbusing bleeding edge web standards for appsec glory
Abusing bleeding edge web standards for appsec gloryPriyanka Aash
 
Here Be Dragons – Advanced JavaScript Debugging
Here Be Dragons – Advanced JavaScript DebuggingHere Be Dragons – Advanced JavaScript Debugging
Here Be Dragons – Advanced JavaScript DebuggingFITC
 
FITC - Here Be Dragons: Advanced JavaScript Debugging
FITC - Here Be Dragons: Advanced JavaScript DebuggingFITC - Here Be Dragons: Advanced JavaScript Debugging
FITC - Here Be Dragons: Advanced JavaScript DebuggingRami Sayar
 
CBDW2014 - MockBox, get ready to mock your socks off!
CBDW2014 - MockBox, get ready to mock your socks off!CBDW2014 - MockBox, get ready to mock your socks off!
CBDW2014 - MockBox, get ready to mock your socks off!Ortus Solutions, Corp
 
Chasing web-based malware
Chasing web-based malwareChasing web-based malware
Chasing web-based malwareFACE
 
Defcon 22-wesley-mc grew-instrumenting-point-of-sale-malware
Defcon 22-wesley-mc grew-instrumenting-point-of-sale-malwareDefcon 22-wesley-mc grew-instrumenting-point-of-sale-malware
Defcon 22-wesley-mc grew-instrumenting-point-of-sale-malwareDaveEdwards12
 
SANS_PentestHackfest_2022-PurpleTeam_Cloud_Identity.pptx
SANS_PentestHackfest_2022-PurpleTeam_Cloud_Identity.pptxSANS_PentestHackfest_2022-PurpleTeam_Cloud_Identity.pptx
SANS_PentestHackfest_2022-PurpleTeam_Cloud_Identity.pptxJasonOstrom1
 
Analysis of-quality-of-pkgs-in-packagist-univ-20171024
Analysis of-quality-of-pkgs-in-packagist-univ-20171024Analysis of-quality-of-pkgs-in-packagist-univ-20171024
Analysis of-quality-of-pkgs-in-packagist-univ-20171024Clark Everetts
 
Scylla Summit 2022: Learning Rust the Hard Way for a Production Kafka+ScyllaD...
Scylla Summit 2022: Learning Rust the Hard Way for a Production Kafka+ScyllaD...Scylla Summit 2022: Learning Rust the Hard Way for a Production Kafka+ScyllaD...
Scylla Summit 2022: Learning Rust the Hard Way for a Production Kafka+ScyllaD...ScyllaDB
 
AWS re:Invent 2016: Amazon CloudFront Flash Talks: Best Practices on Configur...
AWS re:Invent 2016: Amazon CloudFront Flash Talks: Best Practices on Configur...AWS re:Invent 2016: Amazon CloudFront Flash Talks: Best Practices on Configur...
AWS re:Invent 2016: Amazon CloudFront Flash Talks: Best Practices on Configur...Amazon Web Services
 

Similar a Badneedles (20)

Web a Quebec - JS Debugging
Web a Quebec - JS DebuggingWeb a Quebec - JS Debugging
Web a Quebec - JS Debugging
 
How do JavaScript frameworks impact the security of applications?
How do JavaScript frameworks impact the security of applications?How do JavaScript frameworks impact the security of applications?
How do JavaScript frameworks impact the security of applications?
 
OWASP SF - Reviewing Modern JavaScript Applications
OWASP SF - Reviewing Modern JavaScript ApplicationsOWASP SF - Reviewing Modern JavaScript Applications
OWASP SF - Reviewing Modern JavaScript Applications
 
Usersnap and the javascript magic behind the scenes - ViennaJS
Usersnap and the javascript magic behind the scenes - ViennaJSUsersnap and the javascript magic behind the scenes - ViennaJS
Usersnap and the javascript magic behind the scenes - ViennaJS
 
Web Development using Ruby on Rails
Web Development using Ruby on RailsWeb Development using Ruby on Rails
Web Development using Ruby on Rails
 
Do you lose sleep at night?
Do you lose sleep at night?Do you lose sleep at night?
Do you lose sleep at night?
 
OWASP AppSec EU - SecDevOps, a view from the trenches - Abhay Bhargav
OWASP AppSec EU - SecDevOps, a view from the trenches - Abhay BhargavOWASP AppSec EU - SecDevOps, a view from the trenches - Abhay Bhargav
OWASP AppSec EU - SecDevOps, a view from the trenches - Abhay Bhargav
 
DevOps, CLI, APIs, Oh My! Security Gone Agile
DevOps, CLI, APIs, Oh My!  Security Gone AgileDevOps, CLI, APIs, Oh My!  Security Gone Agile
DevOps, CLI, APIs, Oh My! Security Gone Agile
 
Code Quality - Security
Code Quality - SecurityCode Quality - Security
Code Quality - Security
 
Abusing bleeding edge web standards for appsec glory
Abusing bleeding edge web standards for appsec gloryAbusing bleeding edge web standards for appsec glory
Abusing bleeding edge web standards for appsec glory
 
Here Be Dragons – Advanced JavaScript Debugging
Here Be Dragons – Advanced JavaScript DebuggingHere Be Dragons – Advanced JavaScript Debugging
Here Be Dragons – Advanced JavaScript Debugging
 
FITC - Here Be Dragons: Advanced JavaScript Debugging
FITC - Here Be Dragons: Advanced JavaScript DebuggingFITC - Here Be Dragons: Advanced JavaScript Debugging
FITC - Here Be Dragons: Advanced JavaScript Debugging
 
Burpsuite yara
Burpsuite yaraBurpsuite yara
Burpsuite yara
 
CBDW2014 - MockBox, get ready to mock your socks off!
CBDW2014 - MockBox, get ready to mock your socks off!CBDW2014 - MockBox, get ready to mock your socks off!
CBDW2014 - MockBox, get ready to mock your socks off!
 
Chasing web-based malware
Chasing web-based malwareChasing web-based malware
Chasing web-based malware
 
Defcon 22-wesley-mc grew-instrumenting-point-of-sale-malware
Defcon 22-wesley-mc grew-instrumenting-point-of-sale-malwareDefcon 22-wesley-mc grew-instrumenting-point-of-sale-malware
Defcon 22-wesley-mc grew-instrumenting-point-of-sale-malware
 
SANS_PentestHackfest_2022-PurpleTeam_Cloud_Identity.pptx
SANS_PentestHackfest_2022-PurpleTeam_Cloud_Identity.pptxSANS_PentestHackfest_2022-PurpleTeam_Cloud_Identity.pptx
SANS_PentestHackfest_2022-PurpleTeam_Cloud_Identity.pptx
 
Analysis of-quality-of-pkgs-in-packagist-univ-20171024
Analysis of-quality-of-pkgs-in-packagist-univ-20171024Analysis of-quality-of-pkgs-in-packagist-univ-20171024
Analysis of-quality-of-pkgs-in-packagist-univ-20171024
 
Scylla Summit 2022: Learning Rust the Hard Way for a Production Kafka+ScyllaD...
Scylla Summit 2022: Learning Rust the Hard Way for a Production Kafka+ScyllaD...Scylla Summit 2022: Learning Rust the Hard Way for a Production Kafka+ScyllaD...
Scylla Summit 2022: Learning Rust the Hard Way for a Production Kafka+ScyllaD...
 
AWS re:Invent 2016: Amazon CloudFront Flash Talks: Best Practices on Configur...
AWS re:Invent 2016: Amazon CloudFront Flash Talks: Best Practices on Configur...AWS re:Invent 2016: Amazon CloudFront Flash Talks: Best Practices on Configur...
AWS re:Invent 2016: Amazon CloudFront Flash Talks: Best Practices on Configur...
 

Último

一比一原版田纳西大学毕业证如何办理
一比一原版田纳西大学毕业证如何办理一比一原版田纳西大学毕业证如何办理
一比一原版田纳西大学毕业证如何办理F
 
Local Call Girls in Seoni 9332606886 HOT & SEXY Models beautiful and charmin...
Local Call Girls in Seoni  9332606886 HOT & SEXY Models beautiful and charmin...Local Call Girls in Seoni  9332606886 HOT & SEXY Models beautiful and charmin...
Local Call Girls in Seoni 9332606886 HOT & SEXY Models beautiful and charmin...kumargunjan9515
 
一比一原版奥兹学院毕业证如何办理
一比一原版奥兹学院毕业证如何办理一比一原版奥兹学院毕业证如何办理
一比一原版奥兹学院毕业证如何办理F
 
Russian Call girls in Abu Dhabi 0508644382 Abu Dhabi Call girls
Russian Call girls in Abu Dhabi 0508644382 Abu Dhabi Call girlsRussian Call girls in Abu Dhabi 0508644382 Abu Dhabi Call girls
Russian Call girls in Abu Dhabi 0508644382 Abu Dhabi Call girlsMonica Sydney
 
Nagercoil Escorts Service Girl ^ 9332606886, WhatsApp Anytime Nagercoil
Nagercoil Escorts Service Girl ^ 9332606886, WhatsApp Anytime NagercoilNagercoil Escorts Service Girl ^ 9332606886, WhatsApp Anytime Nagercoil
Nagercoil Escorts Service Girl ^ 9332606886, WhatsApp Anytime Nagercoilmeghakumariji156
 
20240509 QFM015 Engineering Leadership Reading List April 2024.pdf
20240509 QFM015 Engineering Leadership Reading List April 2024.pdf20240509 QFM015 Engineering Leadership Reading List April 2024.pdf
20240509 QFM015 Engineering Leadership Reading List April 2024.pdfMatthew Sinclair
 
Vip Firozabad Phone 8250092165 Escorts Service At 6k To 30k Along With Ac Room
Vip Firozabad Phone 8250092165 Escorts Service At 6k To 30k Along With Ac RoomVip Firozabad Phone 8250092165 Escorts Service At 6k To 30k Along With Ac Room
Vip Firozabad Phone 8250092165 Escorts Service At 6k To 30k Along With Ac Roommeghakumariji156
 
哪里办理美国迈阿密大学毕业证(本硕)umiami在读证明存档可查
哪里办理美国迈阿密大学毕业证(本硕)umiami在读证明存档可查哪里办理美国迈阿密大学毕业证(本硕)umiami在读证明存档可查
哪里办理美国迈阿密大学毕业证(本硕)umiami在读证明存档可查ydyuyu
 
一比一原版(Curtin毕业证书)科廷大学毕业证原件一模一样
一比一原版(Curtin毕业证书)科廷大学毕业证原件一模一样一比一原版(Curtin毕业证书)科廷大学毕业证原件一模一样
一比一原版(Curtin毕业证书)科廷大学毕业证原件一模一样ayvbos
 
Top profile Call Girls In Dindigul [ 7014168258 ] Call Me For Genuine Models ...
Top profile Call Girls In Dindigul [ 7014168258 ] Call Me For Genuine Models ...Top profile Call Girls In Dindigul [ 7014168258 ] Call Me For Genuine Models ...
Top profile Call Girls In Dindigul [ 7014168258 ] Call Me For Genuine Models ...gajnagarg
 
pdfcoffee.com_business-ethics-q3m7-pdf-free.pdf
pdfcoffee.com_business-ethics-q3m7-pdf-free.pdfpdfcoffee.com_business-ethics-q3m7-pdf-free.pdf
pdfcoffee.com_business-ethics-q3m7-pdf-free.pdfJOHNBEBONYAP1
 
Trump Diapers Over Dems t shirts Sweatshirt
Trump Diapers Over Dems t shirts SweatshirtTrump Diapers Over Dems t shirts Sweatshirt
Trump Diapers Over Dems t shirts Sweatshirtrahman018755
 
原版制作美国爱荷华大学毕业证(iowa毕业证书)学位证网上存档可查
原版制作美国爱荷华大学毕业证(iowa毕业证书)学位证网上存档可查原版制作美国爱荷华大学毕业证(iowa毕业证书)学位证网上存档可查
原版制作美国爱荷华大学毕业证(iowa毕业证书)学位证网上存档可查ydyuyu
 
"Boost Your Digital Presence: Partner with a Leading SEO Agency"
"Boost Your Digital Presence: Partner with a Leading SEO Agency""Boost Your Digital Presence: Partner with a Leading SEO Agency"
"Boost Your Digital Presence: Partner with a Leading SEO Agency"growthgrids
 
20240507 QFM013 Machine Intelligence Reading List April 2024.pdf
20240507 QFM013 Machine Intelligence Reading List April 2024.pdf20240507 QFM013 Machine Intelligence Reading List April 2024.pdf
20240507 QFM013 Machine Intelligence Reading List April 2024.pdfMatthew Sinclair
 
Ballia Escorts Service Girl ^ 9332606886, WhatsApp Anytime Ballia
Ballia Escorts Service Girl ^ 9332606886, WhatsApp Anytime BalliaBallia Escorts Service Girl ^ 9332606886, WhatsApp Anytime Ballia
Ballia Escorts Service Girl ^ 9332606886, WhatsApp Anytime Balliameghakumariji156
 
Story Board.pptxrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
Story Board.pptxrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrStory Board.pptxrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
Story Board.pptxrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrHenryBriggs2
 
一比一原版(Offer)康考迪亚大学毕业证学位证靠谱定制
一比一原版(Offer)康考迪亚大学毕业证学位证靠谱定制一比一原版(Offer)康考迪亚大学毕业证学位证靠谱定制
一比一原版(Offer)康考迪亚大学毕业证学位证靠谱定制pxcywzqs
 
20240508 QFM014 Elixir Reading List April 2024.pdf
20240508 QFM014 Elixir Reading List April 2024.pdf20240508 QFM014 Elixir Reading List April 2024.pdf
20240508 QFM014 Elixir Reading List April 2024.pdfMatthew Sinclair
 

Último (20)

一比一原版田纳西大学毕业证如何办理
一比一原版田纳西大学毕业证如何办理一比一原版田纳西大学毕业证如何办理
一比一原版田纳西大学毕业证如何办理
 
Local Call Girls in Seoni 9332606886 HOT & SEXY Models beautiful and charmin...
Local Call Girls in Seoni  9332606886 HOT & SEXY Models beautiful and charmin...Local Call Girls in Seoni  9332606886 HOT & SEXY Models beautiful and charmin...
Local Call Girls in Seoni 9332606886 HOT & SEXY Models beautiful and charmin...
 
一比一原版奥兹学院毕业证如何办理
一比一原版奥兹学院毕业证如何办理一比一原版奥兹学院毕业证如何办理
一比一原版奥兹学院毕业证如何办理
 
Russian Call girls in Abu Dhabi 0508644382 Abu Dhabi Call girls
Russian Call girls in Abu Dhabi 0508644382 Abu Dhabi Call girlsRussian Call girls in Abu Dhabi 0508644382 Abu Dhabi Call girls
Russian Call girls in Abu Dhabi 0508644382 Abu Dhabi Call girls
 
Nagercoil Escorts Service Girl ^ 9332606886, WhatsApp Anytime Nagercoil
Nagercoil Escorts Service Girl ^ 9332606886, WhatsApp Anytime NagercoilNagercoil Escorts Service Girl ^ 9332606886, WhatsApp Anytime Nagercoil
Nagercoil Escorts Service Girl ^ 9332606886, WhatsApp Anytime Nagercoil
 
20240509 QFM015 Engineering Leadership Reading List April 2024.pdf
20240509 QFM015 Engineering Leadership Reading List April 2024.pdf20240509 QFM015 Engineering Leadership Reading List April 2024.pdf
20240509 QFM015 Engineering Leadership Reading List April 2024.pdf
 
Vip Firozabad Phone 8250092165 Escorts Service At 6k To 30k Along With Ac Room
Vip Firozabad Phone 8250092165 Escorts Service At 6k To 30k Along With Ac RoomVip Firozabad Phone 8250092165 Escorts Service At 6k To 30k Along With Ac Room
Vip Firozabad Phone 8250092165 Escorts Service At 6k To 30k Along With Ac Room
 
哪里办理美国迈阿密大学毕业证(本硕)umiami在读证明存档可查
哪里办理美国迈阿密大学毕业证(本硕)umiami在读证明存档可查哪里办理美国迈阿密大学毕业证(本硕)umiami在读证明存档可查
哪里办理美国迈阿密大学毕业证(本硕)umiami在读证明存档可查
 
一比一原版(Curtin毕业证书)科廷大学毕业证原件一模一样
一比一原版(Curtin毕业证书)科廷大学毕业证原件一模一样一比一原版(Curtin毕业证书)科廷大学毕业证原件一模一样
一比一原版(Curtin毕业证书)科廷大学毕业证原件一模一样
 
Top profile Call Girls In Dindigul [ 7014168258 ] Call Me For Genuine Models ...
Top profile Call Girls In Dindigul [ 7014168258 ] Call Me For Genuine Models ...Top profile Call Girls In Dindigul [ 7014168258 ] Call Me For Genuine Models ...
Top profile Call Girls In Dindigul [ 7014168258 ] Call Me For Genuine Models ...
 
pdfcoffee.com_business-ethics-q3m7-pdf-free.pdf
pdfcoffee.com_business-ethics-q3m7-pdf-free.pdfpdfcoffee.com_business-ethics-q3m7-pdf-free.pdf
pdfcoffee.com_business-ethics-q3m7-pdf-free.pdf
 
Trump Diapers Over Dems t shirts Sweatshirt
Trump Diapers Over Dems t shirts SweatshirtTrump Diapers Over Dems t shirts Sweatshirt
Trump Diapers Over Dems t shirts Sweatshirt
 
原版制作美国爱荷华大学毕业证(iowa毕业证书)学位证网上存档可查
原版制作美国爱荷华大学毕业证(iowa毕业证书)学位证网上存档可查原版制作美国爱荷华大学毕业证(iowa毕业证书)学位证网上存档可查
原版制作美国爱荷华大学毕业证(iowa毕业证书)学位证网上存档可查
 
"Boost Your Digital Presence: Partner with a Leading SEO Agency"
"Boost Your Digital Presence: Partner with a Leading SEO Agency""Boost Your Digital Presence: Partner with a Leading SEO Agency"
"Boost Your Digital Presence: Partner with a Leading SEO Agency"
 
20240507 QFM013 Machine Intelligence Reading List April 2024.pdf
20240507 QFM013 Machine Intelligence Reading List April 2024.pdf20240507 QFM013 Machine Intelligence Reading List April 2024.pdf
20240507 QFM013 Machine Intelligence Reading List April 2024.pdf
 
Ballia Escorts Service Girl ^ 9332606886, WhatsApp Anytime Ballia
Ballia Escorts Service Girl ^ 9332606886, WhatsApp Anytime BalliaBallia Escorts Service Girl ^ 9332606886, WhatsApp Anytime Ballia
Ballia Escorts Service Girl ^ 9332606886, WhatsApp Anytime Ballia
 
Story Board.pptxrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
Story Board.pptxrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrStory Board.pptxrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
Story Board.pptxrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
 
call girls in Anand Vihar (delhi) call me [🔝9953056974🔝] escort service 24X7
call girls in Anand Vihar (delhi) call me [🔝9953056974🔝] escort service 24X7call girls in Anand Vihar (delhi) call me [🔝9953056974🔝] escort service 24X7
call girls in Anand Vihar (delhi) call me [🔝9953056974🔝] escort service 24X7
 
一比一原版(Offer)康考迪亚大学毕业证学位证靠谱定制
一比一原版(Offer)康考迪亚大学毕业证学位证靠谱定制一比一原版(Offer)康考迪亚大学毕业证学位证靠谱定制
一比一原版(Offer)康考迪亚大学毕业证学位证靠谱定制
 
20240508 QFM014 Elixir Reading List April 2024.pdf
20240508 QFM014 Elixir Reading List April 2024.pdf20240508 QFM014 Elixir Reading List April 2024.pdf
20240508 QFM014 Elixir Reading List April 2024.pdf
 

Badneedles

  • 1. Dmitry Savintsev Yahoo! Finding Bad Needles on a Worldwide Scale
  • 2. Who I am • Security Engineer (Paranoid Labs) • Developer and Paranoid • Custodian of internal XSS scanner • “Gopher” – Go champion
  • 3. Agenda • Scope: Reflected XSS & Big Scanning • Webseclab – test suite and playground • Scanmus – internal XSS scanner • Gryffin - Scaling up through CD • Contextdetect - Fight for Quality • Next Steps • Lessons and Summary
  • 4. Reflected “Server-Side” XSS • Large scale automated scanning • Focus on a specific vulnerability type – reflected server-side XSS • Improve and learn • XSS remains a leading cause of incidents – and BugBounty payouts
  • 5. Cross-Site Scripting (XSS) Screenshot from https://www.owasp.org/index.php/Top_10_2013-A3-Cross-Site_Scripting_(XSS)
  • 6. Large Scale Testing • Low tolerance for noise / False Positives • Large websites require high quality automatic scanning • Claim: accurate detection of reflected XSS flaws is not yet a fully solved problem!
  • 8. Why Webseclab • Need for “frozen” tests – cannot wait for the right thing to come up in prod! – need to model the previous cases • “Playground” – environment to experiment and iterate • Documentation and communication
  • 9. Webseclab • Based on multiple (internal) predecessors – ad-hoc PHP scripts, NodeJS app • In Go - for ease of deployment, and more!
  • 10. Webseclab Cases • Reflected and DOM XSS • Real-life cases – Collection of Yahoo XSS experience • Includes real issues as well as False Positives (FPs) – learn from both kinds of scanning mistakes, False Negatives and False Positives
  • 11. Easy Install 1. Download the binary fromhttps://github.com/yahoo/webseclab/releases 2. chmod 755 webseclab-mac 3. Run it! $ ./webseclab-mac => Webseclab running on http://127.0.0.1:8080!
  • 13. Webseclab and Open Source • Open source: – http://github.com/yahoo/webseclab • Would love open source security projects to use it (more) – as well as anyone else! (Training, teaching…) • Plans to use Webseclab for OWASP ZAP CD testing
  • 14. Arachni & Webseclab • 3 issues identified – all fixed • Segmentation fault on a webseclab test: https://github.com/Arachni/arachni/issues/543 • Double-encoded payload (doubq.1): https://github.com/Arachni/arachni/issues/581 • Textarea injections: https://github.com/Arachni/arachni/issues/579
  • 15. OWASP ZAP https://code.google.com/p/zaproxy/issues/list?can=2&q=XSS&sort=-id a few False Positive and False Negative issues identified and reported: • XSS False Positive on injections into script block (Webseclab /xss/reflect/js3_fp?in=) • XSS False Negative on double-encoded script injections • XSS False Negative on script injections into the Referer HTTP header • False Negative XSS on injection outside of HTML tags
  • 16. w3af • Many _fp URLs show in the scan results • Will follow up with the project members – Possibly a feature not a bug
  • 17. Industry Parallels https://github.com/google/firing-range Gruyere: Screenshots and images taken from: Gruyere: https://google-gruyere.appspot.com/ Wavsep: https://code.google.com/p/wavsep/ Webgoat: http://webgoat.github.io/
  • 19. Scanmus • Yahoo internal reflected XSS scanner – picks up a few other issues as well (SQLi, path traversal, etc.) • Written by Rasmus Lerdorf while at Yahoo • Helped to find many XSS bugs • Missed by many ex-Yahoos!
  • 20. Scanmus internals (simplified version) • A set of tests – all based on real issues and incidents • Request payload • Expected string or regexp • If matches, show as a (potential) finding.
  • 21. Scanmus test example 'full.1' => array('send'=>'%22%3E%3Cscript%3Ealert(%22xss%2 2);%3C%2Fscript%3E', 'expect'=>'"><script>alert("xss");</script>', 'fail_msg'=>'Full Javascript hack worked!', 'notify'=>true, 'replace'=>1, 'level'=>3, 'name'=>'full.1', 'charset_check'=>false,);
  • 22. Sample payloads • %22onmouseover=%22alert(document.cookie) • foo%20onmouseover=alert(document.cookie)// • javascript:alert(123);(// • alert(142);( • foo'+alert('xss')(// • </script>foo<script>alert(135);</script> • %0d%0a%0d%0a%3Cscript%3Ealert(document.cookie )%3C/script%3E • "><img src=foobar onerror=alert(13579)> • <img src=foobar onerror=alert(13579)>
  • 23. Context detections • Context adjustments done with regular expressions: // if single_quote_closing_tag_check is set, we check to see if the injection happens inside a tag with a single-quoted attribute. If it doesn't, then we ignore this hit. if(isset($test['single_quote_closing_tag_check']) && $test['single_quote_closing_tag_check']) { $m = preg_quote($test['expect']); if(!preg_match("~=s*'[^']*{$m}[^<]*>~",$text)) return; if(preg_match("~=s*"[^"]*{$m}[^<]*>~",$text)) return; }
  • 24. Gaps and Problems • Speed and coverage – single-threaded scanner – some scans taking hours or days! • Accuracy, especially False Positives – overwhelming noise • Quality of findings and reports – difficult to understand
  • 25. Solution Direction • Rewrite everything from scratch! • Set up a reliable test suite – Webseclab • Separate crawler and fuzzer • Accuracy: brainstorm on better context detection
  • 27. Continuous Delivery • Company Direction: Launch Velocity • “Commit to production with no human intervention” • Needed to adapt security scanning
  • 28. CD “Firehose” • Hundreds of releases per day • Number of Gryffin scans per month: Month # of scans 01/15 6,482 02/15 19,780 03/15 43,538 04/15 13,226
  • 29. Gryffin • Optimized crawler – Smart deduplication • Framework to run multiple scanners – both internal and open-source • Management of distributed tasks • Reporting – aggregation of findings
  • 30. Gryffin plugins • Scanmus • Tainted PhantomJS (DOM XSS scanner) • Arachni scanner • skipfish • sqlmap
  • 31. CD integration Commit Build Push to Stage Cloud Crawl & Deduplicate Scan URL URLs
  • 32. Gryffin Results • Continuous CD-driven scanning • Less reliance on engineers doing scans • Comparison of results from multiple scanners – Scanmus vs. Arachni vs. Skipfish …
  • 33. Coming soon… Gryffin talk accepted for OWASP AppSecUSA ’15! September 22-25, 2015 in San Francisco
  • 34. Gaps and Problems (Gryffin) • Accuracy of scanners • Large amount of False Positives – especially noticeable when you scan (almost) everything! • Difficult to triage and analyze • Must do something, quick!
  • 36. Scanner and Context • Context vital for: – Secure coding (prevention) – Scanning or testing (detection) • Consider alert(document.cookies): – Innocuous in the normal HTML text context – Executable in Javascript block – … unless in a properly quoted string!
  • 37. Parsing “boxes” • HTML or JS parser break the source into “boxes” • Inside of “box” same processing • User input should never be able to draw its own boxes and borders between them!
  • 38. Injection detection theory (1) Active content – Javascript/CSS • Inject a “breaker” – ex. Javascript with unbalanced parens • Check if syntax is broken – Using a real parser
  • 39. Injection detection theory (2) HTML Contexts • Inject ABC where: • “A” and “C” are identifiable unique strings • B is the “context breaker” – ex. single or double quote, a tag, a space… • Check if A and C are in the same context “box” – Using an HTML5 parser
  • 40. Contextdetect • Go-based library and application • Uses an HTML5 parser & Javascript parser http://godoc.org/golang.org/x/net/html http://godoc.org/github.com/robertkrimen/otto/parser • Performs verification of Scanmus findings • Connected via JSON bridge – Microservices!
  • 41. Contextdetect Impact • Allowed to achieve practically 0% False Positive rate! • Reduced False Negatives as well • Allowed to provide more meaningful findings messages – based on the context unit, not line of response
  • 42. Summary / Next Steps
  • 43. Next Steps • Writing a Go-based scanner – Context-driven scenario-based detection • Using experience from the Contextdetect project • Using and growing Webseclab tests – more open-source community outreach
  • 44. Lessons • Scanner / tool is only as good as its tests • Use multiple scanners for cross-checking and to get the best of each • Real parsers (HTML5/JS/CSS) for accurate context-based detection and verification • Go is an effective tool for large-scale server-side systems (security and more)
  • 45. Summary • Webseclab – foundation for improving scanning systems • Gryffin – framework for scaling up, CD integration, multiple tool plug-ins • Contextdetect – using Go HTML5 and Javascript parsers for context-oriented verification, eliminated known False Positives.
  • 48. Image attributions Go gopher is the work of Renee French licensed under Creative Commons Attributions 3.0: https://blog.golang.org/gopher http://gommavulcanizzata.deviantart.com/art/Inkscape-Lightbulb- 94339717?q=gallery%3AGommaVulcanizzata%2F7267989&qo=0 http://commons.wikimedia.org/wiki/File:U.S._Navy_Petty_Officer_3rd_Class_Jordan_Crouse_aims_a_fire_hose_on_a_ simulated_fire_during_a_general_quarters_drill_aboard_the_amphibious_assault_ship_USS_Iwo_Jima_(LHD_7)_as_th e_ship_operates_in_the_Gulf_of_Aden_1 (original: http://www.defense.gov/dodcmsshare/newsphoto/2012- 10/hires_121017-N-OR551-040.jpg, Public domain photograph from Defense.gov News Photos archive) https://www.flickr.com/photos/vialbost/12481376133/ - “Merci / Thank you”

Notas del editor

  1. Ease of dependency-free installation is one of the main features. Now binary releases are available as well.
  2. Join with the w3af slide
  3. TODO: join the slide with the flowchart one
  4. “Push to Stage” is done automatically by the build pipeline on successful build and tests execution.