SlideShare une entreprise Scribd logo
1  sur  45
Télécharger pour lire hors ligne
ZAP Automation Deepdive
Simon Bennetts
ZAP Project Lead
Mozilla Security Team
Workshop Overview
●
Quick Intro to ZAP
●
Packaged Scans
●
Authentication
●
Daemon and API
ZAP Overview
ZAP Overview
●
The worlds most widely used web app scanner
– March 2020
●
> 85,000 Direct downloads
●
> 220,000 Docker pulls
●
> 1 Million Runs
in just that one month!
ZAP Runtime Options
●
Desktop UI
●
Heads Up Display
●
Command Line
●
Packaged Scans
●
Daemon + API
ZAP Automation
●
Command Line
●
Packaged Scans
– Baseline Scan
– API Scan
– Full Scan
●
Daemon + API
Target Applications
●
BodgeIt Store
– Traditional app, simple, relatively easy
– Not maintained, only good for simple demos ;)
●
OWASP Juice Shop
– Modern, lots of pain points
– Well maintained, very good for manual testing
ZAP Command Line
Command Line Demo
●
ZAP installed locally
●
BodgeIt running Docker
docker pull psiinon/bodgeit
docker run --rm -p 8080:8080 -i -t psiinon/bodgeit
cd 'C:Program FilesOWASPZed Attack Proxy'
./zap.bat -cmd -quickurl http://localhost:8080/bodgeit -quickprogress
ZAP Packaged Scans
●
Baseline Scan
●
API Scan
●
Full Scan
Baseline Demo
●
ZAP baseline scan (docker)
●
BodgeIt running Docker
docker pull psiinon/bodgeit
docker pull owasp/zap2docker-stable
docker run --rm -p 8080:8080 -i -t psiinon/bodgeit
docker run -t owasp/zap2docker-stable zap-baseline.py -t
http://localhost:8080/bodgeit
Fails :(
Baseline Demo v2
●
ZAP baseline scan (docker)
●
BodgeIt running in Docker
docker pull psiinon/bodgeit
docker pull owasp/zap2docker-stable
docker network create zapnet
docker run --rm -p 8080:8080 --net zapnet -i -t psiinon/bodgeit
docker run -t --net zapnet owasp/zap2docker-stable zap-baseline.py -t
http://192.168.0.32:8080/bodgeit
Baseline Defaults
●
Traditional Spider for up to 1 min
●
No Ajax Spider
●
Passive scan – release and beta quality rules
Baseline Options
docker run owasp/zap2docker-stable zap-baseline.py -h
Usage: zap-baseline.py -t <target> [options]
-t target target URL including the protocol, eg
https://www.example.com
Options:
-h print this help message
-c config_file config file to use to INFO, IGNORE or FAIL warnings
-u config_url URL of config file to use to INFO, IGNORE or FAIL
warnings
-g gen_file generate default config file (all rules set to
WARN)
-m mins the number of minutes to spider for (default 1)
-r report_html file to write the full ZAP HTML report
-w report_md file to write the full ZAP Wiki (Markdown) repor
Bodgeit Baseline Scan
Scan Time URLs Warnings
Baseline default 1 min 410 13
Baseline default 2nd
1 min 410 13
Baseline -a 1 min 411 17
Baseline -j 2 mins 422 14
Baseline -a -j 2 mins 421 16
Baseline -a -j -m 5 6 mins 422 17
Baseline Demo – Juice Shop
●
ZAP baseline scan (docker)
●
JuiceShop running in Docker
docker pull bkimminich/juice-shop
docker pull owasp/zap2docker-stable
docker network create zapnet
docker run --rm -p 3000:3000 --net zapnet bkimminich/juice-shop
docker run -t --net zapnet owasp/zap2docker-stable zap-baseline.py -t
http://192.168.0.32:3000
Juice Shop Baseline Scan
Scan Time URLs Warnings
Baseline default 1 min 27 5
Baseline default 2nd
1 min 27 5
Baseline -a 2 mins 27 7
Baseline -j 2 mins 75 10
Baseline -a -j 4 mins 72 11
Baseline -a -j -m 5 13 mins 63 11
Baseline GitHub Action
●
https://github.com/marketplace/actions/owasp-zap-baseline-scan
●
Run the baseline on GitHubs infrastructure
●
Same ‘command line’ options supported
●
Automatically maintains issues
Baseline
Questions?
API Scan
●
Tuned for apps with no UI but a defined API
●
Definitions supported:
– OpenAPI
– SOAP
Full Scan Defaults
●
No timelimit
●
No Ajax Spider
●
Passive scan – release and beta quality rules
●
Active scan – release and beta quality rules
Full Scan GitHub Action
●
“Coming soon!”
Full Scan
Questions?
Packaged Scan Tuning
●
Rule configuration file
●
ZAP config options
●
Scan hooks
Packaged Scan Tuning
Questions?
Authentication
Authentication Overview
●
Web authentication is hard!
●
ZAP should be able to cope with anything
●
But we know its not easy to configure
●
Client based authentication was even harder
than I expected :P
Authentication Plan
●
Authenticate vs BodgeIt
●
Authenticate vs Juice Shop (form)
●
Authenticated vs Juice Shop (SSO)
●
Automating authentication
ZAP Authentication
●
Needs to understand:
– Session handling
– Authentication process
– Credentials
BodgeIt Simple
Authentication
Demo
BodgeIt Authentication
●
Traditional cookie based session
●
Simple login form, POST request
●
Logged in/out indicators available in most HTTP
reqs/resps
‘Simple’ Auth
Questions?
Juice Shop ‘standard’
Authentication
Demo
Juice Shop Std Authentication
●
Auth header and cookie based session
●
Simple login form, Ajax & JSON
●
Logged in/out indicators NOT available in most
HTTP reqs/resps
‘Non tivial’ Auth
Questions?
ZAP Auth related Scripts
●
Authentication
●
Session Management
●
Selenium
●
HTTP Sender
ZAP Authentication Scripts
●
Handles authentication :)
●
Key methods
– authenticate(helper, paramVals, creds)
ZAP Session Mgmt Scripts
●
Handles session management :)
●
Key methods
– extractWebSession(sessionWrapper)
– clearWebSessionIdentifiers(sessionWrapper)
– processMessageToMatchSession(sessionWrapper)
ZAP Selenium Scripts
●
Run when ZAP launches a browser
●
Key methods
– browserLaunched(ssutils)
ZAP HTTP Sender Scripts
●
Run when any req/resp goes through ZAP
●
Key methods
– sendingRequest(msg, initiator, helper)
– responseReceived(msg, initiator, helper)
ZAP Auth Related Script
Questions?
Juice Shop SSO
Authentication
Demo
Juice Shop SSO Authentication
●
Session handling as before
●
Login via Google SSO
●
In practice needs a browser
‘Browser Based’ Auth
Questions?
Any Other
Questions?

Contenu connexe

Tendances

Tendances (20)

Scripts that automate OWASP ZAP as part of a continuous delivery pipeline
Scripts that automate OWASP ZAP as part of a continuous delivery pipelineScripts that automate OWASP ZAP as part of a continuous delivery pipeline
Scripts that automate OWASP ZAP as part of a continuous delivery pipeline
 
N Different Strategies to Automate OWASP ZAP - OWASP APPSec BUCHAREST - Oct 1...
N Different Strategies to Automate OWASP ZAP - OWASP APPSec BUCHAREST - Oct 1...N Different Strategies to Automate OWASP ZAP - OWASP APPSec BUCHAREST - Oct 1...
N Different Strategies to Automate OWASP ZAP - OWASP APPSec BUCHAREST - Oct 1...
 
2014 ZAP Workshop 1: Getting Started
2014 ZAP Workshop 1: Getting Started2014 ZAP Workshop 1: Getting Started
2014 ZAP Workshop 1: Getting Started
 
BlackHat 2014 OWASP ZAP Turbo Talk
BlackHat 2014 OWASP ZAP Turbo TalkBlackHat 2014 OWASP ZAP Turbo Talk
BlackHat 2014 OWASP ZAP Turbo Talk
 
Security Testing with OWASP ZAP in CI/CD - Simon Bennetts - Codemotion Amster...
Security Testing with OWASP ZAP in CI/CD - Simon Bennetts - Codemotion Amster...Security Testing with OWASP ZAP in CI/CD - Simon Bennetts - Codemotion Amster...
Security Testing with OWASP ZAP in CI/CD - Simon Bennetts - Codemotion Amster...
 
OWASP 2012 AppSec Dublin ZAP Intro
OWASP 2012 AppSec Dublin ZAP IntroOWASP 2012 AppSec Dublin ZAP Intro
OWASP 2012 AppSec Dublin ZAP Intro
 
Automating OWASP ZAP - DevCSecCon talk
Automating OWASP ZAP - DevCSecCon talk Automating OWASP ZAP - DevCSecCon talk
Automating OWASP ZAP - DevCSecCon talk
 
Using the Zed Attack Proxy as a Web App testing tool
Using the Zed Attack Proxy as a Web App testing toolUsing the Zed Attack Proxy as a Web App testing tool
Using the Zed Attack Proxy as a Web App testing tool
 
OWASP Zed Attack Proxy Demonstration - OWASP Bangalore Nov 22 2014
OWASP Zed Attack Proxy Demonstration - OWASP Bangalore Nov 22 2014OWASP Zed Attack Proxy Demonstration - OWASP Bangalore Nov 22 2014
OWASP Zed Attack Proxy Demonstration - OWASP Bangalore Nov 22 2014
 
BSides Manchester 2014 ZAP Advanced Features
BSides Manchester 2014 ZAP Advanced FeaturesBSides Manchester 2014 ZAP Advanced Features
BSides Manchester 2014 ZAP Advanced Features
 
N Different Strategies to Automate OWASP ZAP - Cybersecurity WithTheBest - Oc...
N Different Strategies to Automate OWASP ZAP - Cybersecurity WithTheBest - Oc...N Different Strategies to Automate OWASP ZAP - Cybersecurity WithTheBest - Oc...
N Different Strategies to Automate OWASP ZAP - Cybersecurity WithTheBest - Oc...
 
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
 
OWASP 2013 EU Tour Amsterdam ZAP Intro
OWASP 2013 EU Tour Amsterdam ZAP IntroOWASP 2013 EU Tour Amsterdam ZAP Intro
OWASP 2013 EU Tour Amsterdam ZAP Intro
 
JoinSEC 2013 London - ZAP Intro
JoinSEC 2013 London - ZAP IntroJoinSEC 2013 London - ZAP Intro
JoinSEC 2013 London - ZAP Intro
 
Practical Security Testing for Developers using OWASP ZAP at Dot Net Bangalor...
Practical Security Testing for Developers using OWASP ZAP at Dot Net Bangalor...Practical Security Testing for Developers using OWASP ZAP at Dot Net Bangalor...
Practical Security Testing for Developers using OWASP ZAP at Dot Net Bangalor...
 
OWASP Zed Attack Proxy
OWASP Zed Attack ProxyOWASP Zed Attack Proxy
OWASP Zed Attack Proxy
 
Virtual Security Lab Setup - OWASP Broken Web Apps, Webgoat, & ZAP
Virtual Security Lab Setup - OWASP Broken Web Apps, Webgoat, & ZAPVirtual Security Lab Setup - OWASP Broken Web Apps, Webgoat, & ZAP
Virtual Security Lab Setup - OWASP Broken Web Apps, Webgoat, & 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
 
Zap vs burp
Zap vs burpZap vs burp
Zap vs burp
 
Owasp zap
Owasp zapOwasp zap
Owasp zap
 

Similaire à 2020 ADDO Spring Break OWASP ZAP Automation

Deploying Plack Web Applications: OSCON 2011
Deploying Plack Web Applications: OSCON 2011Deploying Plack Web Applications: OSCON 2011
Deploying Plack Web Applications: OSCON 2011
Tatsuhiko Miyagawa
 
Behat Workshop at WeLovePHP
Behat Workshop at WeLovePHPBehat Workshop at WeLovePHP
Behat Workshop at WeLovePHP
Marcos Quesada
 

Similaire à 2020 ADDO Spring Break OWASP ZAP Automation (20)

Performance profiling and testing of symfony application 2
Performance profiling and testing of symfony application 2Performance profiling and testing of symfony application 2
Performance profiling and testing of symfony application 2
 
It's a Breeze to develop Airflow (Cloud Native Warsaw)
It's a Breeze to develop Airflow (Cloud Native Warsaw)It's a Breeze to develop Airflow (Cloud Native Warsaw)
It's a Breeze to develop Airflow (Cloud Native Warsaw)
 
It's a Breeze to develop Apache Airflow (London Apache Airflow meetup)
It's a Breeze to develop Apache Airflow (London Apache Airflow meetup)It's a Breeze to develop Apache Airflow (London Apache Airflow meetup)
It's a Breeze to develop Apache Airflow (London Apache Airflow meetup)
 
Java Web Start czyli jak żyć z tą dziwną technologią & Continuous Delivery w ...
Java Web Start czyli jak żyć z tą dziwną technologią & Continuous Delivery w ...Java Web Start czyli jak żyć z tą dziwną technologią & Continuous Delivery w ...
Java Web Start czyli jak żyć z tą dziwną technologią & Continuous Delivery w ...
 
Autotests introduction - Codeception + PHP Basics
Autotests introduction - Codeception + PHP BasicsAutotests introduction - Codeception + PHP Basics
Autotests introduction - Codeception + PHP Basics
 
(phpconftw2012) PHP as a Middleware in Embedded Systems
(phpconftw2012) PHP as a Middleware in Embedded Systems(phpconftw2012) PHP as a Middleware in Embedded Systems
(phpconftw2012) PHP as a Middleware in Embedded Systems
 
Introduction to Magento PWA
Introduction to Magento PWAIntroduction to Magento PWA
Introduction to Magento PWA
 
Testing with Codeception
Testing with CodeceptionTesting with Codeception
Testing with Codeception
 
OWASP ZAP Workshop for QA Testers
OWASP ZAP Workshop for QA TestersOWASP ZAP Workshop for QA Testers
OWASP ZAP Workshop for QA Testers
 
Deploying Plack Web Applications: OSCON 2011
Deploying Plack Web Applications: OSCON 2011Deploying Plack Web Applications: OSCON 2011
Deploying Plack Web Applications: OSCON 2011
 
Towards Continuous Deployment with Django
Towards Continuous Deployment with DjangoTowards Continuous Deployment with Django
Towards Continuous Deployment with Django
 
Behat Workshop at WeLovePHP
Behat Workshop at WeLovePHPBehat Workshop at WeLovePHP
Behat Workshop at WeLovePHP
 
The Recording HTTP Proxy: Not Yet Another Messiah - Bulgaria PHP 2019
The Recording HTTP Proxy: Not Yet Another Messiah - Bulgaria PHP 2019The Recording HTTP Proxy: Not Yet Another Messiah - Bulgaria PHP 2019
The Recording HTTP Proxy: Not Yet Another Messiah - Bulgaria PHP 2019
 
we45 DEFCON Workshop - Building AppSec Automation with Python
we45 DEFCON Workshop - Building AppSec Automation with Pythonwe45 DEFCON Workshop - Building AppSec Automation with Python
we45 DEFCON Workshop - Building AppSec Automation with Python
 
Developing Brilliant and Powerful APIs in Ruby & Python
Developing Brilliant and Powerful APIs in Ruby & PythonDeveloping Brilliant and Powerful APIs in Ruby & Python
Developing Brilliant and Powerful APIs in Ruby & Python
 
PHP and FastCGI Performance Optimizations
PHP and FastCGI Performance OptimizationsPHP and FastCGI Performance Optimizations
PHP and FastCGI Performance Optimizations
 
How we realized SOA by Python at PyCon JP 2015
How we realized SOA by Python at PyCon JP 2015How we realized SOA by Python at PyCon JP 2015
How we realized SOA by Python at PyCon JP 2015
 
Pwning mobile apps without root or jailbreak
Pwning mobile apps without root or jailbreakPwning mobile apps without root or jailbreak
Pwning mobile apps without root or jailbreak
 
Creating a reasonable project boilerplate
Creating a reasonable project boilerplateCreating a reasonable project boilerplate
Creating a reasonable project boilerplate
 
DevOpsDays Taipei 2019 - Mastering IaC the DevOps Way
DevOpsDays Taipei 2019 - Mastering IaC the DevOps WayDevOpsDays Taipei 2019 - Mastering IaC the DevOps Way
DevOpsDays Taipei 2019 - Mastering IaC the DevOps Way
 

Dernier

Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Victor Rentea
 

Dernier (20)

Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 

2020 ADDO Spring Break OWASP ZAP Automation