SlideShare a Scribd company logo
Learn to Pen-test with ZAP
A quick introduction to
Web Application Pen-
testing using OWASP’s ZED
Attack Proxy
About Me
3
About ZAP
• ZAP is the official Web Application Security testing
tool endorsed by OWASP (Flagship project)
• ZAP is free to use and modify, under an Apache 2
license (so customizations are possible)
• Link to download + docs:
https://www.owasp.org/index.php/OWASP_Zed_At
tack_Proxy_Project
4
What does it do?
• ZAP can spider through a website and then list HTTP requests it
discovers.
– It may miss requests that require user interaction or logged-in state.
• ZAP can also intercept HTTP requests while a user interacts with a site.
This is done by configuring the browser to use ZAP as a proxy.
• ZAP can identify vulnerabilities on the HTTP requests that it spiders or
intercepts.
– Active mode: ZAP will act like a hacker and replace parameter values with attacks like
SQLi and XSS
– Passive mode: ZAP will observe issues in the responses from the site: certain headers
are missing or are misconfigured, information disclosure, cross domain issues.
5
Quick Attack
• Simply put in the starting URL of a website you have
permission to test and hit Attack.
• This is point and shoot mode, is unauthenticated, will miss
pages
6
Reviewing the Issues
• If security issues are
detected they will be
listed under the Alerts
tab.
• You can see the
vulnerable URL and the
HTTP request that was
sent and the validation
that was used.
7
Intercepting Requests
• You can configure the default ZAP proxy port to be something other
than 8080 (e.g. 8888 so it doesn’t conflict with tomcat)
• Configure a FoxyProxy definition for ZAP so you can easily switch ZAP on
and off
8
Intercepting Requests Cont.
• Once you have setup Firefox you can now see HTTP requests
flowing through ZAP
9
SSL Configuration
• Browsing SSL sites through an
intercepting proxy can be
troublesome especially when
the site includes resources
stored on other domains.
• ZAP can dynamically generate
SSL Certs based on the host of
the request. The certs are
signed with ZAPs own CA
• You can import the ZAP CA as a
trusted CA in Firefox and all ZAP
traffic will be trusted.
10
Session Management
• ZAP keeps track of session variables and can automatically detect or
allow you to configure them
• To enable session tracking go to Edit > Enable Session Tracking (Cookie)
• This will cause ZAP to update Cookies used in attack requests when you
record a new login.
11
Manual Tests
• Sometimes you will want to take
a ZAP finding and modify it.
• For example you may want to
modify an XSS payload to
develop an exploit or fix a
JavaScript error.
• You can right click on any entry
under Alert or History and
choose “Resend”
12
Setting Breakpoints
• During manual testing some requests will require repeating an action in a
browser.
– A request that is part of a sequence that cannot be broken.
– A response to a an application that is using ZAP as a proxy
• For those cases you can setup breakpoints by pressing the green record button.
• Turn on the breakpoints and browse the site to observe what happens.
13
Request Replacements
• You may want to automate replacing strings
so you don’t have to keep using
breakpoints.
• The example setting replaces the word
“billybob” with a XSS payload: <img src=bla
onerror=alert(1)>
• Apply this setting and then search for
billybob on the Altoro site. What happens?
• Request replacements work great for
updating session transients like ANTI-CSRF
Headers
14
Response Replacements
• Same concept applies to response body
• A great tool to detect Stored DOM Based XSS in
Rich Internet Applications
• Sometimes it won’t be easy to make a certain
string appear in a response, either because the
scenario is complex or unknown to the tester
• DOM Based XSS occurs when strings coming
from a JSON response are inserted into unsafe
HTML attributes such as innerHTML
• In order to avoid false positives you should
make sure that you only replace the string in
JSON contexts.
15
ATTACK Mode
• ATTACK Mode will execute testing
while you’re browsing the site.
• The site must be added to a context
such as the Default Context or a
different in scope context
• There are limitations. If too many
requests are explored it will have
problems catching up
• Works great for small sequences of
requests.
16
Fuzzing
• Fuzzing involves sending
many, sometimes random,
parameter values and
observing if the application
behavior changes.
• Applications of fuzzing
include:
– Password guessing
– Checking boundaries
– Buffer overflow testing
– Identifier guessing
– Forceful browsing
17
Brute Forcing Passwords with ZAP
• The Fuzz feature allows you to try
brute force attacks using known
dictionaries of passwords.
18
Custom Attacks with Fuzzing
• Other fuzz lists can be added simply by
pointing to a file containing the n
separated values.
• The Fuzz DB github project contains
numerous fuzz lists for various attack
types including XSS and SQL Injection
• Message processors allow you to tag
responses that contain a certain regex.
– You could create a regex that detects the
string root:* and call it /etc/passwd
Meetup
• Downtown Ottawa (Shopify, Elgin Street)
– Monthly
– 3rd Thursday (or Wednesday)
• Kanata
– Every couple of Months
– Lunchtime
– ThinkWrap (or Trend), March Road
https://www.meetup.com/OWASP-Ottawa/
Socialize
• Twitter @OWASP_Ottawa
• Slack (self-invite)
– https://owaspottawa.herokuapp.com/
• YouTube
– https://www.youtube.com/channel/UCxSU-
KvNmYusZEq6v4YK5Lw or
– https://bit.ly/2P8aakr
Q&A
THANK YOU!

More Related Content

What's hot

OWASP Top 10 2021 Presentation (Jul 2022)
OWASP Top 10 2021 Presentation (Jul 2022)OWASP Top 10 2021 Presentation (Jul 2022)
OWASP Top 10 2021 Presentation (Jul 2022)
TzahiArabov
 
OWASP API Security Top 10 Examples
OWASP API Security Top 10 ExamplesOWASP API Security Top 10 Examples
OWASP API Security Top 10 Examples
42Crunch
 
Api security-testing
Api security-testingApi security-testing
Api security-testing
n|u - The Open Security Community
 
Top 10 Web Security Vulnerabilities (OWASP Top 10)
Top 10 Web Security Vulnerabilities (OWASP Top 10)Top 10 Web Security Vulnerabilities (OWASP Top 10)
Top 10 Web Security Vulnerabilities (OWASP Top 10)
Brian Huff
 
Penetration testing web application web application (in) security
Penetration testing web application web application (in) securityPenetration testing web application web application (in) security
Penetration testing web application web application (in) security
Nahidul Kibria
 
OWASP Top 10 2021 What's New
OWASP Top 10 2021 What's NewOWASP Top 10 2021 What's New
OWASP Top 10 2021 What's New
Michael Furman
 
Owasp top 10
Owasp top 10Owasp top 10
Owasp top 10
YasserElsnbary
 
Recon and Bug Bounties - What a great love story!
Recon and Bug Bounties - What a great love story!Recon and Bug Bounties - What a great love story!
Recon and Bug Bounties - What a great love story!
Abhijeth D
 
Security Testing using ZAP in SFDC
Security Testing using ZAP in SFDCSecurity Testing using ZAP in SFDC
Security Testing using ZAP in SFDC
Thinqloud
 
Zed Attack Proxy (ZAP)
Zed Attack Proxy (ZAP)Zed Attack Proxy (ZAP)
Zed Attack Proxy (ZAP)
JAINAM KAPADIYA
 
Owasp top 10 vulnerabilities
Owasp top 10 vulnerabilitiesOwasp top 10 vulnerabilities
Owasp top 10 vulnerabilities
OWASP Delhi
 
OWASP Top 10 Vulnerabilities - A5-Broken Access Control; A6-Security Misconfi...
OWASP Top 10 Vulnerabilities - A5-Broken Access Control; A6-Security Misconfi...OWASP Top 10 Vulnerabilities - A5-Broken Access Control; A6-Security Misconfi...
OWASP Top 10 Vulnerabilities - A5-Broken Access Control; A6-Security Misconfi...
Lenur Dzhemiliev
 
Security testing
Security testingSecurity testing
Security testing
Khizra Sammad
 
OWASP API Security Top 10 - API World
OWASP API Security Top 10 - API WorldOWASP API Security Top 10 - API World
OWASP API Security Top 10 - API World
42Crunch
 
Secure code practices
Secure code practicesSecure code practices
Secure code practices
Hina Rawal
 
OWASP ZAP Workshop for QA Testers
OWASP ZAP Workshop for QA TestersOWASP ZAP Workshop for QA Testers
OWASP ZAP Workshop for QA Testers
Javan Rasokat
 
What is Penetration Testing?
What is Penetration Testing?What is Penetration Testing?
What is Penetration Testing?
btpsec
 
Pentesting Rest API's by :- Gaurang Bhatnagar
Pentesting Rest API's by :- Gaurang BhatnagarPentesting Rest API's by :- Gaurang Bhatnagar
Pentesting Rest API's by :- Gaurang Bhatnagar
OWASP Delhi
 
Security Testing with Zap
Security Testing with ZapSecurity Testing with Zap
Security Testing with Zap
Soluto
 
Introduction to Web Application Penetration Testing
Introduction to Web Application Penetration TestingIntroduction to Web Application Penetration Testing
Introduction to Web Application Penetration Testing
Anurag Srivastava
 

What's hot (20)

OWASP Top 10 2021 Presentation (Jul 2022)
OWASP Top 10 2021 Presentation (Jul 2022)OWASP Top 10 2021 Presentation (Jul 2022)
OWASP Top 10 2021 Presentation (Jul 2022)
 
OWASP API Security Top 10 Examples
OWASP API Security Top 10 ExamplesOWASP API Security Top 10 Examples
OWASP API Security Top 10 Examples
 
Api security-testing
Api security-testingApi security-testing
Api security-testing
 
Top 10 Web Security Vulnerabilities (OWASP Top 10)
Top 10 Web Security Vulnerabilities (OWASP Top 10)Top 10 Web Security Vulnerabilities (OWASP Top 10)
Top 10 Web Security Vulnerabilities (OWASP Top 10)
 
Penetration testing web application web application (in) security
Penetration testing web application web application (in) securityPenetration testing web application web application (in) security
Penetration testing web application web application (in) security
 
OWASP Top 10 2021 What's New
OWASP Top 10 2021 What's NewOWASP Top 10 2021 What's New
OWASP Top 10 2021 What's New
 
Owasp top 10
Owasp top 10Owasp top 10
Owasp top 10
 
Recon and Bug Bounties - What a great love story!
Recon and Bug Bounties - What a great love story!Recon and Bug Bounties - What a great love story!
Recon and Bug Bounties - What a great love story!
 
Security Testing using ZAP in SFDC
Security Testing using ZAP in SFDCSecurity Testing using ZAP in SFDC
Security Testing using ZAP in SFDC
 
Zed Attack Proxy (ZAP)
Zed Attack Proxy (ZAP)Zed Attack Proxy (ZAP)
Zed Attack Proxy (ZAP)
 
Owasp top 10 vulnerabilities
Owasp top 10 vulnerabilitiesOwasp top 10 vulnerabilities
Owasp top 10 vulnerabilities
 
OWASP Top 10 Vulnerabilities - A5-Broken Access Control; A6-Security Misconfi...
OWASP Top 10 Vulnerabilities - A5-Broken Access Control; A6-Security Misconfi...OWASP Top 10 Vulnerabilities - A5-Broken Access Control; A6-Security Misconfi...
OWASP Top 10 Vulnerabilities - A5-Broken Access Control; A6-Security Misconfi...
 
Security testing
Security testingSecurity testing
Security testing
 
OWASP API Security Top 10 - API World
OWASP API Security Top 10 - API WorldOWASP API Security Top 10 - API World
OWASP API Security Top 10 - API World
 
Secure code practices
Secure code practicesSecure code practices
Secure code practices
 
OWASP ZAP Workshop for QA Testers
OWASP ZAP Workshop for QA TestersOWASP ZAP Workshop for QA Testers
OWASP ZAP Workshop for QA Testers
 
What is Penetration Testing?
What is Penetration Testing?What is Penetration Testing?
What is Penetration Testing?
 
Pentesting Rest API's by :- Gaurang Bhatnagar
Pentesting Rest API's by :- Gaurang BhatnagarPentesting Rest API's by :- Gaurang Bhatnagar
Pentesting Rest API's by :- Gaurang Bhatnagar
 
Security Testing with Zap
Security Testing with ZapSecurity Testing with Zap
Security Testing with Zap
 
Introduction to Web Application Penetration Testing
Introduction to Web Application Penetration TestingIntroduction to Web Application Penetration Testing
Introduction to Web Application Penetration Testing
 

Similar to Learn to pen-test with OWASP ZAP

DAST in CI/CD pipelines using Selenium & OWASP ZAP
DAST in CI/CD pipelines using Selenium & OWASP ZAPDAST in CI/CD pipelines using Selenium & OWASP ZAP
DAST in CI/CD pipelines using Selenium & OWASP ZAP
srini0x00
 
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
Mohammed A. Imran
 
Browser Hacking For Fun and Profit | Null Bangalore Meetup 2019 | Divyanshu S...
Browser Hacking For Fun and Profit | Null Bangalore Meetup 2019 | Divyanshu S...Browser Hacking For Fun and Profit | Null Bangalore Meetup 2019 | Divyanshu S...
Browser Hacking For Fun and Profit | Null Bangalore Meetup 2019 | Divyanshu S...
Divyanshu
 
Using Proxies To Secure Applications And More
Using Proxies To Secure Applications And MoreUsing Proxies To Secure Applications And More
Using Proxies To Secure Applications And More
Josh Sokol
 
Deep dive into ssrf
Deep dive into ssrfDeep dive into ssrf
How to secure your web applications with NGINX
How to secure your web applications with NGINXHow to secure your web applications with NGINX
How to secure your web applications with NGINX
Wallarm
 
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...
gmaran23
 
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...
gmaran23
 
Bug bounty null_owasp_2k17
Bug bounty null_owasp_2k17Bug bounty null_owasp_2k17
Bug bounty null_owasp_2k17
Sagar M Parmar
 
Securty Testing For RESTful Applications
Securty Testing For RESTful ApplicationsSecurty Testing For RESTful Applications
Securty Testing For RESTful Applications
Source Conference
 
Laravel 4 presentation
Laravel 4 presentationLaravel 4 presentation
Laravel 4 presentation
Abu Saleh Muhammad Shaon
 
Security vulnerabilities - 2018
Security vulnerabilities - 2018Security vulnerabilities - 2018
Security vulnerabilities - 2018
Marius Vorster
 
Automating Web Application Security Testing With OWASP ZAP DOT NET API - Tech...
Automating Web Application Security Testing With OWASP ZAP DOT NET API - Tech...Automating Web Application Security Testing With OWASP ZAP DOT NET API - Tech...
Automating Web Application Security Testing With OWASP ZAP DOT NET API - Tech...
gmaran23
 
QA: Базовое тестирование защищенности веб-приложений в рамках QA
QA: Базовое тестирование защищенности веб-приложений в рамках QAQA: Базовое тестирование защищенности веб-приложений в рамках QA
QA: Базовое тестирование защищенности веб-приложений в рамках QA
CodeFest
 
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
Simon Bennetts
 
Application Security Tools
Application Security ToolsApplication Security Tools
Application Security Tools
Lalit Kale
 
Flashack
FlashackFlashack
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
 
Security testautomation
Security testautomationSecurity testautomation
Security testautomation
Linkesh Kanna Velu
 
OWASP CSRF Protector
OWASP CSRF ProtectorOWASP CSRF Protector
OWASP CSRF Protector
Minhaz A V
 

Similar to Learn to pen-test with OWASP ZAP (20)

DAST in CI/CD pipelines using Selenium & OWASP ZAP
DAST in CI/CD pipelines using Selenium & OWASP ZAPDAST in CI/CD pipelines using Selenium & OWASP ZAP
DAST in CI/CD pipelines using Selenium & OWASP ZAP
 
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
 
Browser Hacking For Fun and Profit | Null Bangalore Meetup 2019 | Divyanshu S...
Browser Hacking For Fun and Profit | Null Bangalore Meetup 2019 | Divyanshu S...Browser Hacking For Fun and Profit | Null Bangalore Meetup 2019 | Divyanshu S...
Browser Hacking For Fun and Profit | Null Bangalore Meetup 2019 | Divyanshu S...
 
Using Proxies To Secure Applications And More
Using Proxies To Secure Applications And MoreUsing Proxies To Secure Applications And More
Using Proxies To Secure Applications And More
 
Deep dive into ssrf
Deep dive into ssrfDeep dive into ssrf
Deep dive into ssrf
 
How to secure your web applications with NGINX
How to secure your web applications with NGINXHow to secure your web applications with NGINX
How to secure your web applications with NGINX
 
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...
 
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...
 
Bug bounty null_owasp_2k17
Bug bounty null_owasp_2k17Bug bounty null_owasp_2k17
Bug bounty null_owasp_2k17
 
Securty Testing For RESTful Applications
Securty Testing For RESTful ApplicationsSecurty Testing For RESTful Applications
Securty Testing For RESTful Applications
 
Laravel 4 presentation
Laravel 4 presentationLaravel 4 presentation
Laravel 4 presentation
 
Security vulnerabilities - 2018
Security vulnerabilities - 2018Security vulnerabilities - 2018
Security vulnerabilities - 2018
 
Automating Web Application Security Testing With OWASP ZAP DOT NET API - Tech...
Automating Web Application Security Testing With OWASP ZAP DOT NET API - Tech...Automating Web Application Security Testing With OWASP ZAP DOT NET API - Tech...
Automating Web Application Security Testing With OWASP ZAP DOT NET API - Tech...
 
QA: Базовое тестирование защищенности веб-приложений в рамках QA
QA: Базовое тестирование защищенности веб-приложений в рамках QAQA: Базовое тестирование защищенности веб-приложений в рамках QA
QA: Базовое тестирование защищенности веб-приложений в рамках QA
 
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
 
Application Security Tools
Application Security ToolsApplication Security Tools
Application Security Tools
 
Flashack
FlashackFlashack
Flashack
 
Do you lose sleep at night?
Do you lose sleep at night?Do you lose sleep at night?
Do you lose sleep at night?
 
Security testautomation
Security testautomationSecurity testautomation
Security testautomation
 
OWASP CSRF Protector
OWASP CSRF ProtectorOWASP CSRF Protector
OWASP CSRF Protector
 

Recently uploaded

Transform Your Communication with Cloud-Based IVR Solutions
Transform Your Communication with Cloud-Based IVR SolutionsTransform Your Communication with Cloud-Based IVR Solutions
Transform Your Communication with Cloud-Based IVR Solutions
TheSMSPoint
 
GraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph TechnologyGraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph Technology
Neo4j
 
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket ManagementUtilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate
 
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Mind IT Systems
 
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of CodeA Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
Aftab Hussain
 
Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"
Donna Lenk
 
openEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain SecurityopenEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain Security
Shane Coughlan
 
Enterprise Resource Planning System in Telangana
Enterprise Resource Planning System in TelanganaEnterprise Resource Planning System in Telangana
Enterprise Resource Planning System in Telangana
NYGGS Automation Suite
 
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptxTop Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
rickgrimesss22
 
Using Xen Hypervisor for Functional Safety
Using Xen Hypervisor for Functional SafetyUsing Xen Hypervisor for Functional Safety
Using Xen Hypervisor for Functional Safety
Ayan Halder
 
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Crescat
 
AI Genie Review: World’s First Open AI WordPress Website Creator
AI Genie Review: World’s First Open AI WordPress Website CreatorAI Genie Review: World’s First Open AI WordPress Website Creator
AI Genie Review: World’s First Open AI WordPress Website Creator
Google
 
Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Need for Speed: Removing speed bumps from your Symfony projects ⚡️Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Łukasz Chruściel
 
Mobile App Development Company In Noida | Drona Infotech
Mobile App Development Company In Noida | Drona InfotechMobile App Development Company In Noida | Drona Infotech
Mobile App Development Company In Noida | Drona Infotech
Drona Infotech
 
Fundamentals of Programming and Language Processors
Fundamentals of Programming and Language ProcessorsFundamentals of Programming and Language Processors
Fundamentals of Programming and Language Processors
Rakesh Kumar R
 
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI AppAI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
Google
 
Atelier - Innover avec l’IA Générative et les graphes de connaissances
Atelier - Innover avec l’IA Générative et les graphes de connaissancesAtelier - Innover avec l’IA Générative et les graphes de connaissances
Atelier - Innover avec l’IA Générative et les graphes de connaissances
Neo4j
 
OpenMetadata Community Meeting - 5th June 2024
OpenMetadata Community Meeting - 5th June 2024OpenMetadata Community Meeting - 5th June 2024
OpenMetadata Community Meeting - 5th June 2024
OpenMetadata
 
Graspan: A Big Data System for Big Code Analysis
Graspan: A Big Data System for Big Code AnalysisGraspan: A Big Data System for Big Code Analysis
Graspan: A Big Data System for Big Code Analysis
Aftab Hussain
 
Artificia Intellicence and XPath Extension Functions
Artificia Intellicence and XPath Extension FunctionsArtificia Intellicence and XPath Extension Functions
Artificia Intellicence and XPath Extension Functions
Octavian Nadolu
 

Recently uploaded (20)

Transform Your Communication with Cloud-Based IVR Solutions
Transform Your Communication with Cloud-Based IVR SolutionsTransform Your Communication with Cloud-Based IVR Solutions
Transform Your Communication with Cloud-Based IVR Solutions
 
GraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph TechnologyGraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph Technology
 
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket ManagementUtilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
 
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
 
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of CodeA Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
 
Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"
 
openEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain SecurityopenEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain Security
 
Enterprise Resource Planning System in Telangana
Enterprise Resource Planning System in TelanganaEnterprise Resource Planning System in Telangana
Enterprise Resource Planning System in Telangana
 
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptxTop Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
 
Using Xen Hypervisor for Functional Safety
Using Xen Hypervisor for Functional SafetyUsing Xen Hypervisor for Functional Safety
Using Xen Hypervisor for Functional Safety
 
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
 
AI Genie Review: World’s First Open AI WordPress Website Creator
AI Genie Review: World’s First Open AI WordPress Website CreatorAI Genie Review: World’s First Open AI WordPress Website Creator
AI Genie Review: World’s First Open AI WordPress Website Creator
 
Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Need for Speed: Removing speed bumps from your Symfony projects ⚡️Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Need for Speed: Removing speed bumps from your Symfony projects ⚡️
 
Mobile App Development Company In Noida | Drona Infotech
Mobile App Development Company In Noida | Drona InfotechMobile App Development Company In Noida | Drona Infotech
Mobile App Development Company In Noida | Drona Infotech
 
Fundamentals of Programming and Language Processors
Fundamentals of Programming and Language ProcessorsFundamentals of Programming and Language Processors
Fundamentals of Programming and Language Processors
 
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI AppAI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
 
Atelier - Innover avec l’IA Générative et les graphes de connaissances
Atelier - Innover avec l’IA Générative et les graphes de connaissancesAtelier - Innover avec l’IA Générative et les graphes de connaissances
Atelier - Innover avec l’IA Générative et les graphes de connaissances
 
OpenMetadata Community Meeting - 5th June 2024
OpenMetadata Community Meeting - 5th June 2024OpenMetadata Community Meeting - 5th June 2024
OpenMetadata Community Meeting - 5th June 2024
 
Graspan: A Big Data System for Big Code Analysis
Graspan: A Big Data System for Big Code AnalysisGraspan: A Big Data System for Big Code Analysis
Graspan: A Big Data System for Big Code Analysis
 
Artificia Intellicence and XPath Extension Functions
Artificia Intellicence and XPath Extension FunctionsArtificia Intellicence and XPath Extension Functions
Artificia Intellicence and XPath Extension Functions
 

Learn to pen-test with OWASP ZAP

  • 1. Learn to Pen-test with ZAP A quick introduction to Web Application Pen- testing using OWASP’s ZED Attack Proxy
  • 3. 3 About ZAP • ZAP is the official Web Application Security testing tool endorsed by OWASP (Flagship project) • ZAP is free to use and modify, under an Apache 2 license (so customizations are possible) • Link to download + docs: https://www.owasp.org/index.php/OWASP_Zed_At tack_Proxy_Project
  • 4. 4 What does it do? • ZAP can spider through a website and then list HTTP requests it discovers. – It may miss requests that require user interaction or logged-in state. • ZAP can also intercept HTTP requests while a user interacts with a site. This is done by configuring the browser to use ZAP as a proxy. • ZAP can identify vulnerabilities on the HTTP requests that it spiders or intercepts. – Active mode: ZAP will act like a hacker and replace parameter values with attacks like SQLi and XSS – Passive mode: ZAP will observe issues in the responses from the site: certain headers are missing or are misconfigured, information disclosure, cross domain issues.
  • 5. 5 Quick Attack • Simply put in the starting URL of a website you have permission to test and hit Attack. • This is point and shoot mode, is unauthenticated, will miss pages
  • 6. 6 Reviewing the Issues • If security issues are detected they will be listed under the Alerts tab. • You can see the vulnerable URL and the HTTP request that was sent and the validation that was used.
  • 7. 7 Intercepting Requests • You can configure the default ZAP proxy port to be something other than 8080 (e.g. 8888 so it doesn’t conflict with tomcat) • Configure a FoxyProxy definition for ZAP so you can easily switch ZAP on and off
  • 8. 8 Intercepting Requests Cont. • Once you have setup Firefox you can now see HTTP requests flowing through ZAP
  • 9. 9 SSL Configuration • Browsing SSL sites through an intercepting proxy can be troublesome especially when the site includes resources stored on other domains. • ZAP can dynamically generate SSL Certs based on the host of the request. The certs are signed with ZAPs own CA • You can import the ZAP CA as a trusted CA in Firefox and all ZAP traffic will be trusted.
  • 10. 10 Session Management • ZAP keeps track of session variables and can automatically detect or allow you to configure them • To enable session tracking go to Edit > Enable Session Tracking (Cookie) • This will cause ZAP to update Cookies used in attack requests when you record a new login.
  • 11. 11 Manual Tests • Sometimes you will want to take a ZAP finding and modify it. • For example you may want to modify an XSS payload to develop an exploit or fix a JavaScript error. • You can right click on any entry under Alert or History and choose “Resend”
  • 12. 12 Setting Breakpoints • During manual testing some requests will require repeating an action in a browser. – A request that is part of a sequence that cannot be broken. – A response to a an application that is using ZAP as a proxy • For those cases you can setup breakpoints by pressing the green record button. • Turn on the breakpoints and browse the site to observe what happens.
  • 13. 13 Request Replacements • You may want to automate replacing strings so you don’t have to keep using breakpoints. • The example setting replaces the word “billybob” with a XSS payload: <img src=bla onerror=alert(1)> • Apply this setting and then search for billybob on the Altoro site. What happens? • Request replacements work great for updating session transients like ANTI-CSRF Headers
  • 14. 14 Response Replacements • Same concept applies to response body • A great tool to detect Stored DOM Based XSS in Rich Internet Applications • Sometimes it won’t be easy to make a certain string appear in a response, either because the scenario is complex or unknown to the tester • DOM Based XSS occurs when strings coming from a JSON response are inserted into unsafe HTML attributes such as innerHTML • In order to avoid false positives you should make sure that you only replace the string in JSON contexts.
  • 15. 15 ATTACK Mode • ATTACK Mode will execute testing while you’re browsing the site. • The site must be added to a context such as the Default Context or a different in scope context • There are limitations. If too many requests are explored it will have problems catching up • Works great for small sequences of requests.
  • 16. 16 Fuzzing • Fuzzing involves sending many, sometimes random, parameter values and observing if the application behavior changes. • Applications of fuzzing include: – Password guessing – Checking boundaries – Buffer overflow testing – Identifier guessing – Forceful browsing
  • 17. 17 Brute Forcing Passwords with ZAP • The Fuzz feature allows you to try brute force attacks using known dictionaries of passwords.
  • 18. 18 Custom Attacks with Fuzzing • Other fuzz lists can be added simply by pointing to a file containing the n separated values. • The Fuzz DB github project contains numerous fuzz lists for various attack types including XSS and SQL Injection • Message processors allow you to tag responses that contain a certain regex. – You could create a regex that detects the string root:* and call it /etc/passwd
  • 19. Meetup • Downtown Ottawa (Shopify, Elgin Street) – Monthly – 3rd Thursday (or Wednesday) • Kanata – Every couple of Months – Lunchtime – ThinkWrap (or Trend), March Road https://www.meetup.com/OWASP-Ottawa/
  • 20. Socialize • Twitter @OWASP_Ottawa • Slack (self-invite) – https://owaspottawa.herokuapp.com/ • YouTube – https://www.youtube.com/channel/UCxSU- KvNmYusZEq6v4YK5Lw or – https://bit.ly/2P8aakr
  • 21. Q&A

Editor's Notes

  1. https://bit.ly/2P8aakr