Skip to content

Conversation

FiveOFive
Copy link
Contributor

@FiveOFive FiveOFive commented Dec 3, 2024

Overview

Fix the sql injection false positive case described in zaproxy/zaproxy#8651. The short summary is that the expression based test sends 3 requests: normal, modified, and confirm. A sql injection is suspected if normal and modified return the same response, but confirm returns a different response. The response comparison logic looks only at the response body. In the case of 3xx redirects the bodies can be exactly the same when the location headers are different. This change adds a heuristic for checking the location headers and treating different 3xx redirects as different responses, even when the bodies are the same.

This change is built on top of #5974. Once that one is done I'll rebase, squash, and sign-off the resulting commit.

Related Issues

Fix zaproxy/zaproxy#8651.

Checklist

  • Update help
  • Update changelog
  • Run ./gradlew spotlessApply for code formatting
  • Write tests
  • Check code coverage
  • Sign-off commits
  • Squash commits
  • Use a descriptive title

For more details, please refer to the developer rules and guidelines.

@psiinon

This comment has been minimized.

@psiinon psiinon force-pushed the sqli-redirect-locations-false-positive branch from 364067d to b4f18a0 Compare April 9, 2025 16:33
@psiinon psiinon force-pushed the sqli-redirect-locations-false-positive branch from b4f18a0 to 75319bb Compare April 9, 2025 16:56
@psiinon psiinon force-pushed the sqli-redirect-locations-false-positive branch from 75319bb to 4f7162d Compare April 9, 2025 17:05
@psiinon psiinon force-pushed the sqli-redirect-locations-false-positive branch from 4f7162d to d58bc10 Compare April 10, 2025 08:38
@thc202
Copy link
Member

thc202 commented Apr 10, 2025

Thank you both!

@thc202 thc202 enabled auto-merge April 10, 2025 08:40
@thc202 thc202 merged commit 04dbe34 into zaproxy:main Apr 10, 2025
8 of 9 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Apr 10, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

SQL Injection (Check #4) False Positives
4 participants