SlideShare a Scribd company logo
Effective Security Lifecycle
in DevOps
Pawel Krawczyk
Intro
● In application security since 90’s
– Worked for Motorola, Aon, Goldman-Sachs, HSBC
– OWASP, open-source https://github.com/kravietz
– Created https://webcookies.org/
● Contact me at pawel.krawczyk@hush.com
Three Riders of the Apocalypse
● Custom code exploits
● Framework and library exploits
● Infrastructure that allows all that
Self-defending web applications
4
• Modern web application frameworks have powerful security features
− Template escaping and sanitization by design
− Database abstraction
− Session management
− Authentication
− Web security features
• Advantages
− They come for free
− They’re standard
− They’re thoroughly tested for QA and security audited
− Usually more robust than home-brewed ones
Self-defending web applications
5
• Modern web application frameworks have powerful security features
− Template escaping and sanitization by design → prevent XSS
− Database abstraction → prevent SQLi
− Session management → prevent session fixation, CSRF
− Authentication → prevent admin/admin1
− Web security features → protect client-side
• Advantages
− They come for free
− They’re standard
− They’re thoroughly tested for QA and security audited
− Usually more robust than home-brewed ones
Primary „do not repeat at home” areas
6
• Input validation, sanitization and escaping
• Cryptography
• Authentication, authorization
• A lot of libraries on GitHub
− Most are of poor quality!
− Many users != quality code
− Be very careful when using samples from StackOverflow!
Effective DevSecOps
Effective DevSecOps
9
SAP Java
Freemarker Templates Auto-Escaping
Freemarker Templates Auto-Escaping
13
Toxic dependencies
Libraries and Dependencies
14
What really makes your application?
1. The code you wrote
●
“our code”, “custom code”
2. Platform API and standard libraries
●
Django, ASP.NET, DropWizard, JAX-WS, Node.js
3. 3rd party libraries
●
Include a dozen, you’ll get hundreds – chain reaction
Libraries and Dependencies
15
What really makes your application?
1. The code you wrote
●
“our code”, “custom code”
2. Platform API and standard libraries
●
Django, ASP.NET, DropWizard, JAX-WS, Node.js
3. 3rd party libraries
●
Include a dozen, you’ll get hundreds – chain reaction
Libraries and Dependencies
16
What really makes your application?
1. The code you wrote
●
“our code”, “custom code”
2. Platform API and standard libraries
●
Django, ASP.NET, DropWizard, JAX-WS, Node.js
3. 3rd party libraries
●
Include a dozen, you’ll get hundreds – chain reaction
Libraries and Dependencies
17
What really makes your application?
1. The code you wrote
●
“our code”, “custom code”
2. Platform API and standard libraries
●
Django, ASP.NET, DropWizard, JAX-WS, Node.js
3. 3rd party libraries
●
Include a dozen, you’ll get hundreds – chain reaction
Vulnerabilities in client-side libraries
18
Dependency watchers
OWASP Dependency Check (Java)
20
OWASP Dependency Check
21
npm audit (previously: Node Security Platform)
22
Safety (Python)
23
Retire.js (JavaScript)
24
Snyk.io (JavaScript)
25
Keeping up to date
● Abandon the “n-1” nonsense
● Always upgrade libraries with security patches
– Even if they are not exploitable right now
● Prefer to install any bugfix updates
– If you hold, you only accumulate tech debt
– Twice the work when a security update comes
Custom code scanners
Security Scanners
28
• Huge market with very inconsistent quality and maturity
− Good salesmen with nearly useless products
− Mature products with too many bells-and-whistles
− Ancient scanning engines poorly handling modern code
− Expensive, but price unrelated to quality
• Key segments
− SAST („static application security testing”)
− DAST („dynamic”)
− IAST („interacive”)
− RASP (“run-time application self-protection”)
• Security scanner buyer’s guide
− Always evaluate scanner for specific project
What various scanners see?
29
API #1 API #2
Nginx
Load balancer
SAML
DAST
Different scopes of SAST/DAST/IAST
30
API #1 API #2
Nginx
Load balancer
SAML
DAST
Different scopes of SAST/DAST/IAST
31
API #1 API #2
Nginx
Load balancer
SAML
DAST – dynamic scanning
“curl on steroids”
HTTP crawler & scanner
+ sees whole app
- requires working app
- noisy
- false positives
SAST
DAST
Different scopes of SAST/DAST/IAST
32
API #1
API #2
Java
Nginx
Load balancer
SAML
SAST
DAST
Different scopes of SAST/DAST/IAST
33
API #1
API #2
Java
Nginx
Load balancer
SAML
SAST – source code
“grep on steroids”
+ no binary required
+ all exec paths
- very noisy
- false positives
- very expensive
SAST
DAST
IAST
Different scopes of SAST/DAST/IAST
34
API #1 API #2
Nginx
Load balancer
SAML
SAST
DAST
IAST
Different scopes of SAST/DAST/IAST
35
API #1 API #2
Nginx
Load balancer
SAMLIAST – run-time scan
“strace on steroids”
+ low false positives
+ high precision
- limited to one service
- expensive
SAST
DAST
Different scopes of SAST/DAST/IAST
36
API #1
API #2
Nginx
Load balancer
SAML
RASP
IAST
SAST
DAST
Different scopes of SAST/DAST/IAST
37
API #1
API #2
Nginx
Load balancer
SAML
RASP
IAST
RASP – run-time protection
“AppArmor for Java”
+ high precision
+ better than WAF
Scanners parade
DefenseCode ThunderScan (SAST)
40
FindSecurityBugs (SAST)
41
SpotBugs (SAST)
42
Formerly FindBugs and FindSecBugs
SpotBugs (SAST)
Contrast Security (IAST)
OWASP ZAP (DAST)
45
Bandit (SAST)
Security scanner buyer’s guide
46
• Programming language support
− Language version and syntax supported
• Supports JavaScript, but what about ES6?
− Framework support
• Nobody writes web apps in pure Java or Python
• Frameworks provide key HTTP, templating, SQL abstraction
• Scanner must know framework entry and exit points
• Scanner supports JavaScript, but does it know about Node.js?
• Understands Java, but what about JAX, Jackson, DropWizard?
• Play Framework is part Java, part Scala, compiles to Java bytecode
Rule updates
● How frequently updated?
– Vulnerability detection rules are the heart of each scanner
– Not much joy from ASP.NET 2.0 rules
● Compiled binaries required?
– Advantage of SAST is source-code only scanning
– Compiled improve precision but limits deployment to developer environment
48
Integration with build pipeline
● Inline scan vs dedicated scan server
● Headless (command line only) run vs GUI
● How much resources taken by the scanner?
● Some scanners require resource-intensive servers
● Integration with continuous integration tools (Jenkins plugins, API)
● Effectiveness of web crawling (DAST only, AngularJS apps)
Result analysis
● Precision of results
● Thousands of false positives render scanner useless
● Does it find actual vulnerabilities? (false sense of security)
● Can you rate and comment findings?
● Can you whitelist false positives or accepted risk?
● Can you report false positives to vendor?
● Does it integrate into IDE?
● Plugins for IntelliJ, Eclipse, Visual Studio?
 Systems unpatched for years
− “for security reasons we don’t install any security patches”
− “we’re not target”
 No OS-level hardening
− “for security reasons we keep all SUID binaries”
 Flat huge LANs
− “it’s been like this since 80’s”
 No host-level firewalls
− “our perimeter has three expensive firewalls”
 No intrusion detection
− “why would anyone run a SSH scan against us for weeks?”
Infrastructure horror
Blacklisting
OSSEC/Wazuh Intrusion Detection
Effective DevSecOps
 apt install unattended-upgrades
 InSpec https://www.inspec.io/
 Lynis https://cisofy.com/lynis/
 SSH and OS hardening roles
− https://dev-sec.io/
− Ansible, Chef, Puppet
Operating system hardening
Questions
● pawel.krawczyk@hush.com
● Signal: +44 7879 180015
● Telegram, XMPP, SSB etc

More Related Content

What's hot (20)

PPTX
Continuous and Visible Security Testing with BDD-Security
Stephen de Vries
 
PPTX
Simplify Dev with Complicated Security Tools
Kevin Fealey
 
PDF
DevSecOps: What Why and How : Blackhat 2019
NotSoSecure Global Services
 
PPTX
Static Analysis Security Testing for Dummies... and You
Kevin Fealey
 
PDF
Proactive Security AppSec Case Study
Andy Hoernecke
 
PPTX
Agile and Secure SDLC
Nazar Tymoshyk, CEH, Ph.D.
 
PDF
SecDevOps - The Operationalisation of Security
Dinis Cruz
 
PPSX
Agile AppSec DevOps
Robert Grupe, CSSLP CISSP PE PMP
 
PDF
Threat Modeling for System Builders and System Breakers - Dan Cornell of Deni...
Denim Group
 
PPT
Code Quality - Security
sedukull
 
PPTX
What Good is this Tool? A Guide to Choosing the Right Application Security Te...
Kevin Fealey
 
PPTX
Implementing an Application Security Pipeline in Jenkins
Suman Sourav
 
PPTX
Secure Software Development Life Cycle
Maurice Dawson
 
PPTX
Integrating security into Continuous Delivery
Tom Stiehm
 
PPTX
24may 1200 valday eric anklesaria 'secure sdlc – core banking'
Positive Hack Days
 
PPTX
Agile and Secure Development
Nazar Tymoshyk, CEH, Ph.D.
 
PDF
Building Your Application Security Data Hub - OWASP AppSecUSA
Denim Group
 
PPTX
we45 SecDevOps Presentation - ISACA Chennai
Abhay Bhargav
 
PDF
Shift Left Security
gjdevos
 
PPTX
Static Application Security Testing Strategies for Automation and Continuous ...
Kevin Fealey
 
Continuous and Visible Security Testing with BDD-Security
Stephen de Vries
 
Simplify Dev with Complicated Security Tools
Kevin Fealey
 
DevSecOps: What Why and How : Blackhat 2019
NotSoSecure Global Services
 
Static Analysis Security Testing for Dummies... and You
Kevin Fealey
 
Proactive Security AppSec Case Study
Andy Hoernecke
 
Agile and Secure SDLC
Nazar Tymoshyk, CEH, Ph.D.
 
SecDevOps - The Operationalisation of Security
Dinis Cruz
 
Threat Modeling for System Builders and System Breakers - Dan Cornell of Deni...
Denim Group
 
Code Quality - Security
sedukull
 
What Good is this Tool? A Guide to Choosing the Right Application Security Te...
Kevin Fealey
 
Implementing an Application Security Pipeline in Jenkins
Suman Sourav
 
Secure Software Development Life Cycle
Maurice Dawson
 
Integrating security into Continuous Delivery
Tom Stiehm
 
24may 1200 valday eric anklesaria 'secure sdlc – core banking'
Positive Hack Days
 
Agile and Secure Development
Nazar Tymoshyk, CEH, Ph.D.
 
Building Your Application Security Data Hub - OWASP AppSecUSA
Denim Group
 
we45 SecDevOps Presentation - ISACA Chennai
Abhay Bhargav
 
Shift Left Security
gjdevos
 
Static Application Security Testing Strategies for Automation and Continuous ...
Kevin Fealey
 

Similar to Effective DevSecOps (20)

PDF
stackconf 2024 | How to hack and defend (your) open source by Roman Zhukov.pdf
NETWAYS
 
PDF
Статический анализ кода в контексте SSDL
Positive Hack Days
 
PPTX
SAST_QSDL
Ivan Elkin
 
PPTX
OWASP_Top_Ten_Proactive_Controls_v2.pptx
cgt38842
 
PDF
Analysis of-quality-of-pkgs-in-packagist-univ-20171024
Clark Everetts
 
PPTX
OWASP_Top_Ten_Proactive_Controls version 2
ssuser18349f1
 
PPTX
OWASP_Top_Ten_Proactive_Controls_v2.pptx
azida3
 
PPTX
OWASP_Top_Ten_Proactive_Controls_v2.pptx
johnpragasam1
 
PPTX
OWASP_Top_Ten_Proactive_Controls_v32.pptx
nmk42194
 
PDF
we45 DEFCON Workshop - Building AppSec Automation with Python
Abhay Bhargav
 
PDF
How do JavaScript frameworks impact the security of applications?
Ksenia Peguero
 
PDF
A Big Data Lake Based on Spark for BBVA Bank-(Oscar Mendez, STRATIO)
Spark Summit
 
PDF
Security Goodness with Ruby on Rails
Source Conference
 
PPTX
Meetup callback
Wayne Scarano
 
PPTX
Modern Web-site Development Pipeline
GlobalLogic Ukraine
 
PPTX
GPCE16: Automatic Non-functional Testing of Code Generators Families
Mohamed BOUSSAA
 
PDF
Apache Drill (ver. 0.2)
Camuel Gilyadov
 
PPTX
Asynchrone Echtzeitanwendungen für SharePoint mit SignalR und knockout.js
Christian Heindel
 
PDF
OWASP SF - Reviewing Modern JavaScript Applications
Lewis Ardern
 
PPTX
Raising ux bar with offline first design
Kyrylo Reznykov
 
stackconf 2024 | How to hack and defend (your) open source by Roman Zhukov.pdf
NETWAYS
 
Статический анализ кода в контексте SSDL
Positive Hack Days
 
SAST_QSDL
Ivan Elkin
 
OWASP_Top_Ten_Proactive_Controls_v2.pptx
cgt38842
 
Analysis of-quality-of-pkgs-in-packagist-univ-20171024
Clark Everetts
 
OWASP_Top_Ten_Proactive_Controls version 2
ssuser18349f1
 
OWASP_Top_Ten_Proactive_Controls_v2.pptx
azida3
 
OWASP_Top_Ten_Proactive_Controls_v2.pptx
johnpragasam1
 
OWASP_Top_Ten_Proactive_Controls_v32.pptx
nmk42194
 
we45 DEFCON Workshop - Building AppSec Automation with Python
Abhay Bhargav
 
How do JavaScript frameworks impact the security of applications?
Ksenia Peguero
 
A Big Data Lake Based on Spark for BBVA Bank-(Oscar Mendez, STRATIO)
Spark Summit
 
Security Goodness with Ruby on Rails
Source Conference
 
Meetup callback
Wayne Scarano
 
Modern Web-site Development Pipeline
GlobalLogic Ukraine
 
GPCE16: Automatic Non-functional Testing of Code Generators Families
Mohamed BOUSSAA
 
Apache Drill (ver. 0.2)
Camuel Gilyadov
 
Asynchrone Echtzeitanwendungen für SharePoint mit SignalR und knockout.js
Christian Heindel
 
OWASP SF - Reviewing Modern JavaScript Applications
Lewis Ardern
 
Raising ux bar with offline first design
Kyrylo Reznykov
 
Ad

More from Pawel Krawczyk (20)

PPTX
Top DevOps Security Failures
Pawel Krawczyk
 
PPTX
Authenticity and usability
Pawel Krawczyk
 
ODP
Reading Geek Night 2019
Pawel Krawczyk
 
PPTX
Unicode the hero or villain
Pawel Krawczyk
 
ODP
Get rid of TLS certificates - using IPSec for large scale cloud protection
Pawel Krawczyk
 
PPTX
Presentation from CyberGov.pl 2015
Pawel Krawczyk
 
PDF
Łukasz Lenart "How secure your web framework is? Based on Apache Struts 2"
Pawel Krawczyk
 
PDF
Leszek Miś "Czy twoj WAF to potrafi"
Pawel Krawczyk
 
PPTX
Paweł Krawczyk - Ekonomia bezpieczeństwa
Pawel Krawczyk
 
PPTX
Are electronic signature assumptions realistic
Pawel Krawczyk
 
PPTX
Dlaczego przejmować się bezpieczeństwem aplikacji (pol)
Pawel Krawczyk
 
PPTX
Filtrowanie sieci - Panoptykon
Pawel Krawczyk
 
PPTX
Pragmatic view on Electronic Signature directive 1999 93
Pawel Krawczyk
 
PPTX
Why care about application security
Pawel Krawczyk
 
PPT
Source Code Scanners
Pawel Krawczyk
 
PDF
Krawczyk Ekonomia Bezpieczenstwa 2
Pawel Krawczyk
 
PDF
Audyt Wewnetrzny W Zakresie Bezpieczenstwa
Pawel Krawczyk
 
ODP
Kryptografia i mechanizmy bezpieczenstwa
Pawel Krawczyk
 
ODP
Zaufanie W Systemach Informatycznych
Pawel Krawczyk
 
PPT
Real Life Information Security
Pawel Krawczyk
 
Top DevOps Security Failures
Pawel Krawczyk
 
Authenticity and usability
Pawel Krawczyk
 
Reading Geek Night 2019
Pawel Krawczyk
 
Unicode the hero or villain
Pawel Krawczyk
 
Get rid of TLS certificates - using IPSec for large scale cloud protection
Pawel Krawczyk
 
Presentation from CyberGov.pl 2015
Pawel Krawczyk
 
Łukasz Lenart "How secure your web framework is? Based on Apache Struts 2"
Pawel Krawczyk
 
Leszek Miś "Czy twoj WAF to potrafi"
Pawel Krawczyk
 
Paweł Krawczyk - Ekonomia bezpieczeństwa
Pawel Krawczyk
 
Are electronic signature assumptions realistic
Pawel Krawczyk
 
Dlaczego przejmować się bezpieczeństwem aplikacji (pol)
Pawel Krawczyk
 
Filtrowanie sieci - Panoptykon
Pawel Krawczyk
 
Pragmatic view on Electronic Signature directive 1999 93
Pawel Krawczyk
 
Why care about application security
Pawel Krawczyk
 
Source Code Scanners
Pawel Krawczyk
 
Krawczyk Ekonomia Bezpieczenstwa 2
Pawel Krawczyk
 
Audyt Wewnetrzny W Zakresie Bezpieczenstwa
Pawel Krawczyk
 
Kryptografia i mechanizmy bezpieczenstwa
Pawel Krawczyk
 
Zaufanie W Systemach Informatycznych
Pawel Krawczyk
 
Real Life Information Security
Pawel Krawczyk
 
Ad

Recently uploaded (20)

PDF
SWEBOK Guide and Software Services Engineering Education
Hironori Washizaki
 
PDF
Jak MŚP w Europie Środkowo-Wschodniej odnajdują się w świecie AI
dominikamizerska1
 
PDF
Complete Network Protection with Real-Time Security
L4RGINDIA
 
PDF
Blockchain Transactions Explained For Everyone
CIFDAQ
 
PDF
HubSpot Main Hub: A Unified Growth Platform
Jaswinder Singh
 
PDF
NewMind AI Journal - Weekly Chronicles - July'25 Week II
NewMind AI
 
PPTX
MSP360 Backup Scheduling and Retention Best Practices.pptx
MSP360
 
PDF
Log-Based Anomaly Detection: Enhancing System Reliability with Machine Learning
Mohammed BEKKOUCHE
 
PDF
Achieving Consistent and Reliable AI Code Generation - Medusa AI
medusaaico
 
PDF
Smart Air Quality Monitoring with Serrax AQM190 LITE
SERRAX TECHNOLOGIES LLP
 
PDF
LLMs.txt: Easily Control How AI Crawls Your Site
Keploy
 
PPTX
Building a Production-Ready Barts Health Secure Data Environment Tooling, Acc...
Barts Health
 
PDF
Complete JavaScript Notes: From Basics to Advanced Concepts.pdf
haydendavispro
 
PDF
Exolore The Essential AI Tools in 2025.pdf
Srinivasan M
 
PDF
Impact of IEEE Computer Society in Advancing Emerging Technologies including ...
Hironori Washizaki
 
PPTX
WooCommerce Workshop: Bring Your Laptop
Laura Hartwig
 
PDF
TrustArc Webinar - Data Privacy Trends 2025: Mid-Year Insights & Program Stra...
TrustArc
 
PDF
Building Real-Time Digital Twins with IBM Maximo & ArcGIS Indoors
Safe Software
 
PDF
New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
PDF
Smart Trailers 2025 Update with History and Overview
Paul Menig
 
SWEBOK Guide and Software Services Engineering Education
Hironori Washizaki
 
Jak MŚP w Europie Środkowo-Wschodniej odnajdują się w świecie AI
dominikamizerska1
 
Complete Network Protection with Real-Time Security
L4RGINDIA
 
Blockchain Transactions Explained For Everyone
CIFDAQ
 
HubSpot Main Hub: A Unified Growth Platform
Jaswinder Singh
 
NewMind AI Journal - Weekly Chronicles - July'25 Week II
NewMind AI
 
MSP360 Backup Scheduling and Retention Best Practices.pptx
MSP360
 
Log-Based Anomaly Detection: Enhancing System Reliability with Machine Learning
Mohammed BEKKOUCHE
 
Achieving Consistent and Reliable AI Code Generation - Medusa AI
medusaaico
 
Smart Air Quality Monitoring with Serrax AQM190 LITE
SERRAX TECHNOLOGIES LLP
 
LLMs.txt: Easily Control How AI Crawls Your Site
Keploy
 
Building a Production-Ready Barts Health Secure Data Environment Tooling, Acc...
Barts Health
 
Complete JavaScript Notes: From Basics to Advanced Concepts.pdf
haydendavispro
 
Exolore The Essential AI Tools in 2025.pdf
Srinivasan M
 
Impact of IEEE Computer Society in Advancing Emerging Technologies including ...
Hironori Washizaki
 
WooCommerce Workshop: Bring Your Laptop
Laura Hartwig
 
TrustArc Webinar - Data Privacy Trends 2025: Mid-Year Insights & Program Stra...
TrustArc
 
Building Real-Time Digital Twins with IBM Maximo & ArcGIS Indoors
Safe Software
 
New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
Smart Trailers 2025 Update with History and Overview
Paul Menig
 

Effective DevSecOps

  • 1. Effective Security Lifecycle in DevOps Pawel Krawczyk
  • 2. Intro ● In application security since 90’s – Worked for Motorola, Aon, Goldman-Sachs, HSBC – OWASP, open-source https://github.com/kravietz – Created https://webcookies.org/ ● Contact me at [email protected]
  • 3. Three Riders of the Apocalypse ● Custom code exploits ● Framework and library exploits ● Infrastructure that allows all that
  • 4. Self-defending web applications 4 • Modern web application frameworks have powerful security features − Template escaping and sanitization by design − Database abstraction − Session management − Authentication − Web security features • Advantages − They come for free − They’re standard − They’re thoroughly tested for QA and security audited − Usually more robust than home-brewed ones
  • 5. Self-defending web applications 5 • Modern web application frameworks have powerful security features − Template escaping and sanitization by design → prevent XSS − Database abstraction → prevent SQLi − Session management → prevent session fixation, CSRF − Authentication → prevent admin/admin1 − Web security features → protect client-side • Advantages − They come for free − They’re standard − They’re thoroughly tested for QA and security audited − Usually more robust than home-brewed ones
  • 6. Primary „do not repeat at home” areas 6 • Input validation, sanitization and escaping • Cryptography • Authentication, authorization • A lot of libraries on GitHub − Most are of poor quality! − Many users != quality code − Be very careful when using samples from StackOverflow!
  • 9. 9
  • 14. Libraries and Dependencies 14 What really makes your application? 1. The code you wrote ● “our code”, “custom code” 2. Platform API and standard libraries ● Django, ASP.NET, DropWizard, JAX-WS, Node.js 3. 3rd party libraries ● Include a dozen, you’ll get hundreds – chain reaction
  • 15. Libraries and Dependencies 15 What really makes your application? 1. The code you wrote ● “our code”, “custom code” 2. Platform API and standard libraries ● Django, ASP.NET, DropWizard, JAX-WS, Node.js 3. 3rd party libraries ● Include a dozen, you’ll get hundreds – chain reaction
  • 16. Libraries and Dependencies 16 What really makes your application? 1. The code you wrote ● “our code”, “custom code” 2. Platform API and standard libraries ● Django, ASP.NET, DropWizard, JAX-WS, Node.js 3. 3rd party libraries ● Include a dozen, you’ll get hundreds – chain reaction
  • 17. Libraries and Dependencies 17 What really makes your application? 1. The code you wrote ● “our code”, “custom code” 2. Platform API and standard libraries ● Django, ASP.NET, DropWizard, JAX-WS, Node.js 3. 3rd party libraries ● Include a dozen, you’ll get hundreds – chain reaction
  • 22. npm audit (previously: Node Security Platform) 22
  • 26. Keeping up to date ● Abandon the “n-1” nonsense ● Always upgrade libraries with security patches – Even if they are not exploitable right now ● Prefer to install any bugfix updates – If you hold, you only accumulate tech debt – Twice the work when a security update comes
  • 28. Security Scanners 28 • Huge market with very inconsistent quality and maturity − Good salesmen with nearly useless products − Mature products with too many bells-and-whistles − Ancient scanning engines poorly handling modern code − Expensive, but price unrelated to quality • Key segments − SAST („static application security testing”) − DAST („dynamic”) − IAST („interacive”) − RASP (“run-time application self-protection”) • Security scanner buyer’s guide − Always evaluate scanner for specific project
  • 29. What various scanners see? 29 API #1 API #2 Nginx Load balancer SAML
  • 30. DAST Different scopes of SAST/DAST/IAST 30 API #1 API #2 Nginx Load balancer SAML
  • 31. DAST Different scopes of SAST/DAST/IAST 31 API #1 API #2 Nginx Load balancer SAML DAST – dynamic scanning “curl on steroids” HTTP crawler & scanner + sees whole app - requires working app - noisy - false positives
  • 32. SAST DAST Different scopes of SAST/DAST/IAST 32 API #1 API #2 Java Nginx Load balancer SAML
  • 33. SAST DAST Different scopes of SAST/DAST/IAST 33 API #1 API #2 Java Nginx Load balancer SAML SAST – source code “grep on steroids” + no binary required + all exec paths - very noisy - false positives - very expensive
  • 34. SAST DAST IAST Different scopes of SAST/DAST/IAST 34 API #1 API #2 Nginx Load balancer SAML
  • 35. SAST DAST IAST Different scopes of SAST/DAST/IAST 35 API #1 API #2 Nginx Load balancer SAMLIAST – run-time scan “strace on steroids” + low false positives + high precision - limited to one service - expensive
  • 36. SAST DAST Different scopes of SAST/DAST/IAST 36 API #1 API #2 Nginx Load balancer SAML RASP IAST
  • 37. SAST DAST Different scopes of SAST/DAST/IAST 37 API #1 API #2 Nginx Load balancer SAML RASP IAST RASP – run-time protection “AppArmor for Java” + high precision + better than WAF
  • 42. 42 Formerly FindBugs and FindSecBugs SpotBugs (SAST)
  • 46. Security scanner buyer’s guide 46 • Programming language support − Language version and syntax supported • Supports JavaScript, but what about ES6? − Framework support • Nobody writes web apps in pure Java or Python • Frameworks provide key HTTP, templating, SQL abstraction • Scanner must know framework entry and exit points • Scanner supports JavaScript, but does it know about Node.js? • Understands Java, but what about JAX, Jackson, DropWizard? • Play Framework is part Java, part Scala, compiles to Java bytecode
  • 47. Rule updates ● How frequently updated? – Vulnerability detection rules are the heart of each scanner – Not much joy from ASP.NET 2.0 rules ● Compiled binaries required? – Advantage of SAST is source-code only scanning – Compiled improve precision but limits deployment to developer environment
  • 48. 48 Integration with build pipeline ● Inline scan vs dedicated scan server ● Headless (command line only) run vs GUI ● How much resources taken by the scanner? ● Some scanners require resource-intensive servers ● Integration with continuous integration tools (Jenkins plugins, API) ● Effectiveness of web crawling (DAST only, AngularJS apps)
  • 49. Result analysis ● Precision of results ● Thousands of false positives render scanner useless ● Does it find actual vulnerabilities? (false sense of security) ● Can you rate and comment findings? ● Can you whitelist false positives or accepted risk? ● Can you report false positives to vendor? ● Does it integrate into IDE? ● Plugins for IntelliJ, Eclipse, Visual Studio?
  • 50.  Systems unpatched for years − “for security reasons we don’t install any security patches” − “we’re not target”  No OS-level hardening − “for security reasons we keep all SUID binaries”  Flat huge LANs − “it’s been like this since 80’s”  No host-level firewalls − “our perimeter has three expensive firewalls”  No intrusion detection − “why would anyone run a SSH scan against us for weeks?” Infrastructure horror
  • 54.  apt install unattended-upgrades  InSpec https://www.inspec.io/  Lynis https://cisofy.com/lynis/  SSH and OS hardening roles − https://dev-sec.io/ − Ansible, Chef, Puppet Operating system hardening
  • 55. Questions ● [email protected] ● Signal: +44 7879 180015 ● Telegram, XMPP, SSB etc