Zed Attack Proxy Cookbook

Book description

Dive into security testing and web app scanning with ZAP, a powerful OWASP security tool

Purchase of the print or Kindle book includes a free PDF eBook

Key Features

  • Master ZAP to protect your systems from different cyber attacks
  • Learn cybersecurity best practices using this step-by-step guide packed with practical examples
  • Implement advanced testing techniques, such as XXE attacks and Java deserialization, on web applications

Book Description

Maintaining your cybersecurity posture in the ever-changing, fast-paced security landscape requires constant attention and advancements. This book will help you safeguard your organization using the free and open source OWASP Zed Attack Proxy (ZAP) tool, which allows you to test for vulnerabilities and exploits with the same functionality as a licensed tool.

Zed Attack Proxy Cookbook contains a vast array of practical recipes to help you set up, configure, and use ZAP to protect your vital systems from various adversaries. If you're interested in cybersecurity or working as a cybersecurity professional, this book will help you master ZAP.

You'll start with an overview of ZAP and understand how to set up a basic lab environment for hands-on activities over the course of the book. As you progress, you'll go through a myriad of step-by-step recipes detailing various types of exploits and vulnerabilities in web applications, along with advanced techniques such as Java deserialization.

By the end of this ZAP book, you'll be able to install and deploy ZAP, conduct basic to advanced web application penetration attacks, use the tool for API testing, deploy an integrated BOAST server, and build ZAP into a continuous integration and continuous delivery (CI/CD) pipeline.

What you will learn

  • Install ZAP on different operating systems or environments
  • Explore how to crawl, passively scan, and actively scan web apps
  • Discover authentication and authorization exploits
  • Conduct client-side testing by examining business logic flaws
  • Use the BOAST server to conduct out-of-band attacks
  • Understand the integration of ZAP into the final stages of a CI/CD pipeline

Who this book is for

This book is for cybersecurity professionals, ethical hackers, application security engineers, DevSecOps engineers, students interested in web security, cybersecurity enthusiasts, and anyone from the open source cybersecurity community looking to gain expertise in ZAP. Familiarity with basic cybersecurity concepts will be helpful to get the most out of this book.

Table of contents

  1. Zed Attack Proxy Cookbook
  2. Contributors
  3. About the authors
  4. About the reviewers
  5. Disclaimer
  6. Preface
    1. Who this book is for
    2. What this book covers
    3. To get the most out of this book
    4. Download the example code files
    5. Download the color images
    6. Conventions used
    7. Sections
      1. Getting ready
      2. How to do it…
      3. How it works…
      4. There’s more…
      5. See also
    8. Get in touch
    9. Share Your Thoughts
    10. Download a free PDF copy of this book
  7. Chapter 1: Getting Started with OWASP Zed Attack Proxy
    1. Downloading ZAP
      1. Getting ready
      2. How to do it...
      3. Installing Docker
      4. See also
    2. Setting up the testing environment
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There’s more...
    3. Setting up a browser proxy and certificate
      1. Getting ready
      2. How to do it...
      3. How it works...
    4. Testing the ZAP setup
      1. Getting ready
      2. How to do it...
      3. How it works...
  8. Chapter 2: Navigating the UI
    1. Technical requirements
    2. Persisting a session
      1. Getting ready
      2. How to do it…
      3. How it works…
    3. Menu bar
      1. Getting ready
      2. How to do it…
      3. How it works…
      4. There’s more…
    4. Toolbar
      1. Getting ready
      2. How to do it…
      3. How it works…
      4. See also
    5. The tree window
      1. Getting ready
      2. How to do it…
      3. How it works…
    6. Workspace window
      1. Getting ready
      2. How to do it…
      3. How it works…
    7. Information window
      1. Getting ready
      2. How to do it…
      3. How it works…
      4. There’s more…
    8. Footer
      1. Getting ready
      2. How to do it…
      3. How it works…
    9. Encode/Decode/Hash dialog
      1. Getting ready
      2. How to do it…
      3. How it works…
      4. See also
    10. Fuzzing with Fuzzer
      1. Getting ready
      2. How to do it…
      3. How it works…
      4. There’s more…
      5. See also
  9. Chapter 3: Configuring, Crawling, Scanning, and Reporting
    1. Technical requirements
    2. Setting scope in ZAP
      1. Getting ready
      2. How to do it…
      3. How it works…
    3. Crawling with the Spider
      1. Getting ready
      2. How to do it…
      3. How it works…
    4. Crawling with the AJAX Spider
      1. Getting ready
      2. How to do it…
      3. How it works…
      4. There’s more…
      5. See also
    5. Scanning a web app passively
      1. Getting ready
      2. How to do it…
      3. How it works…
      4. There’s more…
      5. See also
    6. Scanning a web app actively
      1. Getting ready
      2. How to do it…
      3. How it works…
      4. There’s more…
      5. See also
    7. Generating a report
      1. Getting ready
      2. How to do it…
      3. How it works…
      4. See also
  10. Chapter 4: Authentication and Authorization Testing
    1. Technical requirements
    2. Testing for Bypassing Authentication
      1. Getting ready
      2. How to do it…
      3. How it works…
    3. Testing for Credentials Transported over an Encrypted Channel
      1. Getting ready
      2. How to do it…
      3. How it works…
    4. Testing for Default Credentials
      1. Getting ready
      2. How to do it…
      3. How it works…
      4. There’s more…
      5. See also
    5. Testing Directory Traversal File Include
      1. Getting ready
      2. How to do it…
      3. How it works…
      4. See also
    6. Testing for Privilege Escalation and Bypassing Authorization Schema
      1. Getting ready
      2. How to do it…
      3. How it works…
    7. Testing for Insecure Direct Object References
      1. Getting ready
      2. How to do it…
      3. How it works…
      4. There’s more…
  11. Chapter 5: Testing of Session Management
    1. Technical requirements
      1. Mutillidae setup
    2. Testing for cookie attributes
      1. Getting ready
      2. How to do it...
      3. How it works...
    3. Testing for cross-site request forgery (CSRF)
      1. Getting ready
      2. How to do it...
      3. How it works...
    4. Testing for logout functionality
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There’s more...
      5. See also
    5. Testing for session hijacking
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There’s more...
      5. See also
  12. Chapter 6: Validating (Data) Inputs – Part 1
    1. Technical requirements
    2. Testing for reflected XSS
      1. Getting ready
      2. How to do it…
      3. How it works…
      4. There’s more…
      5. See also
    3. Testing for HTTP verb tampering
      1. Getting ready
      2. How to do it…
      3. How it works…
      4. There’s more…
      5. See also
    4. Testing for HTTP Parameter Pollution (HPP)
      1. Getting ready
      2. How to do it…
      3. How it works…
      4. See also
    5. Testing for SQL Injection
      1. Getting ready
      2. How to do it…
      3. How it works…
      4. There’s more…
      5. See also
  13. Chapter 7: Validating (Data) Inputs – Part 2
    1. Technical requirements
    2. Testing for code injection
      1. Getting ready
      2. How to do it...
      3. How it works...
    3. Testing for command injection
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There’s more...
      5. See also
    4. Testing for server-side template injection
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There’s more...
      5. See also
    5. Testing for server-side request forgery
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There’s more...
      5. See also
  14. Chapter 8: Business Logic Testing
    1. Technical requirements
    2. Test ability to forge requests
      1. Getting ready
      2. How to do it…
      3. How it works…
      4. See also
    3. Test for process timing
      1. Getting ready
      2. How to do it…
      3. How it works…
      4. See also
    4. Testing for the circumvention of workflows
      1. Getting ready
      2. How to do it…
      3. How it works...
      4. See also
    5. Testing upload of unexpected file types with a malicious payload
      1. Getting ready
      2. How to do it…
      3. How it works...
      4. See also
  15. Chapter 9: Client-Side Testing
    1. Technical requirements
    2. Testing for DOM-based cross-site scripting
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
    3. Testing for JavaScript execution
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
    4. Testing for HTML injection
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
    5. Testing for client-side URL redirect
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
    6. Testing cross-origin resource sharing
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
    7. Testing WebSockets
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There's more...
      5. See also
  16. Chapter 10: Advanced Attack Techniques
    1. Technical requirements
    2. Performing XXE attacks
      1. Getting ready
      2. How to do it...
      3. How it works...
    3. Working with JSON Web Tokens
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There’s more...
    4. Performing Java deserialization attacks
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. There’s more...
      5. See also
    5. Password brute-force via password change
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. See also
    6. Web cache poisoning
      1. Getting ready
      2. How to do it...
      3. How it works...
      4. See also
  17. Chapter 11: Advanced Adventures with ZAP
    1. Technical requirements
    2. How to use the ZAP GUI local API to scan a target
      1. Getting ready
      2. How to do it…
      3. How it works…
    3. How to use the ZAP API via Docker
      1. Getting ready
      2. How to do it…
      3. How it works…
      4. There’s more…
      5. See also
    4. Utilizing ZAP DAST testing with Jenkins
      1. Getting ready
      2. How to do it…
      3. How it works…
      4. There’s more…
      5. See also
    5. Installing, configuring, and running the ZAP GUI OAST server
      1. Getting ready
      2. How to do it…
      3. How it works…
      4. There’s more…
      5. See also
  18. Index
    1. Why subscribe?
  19. Other Books You May Enjoy
    1. Packt is searching for authors like you
    2. Share Your Thoughts
    3. Download a free PDF copy of this book

Product information

  • Title: Zed Attack Proxy Cookbook
  • Author(s): Ryan Soper, Nestor N Torres, Ahmed Almoailu
  • Release date: March 2023
  • Publisher(s): Packt Publishing
  • ISBN: 9781801817332