SlideShare ist ein Scribd-Unternehmen logo
1 von 24
OWASP ZAP
Dynamic Security Testing Workshop for Testers
Javan Rasokat, Sage - May 2021
OWASP Zed Attack Proxy (ZAP)
● OWASP Flagship Project
● “one of the world's most popular free
security tools”
● Web App DAST tool / Vulnerability
Scanner
● Integrated into CI/CD (Jenkins, Azure
DevOps, GitHub Actions, ...)
● Comprehensive API for daemon mode
● 140+ Contributors
● Marketplace for add-ons
● Highly configurable and scriptable
● Multiple Use Cases (you’ll see later)
2
Simple, free, valuable & active
3
Secure Development Lifecycle (SDL / S-SDLC)
● What scans should you run?
○ Static - Code analysis (SAST)
○ Dynamic - Live analysis (DAST)
● Dynamic Application Security Testing (DAST)
○ Black box testing
○ Requires a WebApp in staging or prod env
○ Finds environment issues
○ Finds run-time issues
4
Build Test Deploy
Shift Left
DevSecOps: Faster better feedback, fail fast and safe
What are we trying to solve?
● Finding security issues as early as possible
● Integration into the DevOps pipeline
● Finding all of the possible vulnerabilities
● Putting pentesters out of a job :P
5
What are we NOT trying to solve?
1 Tool - 3 Types of Users
● Pentesters
○ information gathering by recording traffic, manual intercepting of traffic and tampering
data
● Developers
○ running vulnerability scans as part of their CI/CD pipeline e.g. a “ZAP baseline” scan
● Testers
○ running their testing traffic through ZAP for passive scanning and/or active security
testing
The ZAP Head-up-Display (HUD) is applicable for all.
6
It is a Tool...
… start playing with it!
zaproxy.org/download
7
ZAP as Man-in-the-Middle (MitM)
8
Passive Scanning
Demo
9
Passive Scan Rules
● Missing / incorrect security headers
● Cookie problems
● Information / error disclosure
● Missing CSRF tokens
● ...
10
Attack types - Active scanning
Vulnerability
● SQL-Injection
● Time based SQL-Injection
● SSRF
● Open Redirect
● Reflected XSS
● Path Traversal
● SSTI
● ...
Payload
● api/product/99’ OR 1=1--
● api/product/99’ AND SLEEP(15000);
● api/ctrl?host=http://mydomain.org:38193/ZapTest
● oauth/login?redirect_uri=https://google.com
● spa/welcome?name=ZAP<script>alert(1)</script>
● file/?name=../../../../etc/passwd
● spa/welcome?name=${{1+2}}
● ...
11
Many ways for automation...
● Command-line options
● Pre-build Docker Images
● Python, NodeJs + Java CLI Library
● API
● Plugins (Jenkins, Azure DevOps)
● GitHub Actions
● NEW Automation Framework (YAML)
● ThreadFix Scan Agent
● SecureCodeBox for orchestrating mass-scans
12
Active Scanning
Automation for
Testers
13
Test-driven Scanning vs. Baseline scan
Benefits by using your existing test framework:
● Take advantage of existing tests
● Better coverage of the tested app
○ If you do have good test coverage all endpoints are already covered.
○ For the Crawler/Spider it is difficult to find all endpoints. Therefore it is better to record or
import all API-endpoints.
● The captured traffic is valid.
○ ZAP does not have to guess if a parameter is expected to be a integer or string. Makes it
easier for ZAP in the active scan. A request is not blocked because one of the parameters
is in the wrong format.
14
Using Command-line Options
● Command to start ZAP GUI
● As long as you keep ZAP open => HTTP Proxy and API available at localhost:8080
15
cd /Applications/OWASP ZAP.app/Contents/Java
java -jar zap-2.10.0.jar -config scanner.attackOnStart=true
-config view.mode=attack -config api.key=secret123 -
newsession Latest_WebGoat_Scan.session
Other useful commands:
● Setting the api key
○ -config api.key=secret123
● Disable API key in a safe environment
○ -config api.disablekey=true
● Tun of db recovery (speeds things up)
○ -config database.recoverylog=false
● Update all add-ons
○ -addonupdate
● Install a non default add-on
○ -addoninstall addonname
● The ZAP Port
○ -port 8080
● Starts ZAP in daemon mode, ie without a UI
○ -daemon
● Allow any source IP to connect
○ -config api.addrs.addr.regex=true
16
Using ZAP API
Two API calls to start active Scans:
1. creating a Context
2. add a URL (the target) to the Scope
17
curl
'http://localhost:8080/JSON/context/action/newContext/?zapapiformat=JSON&apikey=s
ecret123&formmethod=GET&contextName=My+Context'
curl
'http://localhost:8080/JSON/context/action/includeInContext/?apikey=secret123&con
textName=My+Context&regex=http://localhost/WebGoat.*'
Webdriver.io
● “WebdriverIO lets you control a browser or a mobile application with just
a few lines of code.”
● Simple Selenium binding for JS
● Very popular framework for automation testing
Setting proxy: https://webdriver.io/docs/proxy/
18
Selenium Driver Settings
// Set Chrome Options
ChromeOptions chromeOptions = new ChromeOptions(); chromeOptions.addArguments("--
ignore-certificate-errors");
// Set proxy
String proxyAddress = "localhost:8080";
Proxy proxy = new
Proxy();proxy.setHttpProxy(proxyAddress).setSslProxy(proxyAddress);
// Set Desired Capabilities
DesiredCapabilities capabilities = DesiredCapabilities.chrome();
capabilities.setCapability(CapabilityType.PROXY, proxy);
capabilities.setCapability(CapabilityType.ACCEPT_SSL_CERTS, true);
capabilities.setCapability(CapabilityType.ACCEPT_INSECURE_CERTS, true);
capabilities.setCapability(ChromeOptions.CAPABILITY, chromeOptions);
19
Different ways to become MitM
There is always a way to set a HTTP Proxy...
● Using Browser Settings
● Using a Browser Add-On like FoxyProxy
● Using Java Network Properties
○ jmeter -Dhttp.proxyHost=localhost -
Dhttp.proxyPort=8080 -
Dhttps.proxyHost=localhost -
Dhttps.proxyPort=8080
● Using system-wide OS settings
20
var proxy = "http://localhost:8080";
...
capabilities: [{
browserName: 'chrome',
proxy: {
httpProxy: proxy,
sslProxy: proxy,
ftpProxy: proxy,
proxyType: "MANUAL",
autodetect: false
},
'chrome.switches': [
'--ignore-certificate-errors'
]
}],
Solve Strict-Transport-Security Certificate Errors
If you are targeting a web application with Strict-Transport-Security and you
are using a browser, you will need to add ZAP’s Dynamic SSL Certificate to
your browser.
To retrieve the ZAP’s SSL certificate you can download the CA from
● ZAP -> Preferences -> Options -> Dynamic SSL Certificate
To import the ZAP SSL Certificate into Firefox:
● Preferences -> Privacy & Security -> View Certificates -> Authorities ->
Import
PS: Of course you can call the ZAP API to download the cert ;-)
21
Report
● HTML File - default
● XML File - default
○ Upload file to ThreadFix, a vulnerability management solution
○ Allows to synchronice with Jira
● JSON Format - a zap-baseline.py option
● Markdown Format - a zap-baseline.py option
● API
○ curl -s 'http://localhost:8080/OTHER/core/other/htmlreport/?apikey=secret123' > report.html
22
More Resources
● https://www.zaproxy.org/ - Getting started guide
● https://www.zaproxy.org/zap-in-ten/ - Series of short videos
● https://twitter.com/zaproxy - Official Twitter
23
24
Q&A

Weitere ähnliche Inhalte

Was ist angesagt?

Automating OWASP ZAP - DevCSecCon talk
Automating OWASP ZAP - DevCSecCon talk Automating OWASP ZAP - DevCSecCon talk
Automating OWASP ZAP - DevCSecCon talk Simon Bennetts
 
Automating security test using Selenium and OWASP ZAP - Practical DevSecOps
Automating security test using Selenium and OWASP ZAP - Practical DevSecOpsAutomating security test using Selenium and OWASP ZAP - Practical DevSecOps
Automating security test using Selenium and OWASP ZAP - Practical DevSecOpsMohammed A. Imran
 
Checkmarx meetup API Security - API Security top 10 - Erez Yalon
Checkmarx meetup API Security -  API Security top 10 - Erez YalonCheckmarx meetup API Security -  API Security top 10 - Erez Yalon
Checkmarx meetup API Security - API Security top 10 - Erez YalonAdar Weidman
 
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
 
Change Windows registry using Powershell
Change Windows registry using PowershellChange Windows registry using Powershell
Change Windows registry using PowershellAman Dhally
 
What’s wrong with WebSocket APIs? Unveiling vulnerabilities in WebSocket APIs.
What’s wrong with WebSocket APIs? Unveiling vulnerabilities in WebSocket APIs.What’s wrong with WebSocket APIs? Unveiling vulnerabilities in WebSocket APIs.
What’s wrong with WebSocket APIs? Unveiling vulnerabilities in WebSocket APIs.Mikhail Egorov
 
Oracle Forms : Validation Triggers
Oracle Forms : Validation TriggersOracle Forms : Validation Triggers
Oracle Forms : Validation TriggersSekhar Byna
 
CNIT 126 Ch 0: Malware Analysis Primer & 1: Basic Static Techniques
CNIT 126 Ch 0: Malware Analysis Primer & 1: Basic Static TechniquesCNIT 126 Ch 0: Malware Analysis Primer & 1: Basic Static Techniques
CNIT 126 Ch 0: Malware Analysis Primer & 1: Basic Static TechniquesSam Bowne
 
XSS Magic tricks
XSS Magic tricksXSS Magic tricks
XSS Magic tricksGarethHeyes
 
Practical Malware Analysis: Ch 8: Debugging
Practical Malware Analysis: Ch 8: Debugging Practical Malware Analysis: Ch 8: Debugging
Practical Malware Analysis: Ch 8: Debugging Sam Bowne
 
Pentesting Using Burp Suite
Pentesting Using Burp SuitePentesting Using Burp Suite
Pentesting Using Burp Suitejasonhaddix
 
Hacking Adobe Experience Manager sites
Hacking Adobe Experience Manager sitesHacking Adobe Experience Manager sites
Hacking Adobe Experience Manager sitesMikhail Egorov
 
파이콘 한국 2019 - 파이썬으로 서버를 극한까지 끌어다 쓰기: Async I/O의 밑바닥
파이콘 한국 2019 - 파이썬으로 서버를 극한까지 끌어다 쓰기: Async I/O의 밑바닥파이콘 한국 2019 - 파이썬으로 서버를 극한까지 끌어다 쓰기: Async I/O의 밑바닥
파이콘 한국 2019 - 파이썬으로 서버를 극한까지 끌어다 쓰기: Async I/O의 밑바닥Seomgi Han
 
Bug Bounty #Defconlucknow2016
Bug Bounty #Defconlucknow2016Bug Bounty #Defconlucknow2016
Bug Bounty #Defconlucknow2016Shubham Gupta
 

Was ist angesagt? (20)

Automating OWASP ZAP - DevCSecCon talk
Automating OWASP ZAP - DevCSecCon talk Automating OWASP ZAP - DevCSecCon talk
Automating OWASP ZAP - DevCSecCon talk
 
Automating security test using Selenium and OWASP ZAP - Practical DevSecOps
Automating security test using Selenium and OWASP ZAP - Practical DevSecOpsAutomating security test using Selenium and OWASP ZAP - Practical DevSecOps
Automating security test using Selenium and OWASP ZAP - Practical DevSecOps
 
Checkmarx meetup API Security - API Security top 10 - Erez Yalon
Checkmarx meetup API Security -  API Security top 10 - Erez YalonCheckmarx meetup API Security -  API Security top 10 - Erez Yalon
Checkmarx meetup API Security - API Security top 10 - Erez Yalon
 
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
 
Zed Attack Proxy (ZAP)
Zed Attack Proxy (ZAP)Zed Attack Proxy (ZAP)
Zed Attack Proxy (ZAP)
 
Change Windows registry using Powershell
Change Windows registry using PowershellChange Windows registry using Powershell
Change Windows registry using Powershell
 
What’s wrong with WebSocket APIs? Unveiling vulnerabilities in WebSocket APIs.
What’s wrong with WebSocket APIs? Unveiling vulnerabilities in WebSocket APIs.What’s wrong with WebSocket APIs? Unveiling vulnerabilities in WebSocket APIs.
What’s wrong with WebSocket APIs? Unveiling vulnerabilities in WebSocket APIs.
 
Secure PHP Coding
Secure PHP CodingSecure PHP Coding
Secure PHP Coding
 
Command injection
Command injectionCommand injection
Command injection
 
Oracle Forms : Validation Triggers
Oracle Forms : Validation TriggersOracle Forms : Validation Triggers
Oracle Forms : Validation Triggers
 
CNIT 126 Ch 0: Malware Analysis Primer & 1: Basic Static Techniques
CNIT 126 Ch 0: Malware Analysis Primer & 1: Basic Static TechniquesCNIT 126 Ch 0: Malware Analysis Primer & 1: Basic Static Techniques
CNIT 126 Ch 0: Malware Analysis Primer & 1: Basic Static Techniques
 
XSS Magic tricks
XSS Magic tricksXSS Magic tricks
XSS Magic tricks
 
Practical Malware Analysis: Ch 8: Debugging
Practical Malware Analysis: Ch 8: Debugging Practical Malware Analysis: Ch 8: Debugging
Practical Malware Analysis: Ch 8: Debugging
 
Pentesting Using Burp Suite
Pentesting Using Burp SuitePentesting Using Burp Suite
Pentesting Using Burp Suite
 
Hacking Adobe Experience Manager sites
Hacking Adobe Experience Manager sitesHacking Adobe Experience Manager sites
Hacking Adobe Experience Manager sites
 
Burp suite
Burp suiteBurp suite
Burp suite
 
Laravel
LaravelLaravel
Laravel
 
Laravel ppt
Laravel pptLaravel ppt
Laravel ppt
 
파이콘 한국 2019 - 파이썬으로 서버를 극한까지 끌어다 쓰기: Async I/O의 밑바닥
파이콘 한국 2019 - 파이썬으로 서버를 극한까지 끌어다 쓰기: Async I/O의 밑바닥파이콘 한국 2019 - 파이썬으로 서버를 극한까지 끌어다 쓰기: Async I/O의 밑바닥
파이콘 한국 2019 - 파이썬으로 서버를 극한까지 끌어다 쓰기: Async I/O의 밑바닥
 
Bug Bounty #Defconlucknow2016
Bug Bounty #Defconlucknow2016Bug Bounty #Defconlucknow2016
Bug Bounty #Defconlucknow2016
 

Ähnlich wie OWASP ZAP Workshop for QA Testers

Cannibalising The Google App Engine
Cannibalising The  Google  App  EngineCannibalising The  Google  App  Engine
Cannibalising The Google App Enginecatherinewall
 
AppSec California 2016 - Making Security Agile
AppSec California 2016 - Making Security AgileAppSec California 2016 - Making Security Agile
AppSec California 2016 - Making Security AgileOleg Gryb
 
introduction to node.js
introduction to node.jsintroduction to node.js
introduction to node.jsorkaplan
 
Integration tests: use the containers, Luke!
Integration tests: use the containers, Luke!Integration tests: use the containers, Luke!
Integration tests: use the containers, Luke!Roberto Franchini
 
Android UI Testing with Appium
Android UI Testing with AppiumAndroid UI Testing with Appium
Android UI Testing with AppiumLuke Maung
 
Good practices for debugging Selenium and Appium tests
Good practices for debugging Selenium and Appium testsGood practices for debugging Selenium and Appium tests
Good practices for debugging Selenium and Appium testsAbhijeet Vaikar
 
The Future of Security and Productivity in Our Newly Remote World
The Future of Security and Productivity in Our Newly Remote WorldThe Future of Security and Productivity in Our Newly Remote World
The Future of Security and Productivity in Our Newly Remote WorldDevOps.com
 
Java @ Cloud - Setor Público SP
Java @ Cloud - Setor Público SPJava @ Cloud - Setor Público SP
Java @ Cloud - Setor Público SPIlan Salviano
 
Mastering selenium for automated acceptance tests
Mastering selenium for automated acceptance testsMastering selenium for automated acceptance tests
Mastering selenium for automated acceptance testsNick Belhomme
 
Security DevOps - Staying secure in agile projects // OWASP AppSecEU 2015 - A...
Security DevOps - Staying secure in agile projects // OWASP AppSecEU 2015 - A...Security DevOps - Staying secure in agile projects // OWASP AppSecEU 2015 - A...
Security DevOps - Staying secure in agile projects // OWASP AppSecEU 2015 - A...Christian Schneider
 
Django deployment with PaaS
Django deployment with PaaSDjango deployment with PaaS
Django deployment with PaaSAppsembler
 
Django Architecture Introduction
Django Architecture IntroductionDjango Architecture Introduction
Django Architecture IntroductionHaiqi Chen
 
An introduction to Node.js application development
An introduction to Node.js application developmentAn introduction to Node.js application development
An introduction to Node.js application developmentshelloidhq
 
Cloud Platforms for Java
Cloud Platforms for JavaCloud Platforms for Java
Cloud Platforms for Java3Pillar Global
 
Gatling Performance Workshop
Gatling Performance WorkshopGatling Performance Workshop
Gatling Performance WorkshopSai Krishna
 
Security DevOps - Free pentesters' time to focus on high-hanging fruits // Ha...
Security DevOps - Free pentesters' time to focus on high-hanging fruits // Ha...Security DevOps - Free pentesters' time to focus on high-hanging fruits // Ha...
Security DevOps - Free pentesters' time to focus on high-hanging fruits // Ha...Christian Schneider
 
Groovy In the Cloud
Groovy In the CloudGroovy In the Cloud
Groovy In the CloudJim Driscoll
 
Real World Lessons on the Pain Points of Node.js Applications
Real World Lessons on the Pain Points of Node.js ApplicationsReal World Lessons on the Pain Points of Node.js Applications
Real World Lessons on the Pain Points of Node.js ApplicationsBen Hall
 
Pyramid Deployment and Maintenance
Pyramid Deployment and MaintenancePyramid Deployment and Maintenance
Pyramid Deployment and MaintenanceJazkarta, Inc.
 

Ähnlich wie OWASP ZAP Workshop for QA Testers (20)

Cannibalising The Google App Engine
Cannibalising The  Google  App  EngineCannibalising The  Google  App  Engine
Cannibalising The Google App Engine
 
AppSec California 2016 - Making Security Agile
AppSec California 2016 - Making Security AgileAppSec California 2016 - Making Security Agile
AppSec California 2016 - Making Security Agile
 
introduction to node.js
introduction to node.jsintroduction to node.js
introduction to node.js
 
Integration tests: use the containers, Luke!
Integration tests: use the containers, Luke!Integration tests: use the containers, Luke!
Integration tests: use the containers, Luke!
 
Android UI Testing with Appium
Android UI Testing with AppiumAndroid UI Testing with Appium
Android UI Testing with Appium
 
Good practices for debugging Selenium and Appium tests
Good practices for debugging Selenium and Appium testsGood practices for debugging Selenium and Appium tests
Good practices for debugging Selenium and Appium tests
 
The Future of Security and Productivity in Our Newly Remote World
The Future of Security and Productivity in Our Newly Remote WorldThe Future of Security and Productivity in Our Newly Remote World
The Future of Security and Productivity in Our Newly Remote World
 
Java @ Cloud - Setor Público SP
Java @ Cloud - Setor Público SPJava @ Cloud - Setor Público SP
Java @ Cloud - Setor Público SP
 
Mastering selenium for automated acceptance tests
Mastering selenium for automated acceptance testsMastering selenium for automated acceptance tests
Mastering selenium for automated acceptance tests
 
Security DevOps - Staying secure in agile projects // OWASP AppSecEU 2015 - A...
Security DevOps - Staying secure in agile projects // OWASP AppSecEU 2015 - A...Security DevOps - Staying secure in agile projects // OWASP AppSecEU 2015 - A...
Security DevOps - Staying secure in agile projects // OWASP AppSecEU 2015 - A...
 
Django deployment with PaaS
Django deployment with PaaSDjango deployment with PaaS
Django deployment with PaaS
 
Django Architecture Introduction
Django Architecture IntroductionDjango Architecture Introduction
Django Architecture Introduction
 
An introduction to Node.js application development
An introduction to Node.js application developmentAn introduction to Node.js application development
An introduction to Node.js application development
 
Cloud Platforms for Java
Cloud Platforms for JavaCloud Platforms for Java
Cloud Platforms for Java
 
Gatling Performance Workshop
Gatling Performance WorkshopGatling Performance Workshop
Gatling Performance Workshop
 
Security DevOps - Free pentesters' time to focus on high-hanging fruits // Ha...
Security DevOps - Free pentesters' time to focus on high-hanging fruits // Ha...Security DevOps - Free pentesters' time to focus on high-hanging fruits // Ha...
Security DevOps - Free pentesters' time to focus on high-hanging fruits // Ha...
 
Appenginejs (old presentation)
Appenginejs (old presentation)Appenginejs (old presentation)
Appenginejs (old presentation)
 
Groovy In the Cloud
Groovy In the CloudGroovy In the Cloud
Groovy In the Cloud
 
Real World Lessons on the Pain Points of Node.js Applications
Real World Lessons on the Pain Points of Node.js ApplicationsReal World Lessons on the Pain Points of Node.js Applications
Real World Lessons on the Pain Points of Node.js Applications
 
Pyramid Deployment and Maintenance
Pyramid Deployment and MaintenancePyramid Deployment and Maintenance
Pyramid Deployment and Maintenance
 

Kürzlich hochgeladen

%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrainmasabamasaba
 
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfonteinmasabamasaba
 
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...WSO2
 
Announcing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareAnnouncing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareJim McKeeth
 
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...Bert Jan Schrijver
 
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...masabamasaba
 
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfonteinmasabamasaba
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension AidPhilip Schwarz
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...Health
 
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024VictoriaMetrics
 
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...WSO2
 
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...masabamasaba
 
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park %in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park masabamasaba
 
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...SelfMade bd
 
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...WSO2
 
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...chiefasafspells
 
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...WSO2
 
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...masabamasaba
 
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...masabamasaba
 

Kürzlich hochgeladen (20)

Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
 
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
 
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
 
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
 
Announcing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareAnnouncing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK Software
 
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
 
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
 
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
 
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
 
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
 
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park %in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
 
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
 
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
 
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
 
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
 
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
 
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
 

OWASP ZAP Workshop for QA Testers

  • 1. OWASP ZAP Dynamic Security Testing Workshop for Testers Javan Rasokat, Sage - May 2021
  • 2. OWASP Zed Attack Proxy (ZAP) ● OWASP Flagship Project ● “one of the world's most popular free security tools” ● Web App DAST tool / Vulnerability Scanner ● Integrated into CI/CD (Jenkins, Azure DevOps, GitHub Actions, ...) ● Comprehensive API for daemon mode ● 140+ Contributors ● Marketplace for add-ons ● Highly configurable and scriptable ● Multiple Use Cases (you’ll see later) 2
  • 4. Secure Development Lifecycle (SDL / S-SDLC) ● What scans should you run? ○ Static - Code analysis (SAST) ○ Dynamic - Live analysis (DAST) ● Dynamic Application Security Testing (DAST) ○ Black box testing ○ Requires a WebApp in staging or prod env ○ Finds environment issues ○ Finds run-time issues 4 Build Test Deploy Shift Left DevSecOps: Faster better feedback, fail fast and safe
  • 5. What are we trying to solve? ● Finding security issues as early as possible ● Integration into the DevOps pipeline ● Finding all of the possible vulnerabilities ● Putting pentesters out of a job :P 5 What are we NOT trying to solve?
  • 6. 1 Tool - 3 Types of Users ● Pentesters ○ information gathering by recording traffic, manual intercepting of traffic and tampering data ● Developers ○ running vulnerability scans as part of their CI/CD pipeline e.g. a “ZAP baseline” scan ● Testers ○ running their testing traffic through ZAP for passive scanning and/or active security testing The ZAP Head-up-Display (HUD) is applicable for all. 6
  • 7. It is a Tool... … start playing with it! zaproxy.org/download 7
  • 10. Passive Scan Rules ● Missing / incorrect security headers ● Cookie problems ● Information / error disclosure ● Missing CSRF tokens ● ... 10
  • 11. Attack types - Active scanning Vulnerability ● SQL-Injection ● Time based SQL-Injection ● SSRF ● Open Redirect ● Reflected XSS ● Path Traversal ● SSTI ● ... Payload ● api/product/99’ OR 1=1-- ● api/product/99’ AND SLEEP(15000); ● api/ctrl?host=http://mydomain.org:38193/ZapTest ● oauth/login?redirect_uri=https://google.com ● spa/welcome?name=ZAP<script>alert(1)</script> ● file/?name=../../../../etc/passwd ● spa/welcome?name=${{1+2}} ● ... 11
  • 12. Many ways for automation... ● Command-line options ● Pre-build Docker Images ● Python, NodeJs + Java CLI Library ● API ● Plugins (Jenkins, Azure DevOps) ● GitHub Actions ● NEW Automation Framework (YAML) ● ThreadFix Scan Agent ● SecureCodeBox for orchestrating mass-scans 12
  • 14. Test-driven Scanning vs. Baseline scan Benefits by using your existing test framework: ● Take advantage of existing tests ● Better coverage of the tested app ○ If you do have good test coverage all endpoints are already covered. ○ For the Crawler/Spider it is difficult to find all endpoints. Therefore it is better to record or import all API-endpoints. ● The captured traffic is valid. ○ ZAP does not have to guess if a parameter is expected to be a integer or string. Makes it easier for ZAP in the active scan. A request is not blocked because one of the parameters is in the wrong format. 14
  • 15. Using Command-line Options ● Command to start ZAP GUI ● As long as you keep ZAP open => HTTP Proxy and API available at localhost:8080 15 cd /Applications/OWASP ZAP.app/Contents/Java java -jar zap-2.10.0.jar -config scanner.attackOnStart=true -config view.mode=attack -config api.key=secret123 - newsession Latest_WebGoat_Scan.session
  • 16. Other useful commands: ● Setting the api key ○ -config api.key=secret123 ● Disable API key in a safe environment ○ -config api.disablekey=true ● Tun of db recovery (speeds things up) ○ -config database.recoverylog=false ● Update all add-ons ○ -addonupdate ● Install a non default add-on ○ -addoninstall addonname ● The ZAP Port ○ -port 8080 ● Starts ZAP in daemon mode, ie without a UI ○ -daemon ● Allow any source IP to connect ○ -config api.addrs.addr.regex=true 16
  • 17. Using ZAP API Two API calls to start active Scans: 1. creating a Context 2. add a URL (the target) to the Scope 17 curl 'http://localhost:8080/JSON/context/action/newContext/?zapapiformat=JSON&apikey=s ecret123&formmethod=GET&contextName=My+Context' curl 'http://localhost:8080/JSON/context/action/includeInContext/?apikey=secret123&con textName=My+Context&regex=http://localhost/WebGoat.*'
  • 18. Webdriver.io ● “WebdriverIO lets you control a browser or a mobile application with just a few lines of code.” ● Simple Selenium binding for JS ● Very popular framework for automation testing Setting proxy: https://webdriver.io/docs/proxy/ 18
  • 19. Selenium Driver Settings // Set Chrome Options ChromeOptions chromeOptions = new ChromeOptions(); chromeOptions.addArguments("-- ignore-certificate-errors"); // Set proxy String proxyAddress = "localhost:8080"; Proxy proxy = new Proxy();proxy.setHttpProxy(proxyAddress).setSslProxy(proxyAddress); // Set Desired Capabilities DesiredCapabilities capabilities = DesiredCapabilities.chrome(); capabilities.setCapability(CapabilityType.PROXY, proxy); capabilities.setCapability(CapabilityType.ACCEPT_SSL_CERTS, true); capabilities.setCapability(CapabilityType.ACCEPT_INSECURE_CERTS, true); capabilities.setCapability(ChromeOptions.CAPABILITY, chromeOptions); 19
  • 20. Different ways to become MitM There is always a way to set a HTTP Proxy... ● Using Browser Settings ● Using a Browser Add-On like FoxyProxy ● Using Java Network Properties ○ jmeter -Dhttp.proxyHost=localhost - Dhttp.proxyPort=8080 - Dhttps.proxyHost=localhost - Dhttps.proxyPort=8080 ● Using system-wide OS settings 20 var proxy = "http://localhost:8080"; ... capabilities: [{ browserName: 'chrome', proxy: { httpProxy: proxy, sslProxy: proxy, ftpProxy: proxy, proxyType: "MANUAL", autodetect: false }, 'chrome.switches': [ '--ignore-certificate-errors' ] }],
  • 21. Solve Strict-Transport-Security Certificate Errors If you are targeting a web application with Strict-Transport-Security and you are using a browser, you will need to add ZAP’s Dynamic SSL Certificate to your browser. To retrieve the ZAP’s SSL certificate you can download the CA from ● ZAP -> Preferences -> Options -> Dynamic SSL Certificate To import the ZAP SSL Certificate into Firefox: ● Preferences -> Privacy & Security -> View Certificates -> Authorities -> Import PS: Of course you can call the ZAP API to download the cert ;-) 21
  • 22. Report ● HTML File - default ● XML File - default ○ Upload file to ThreadFix, a vulnerability management solution ○ Allows to synchronice with Jira ● JSON Format - a zap-baseline.py option ● Markdown Format - a zap-baseline.py option ● API ○ curl -s 'http://localhost:8080/OTHER/core/other/htmlreport/?apikey=secret123' > report.html 22
  • 23. More Resources ● https://www.zaproxy.org/ - Getting started guide ● https://www.zaproxy.org/zap-in-ten/ - Series of short videos ● https://twitter.com/zaproxy - Official Twitter 23

Hinweis der Redaktion

  1. Source: https://www.zaproxy.org/blog/2021-04-19-collecting-statistics-for-open-source-projects/
  2. Status: https://twitter.com/psiinon/status/1290229663713726467
  3. ZAP GUI => Options => Passive Scan Rules
  4. Scan policy
  5. Other projects: https://github.com/Soluto/webdriverio-zap-proxy
  6. Chrome Cert Storage: https://www.zdnet.com/article/chrome-will-soon-have-its-own-dedicated-certificate-root-store/