feat(modules): add CVE-2024-0012 Palo Alto PAN-OS detection module#1444
feat(modules): add CVE-2024-0012 Palo Alto PAN-OS detection module#1444hireblackout wants to merge 2 commits intoOWASP:masterfrom
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (5)
✅ Files skipped from review due to trivial changes (2)
🚧 Files skipped from review as they are similar to previous changes (1)
Summary by CodeRabbit
WalkthroughAdds a new vulnerability probe for Palo Alto PAN‑OS CVE‑2024‑0012 (HTTP GET to Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Suggested labels
Suggested reviewers
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🧹 Nitpick comments (1)
tests/modules/test_paloalto_panos_cve_2024_0012.py (1)
10-16: Consider using standard import syntax.The
importlib.import_moduleapproach works but is unconventional. A standard import would be clearer:from nettacker.core.lib import httpHowever, this is a minor style preference and the current approach functions correctly.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@tests/modules/test_paloalto_panos_cve_2024_0012.py` around lines 10 - 16, Replace the dynamic import using importlib.import_module with a standard module import to improve clarity: change the import statement that creates the variable http via importlib.import_module("nettacker.core.lib.http") to a normal import such as "from nettacker.core.lib import http" (or "import nettacker.core.lib.http as http") so references to the http module in this test file use the conventional import syntax (look for the import line that assigns to the name http).
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@key_gen.config`:
- Line 5: The key_gen.config currently contains a personal relay address under
the Name-Email field; replace the PII by updating the Name-Email entry to a
project/service identity or a CI-injected placeholder (e.g.,
noreply@yourproject.example or ${CI_COMMIT_EMAIL}) so no personal email is
committed, and ensure any documentation or CI that generates this file is
updated to inject the appropriate non-PII value; target the Name-Email setting
in key_gen.config to make this change.
- Around line 6-7: Change the key template to avoid creating an unprotected,
non-expiring private key: replace "Expire-Date: 0" with a bounded expiry (e.g.,
"Expire-Date: 1y" or "Expire-Date: 365d") and remove the "%no-protection"
directive so the generated key is passphrase-protected (or replace it with a
safe protection directive if your tooling requires one). Update the key template
lines referencing "Expire-Date: 0" and "%no-protection" accordingly so the
private key is time-limited and encrypted with a passphrase.
---
Nitpick comments:
In `@tests/modules/test_paloalto_panos_cve_2024_0012.py`:
- Around line 10-16: Replace the dynamic import using importlib.import_module
with a standard module import to improve clarity: change the import statement
that creates the variable http via
importlib.import_module("nettacker.core.lib.http") to a normal import such as
"from nettacker.core.lib import http" (or "import nettacker.core.lib.http as
http") so references to the http module in this test file use the conventional
import syntax (look for the import line that assigns to the name http).
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: d7ad0811-137b-4c0d-99f8-14a8d64b8cf6
📒 Files selected for processing (5)
docs/Modules.mdkey_gen.confignettacker/modules/vuln/paloalto_panos_cve_2024_0012.yamltests/modules/__init__.pytests/modules/test_paloalto_panos_cve_2024_0012.py
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 21b20c2d3b
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
21b20c2 to
f3a9910
Compare
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@pr_body.md`:
- Line 10: Update the phrase "PAN-OS specific" to the compound adjective form
"PAN-OS-specific" in the sentence that currently reads "PAN-OS specific ZTP page
title" so it is hyphenated correctly when used before the noun; locate that
phrase in pr_body.md and replace it with "PAN-OS-specific".
- Line 30: Update the unchecked issue-linking checkbox in pr_body.md by changing
the line "- [ ] I've linked this PR with an open issue" to mark it as completed
("- [x] I've linked this PR with an open issue"); ensure the text still
references issue `#12345` as stated in the PR objectives so the document
accurately reflects the linked issue status.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 8887bd63-4320-44a2-926d-51cb9522eb66
📒 Files selected for processing (6)
docs/Modules.mdkey_gen.confignettacker/modules/vuln/paloalto_panos_cve_2024_0012.yamlpr_body.mdtests/modules/__init__.pytests/modules/test_paloalto_panos_cve_2024_0012.py
✅ Files skipped from review due to trivial changes (3)
- docs/Modules.md
- tests/modules/test_paloalto_panos_cve_2024_0012.py
- nettacker/modules/vuln/paloalto_panos_cve_2024_0012.yaml
🚧 Files skipped from review as they are similar to previous changes (1)
- key_gen.config
|
Fix: Addressed review feedback by correcting the CVSS score for CVE-2024-0012 from 9.8 to the official 9.3 base score. Commits have been updated. |
f3a9910 to
3107868
Compare
There was a problem hiding this comment.
♻️ Duplicate comments (2)
pr_body.md (2)
30-30:⚠️ Potential issue | 🟡 MinorChecklist status conflicts with PR objective.
This box is still unchecked, but the PR states it fixes/links issue
#12345; mark it as completed for consistency.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@pr_body.md` at line 30, Update the PR checklist in pr_body.md to reflect the stated link to issue `#12345` by changing the unchecked item "[ ] I've linked this PR with an open issue" to checked "[x] I've linked this PR with an open issue" so the checklist and the PR description are consistent; ensure the exact checklist line text is modified to avoid altering other items.
10-10:⚠️ Potential issue | 🟡 MinorHyphenate the compound adjective.
Use
PAN-OS-specificinstead ofPAN-OS specificin this sentence.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@pr_body.md` at line 10, Replace the compound adjective "PAN-OS specific" with the hyphenated form "PAN-OS-specific" in the sentence containing "zero false positives" (the phrase to update is "PAN-OS specific ZTP page title") so the text reads "PAN-OS-specific ZTP page title".
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Duplicate comments:
In `@pr_body.md`:
- Line 30: Update the PR checklist in pr_body.md to reflect the stated link to
issue `#12345` by changing the unchecked item "[ ] I've linked this PR with an
open issue" to checked "[x] I've linked this PR with an open issue" so the
checklist and the PR description are consistent; ensure the exact checklist line
text is modified to avoid altering other items.
- Line 10: Replace the compound adjective "PAN-OS specific" with the hyphenated
form "PAN-OS-specific" in the sentence containing "zero false positives" (the
phrase to update is "PAN-OS specific ZTP page title") so the text reads
"PAN-OS-specific ZTP page title".
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 493770d8-0be0-4ecb-a359-5ab882040684
📒 Files selected for processing (6)
docs/Modules.mdkey_gen.confignettacker/modules/vuln/paloalto_panos_cve_2024_0012.yamlpr_body.mdtests/modules/__init__.pytests/modules/test_paloalto_panos_cve_2024_0012.py
✅ Files skipped from review due to trivial changes (3)
- docs/Modules.md
- key_gen.config
- nettacker/modules/vuln/paloalto_panos_cve_2024_0012.yaml
🚧 Files skipped from review as they are similar to previous changes (1)
- tests/modules/test_paloalto_panos_cve_2024_0012.py
3107868 to
eb7a369
Compare
|
Fix: Addressed all CodeRabbit review feedback. Replaced dynamic imports with standard syntax and corrected PR body typography. |
There was a problem hiding this comment.
Actionable comments posted: 2
♻️ Duplicate comments (1)
pr_body.md (1)
30-30:⚠️ Potential issue | 🟡 MinorUpdate the issue-linking checkbox to match the PR objective.
Line 30 is still unchecked, but this PR states it fixes
#12345.📝 Proposed fix
-- [ ] I've linked this PR with an open issue +- [x] I've linked this PR with an open issue🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@pr_body.md` at line 30, Update the issue-linking checkbox in pr_body.md by changing the line "- [ ] I've linked this PR with an open issue" to a checked state and include the referenced issue number; for example replace it with "- [x] I've linked this PR with an open issue (fixes `#12345`)" so the checkbox matches the PR objective that claims to fix `#12345`.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@nettacker/modules/vuln/paloalto_panos_cve_2024_0012.yaml`:
- Around line 95-100: The content fingerprint currently uses a broad regex "Zero
Touch Provisioning" which can produce false positives; update the content.regex
in paloalto_panos_cve_2024_0012.yaml to match the full HTML title tag (e.g., a
pattern that anchors the title element like "<title>Zero Touch Provisioning -
PAN[- ]OS" or similar exact title text) so the detection in the content block
targets the full <title>...</title> string rather than any occurrence of the
phrase.
In `@pr_body.md`:
- Around line 25-27: The unsigned commit
eb7a36919b3d3b60a81e212b27ec0c176cb5825c needs to be cryptographically signed;
sign new commits with git commit -S or for existing commits interactively
re-sign by rebasing and amending (e.g., run an interactive rebase and amend each
commit to add a GPG/SSH signature) then force-push the branch so the PR contains
only signed commits and passes the pre-merge policy checks.
---
Duplicate comments:
In `@pr_body.md`:
- Line 30: Update the issue-linking checkbox in pr_body.md by changing the line
"- [ ] I've linked this PR with an open issue" to a checked state and include
the referenced issue number; for example replace it with "- [x] I've linked this
PR with an open issue (fixes `#12345`)" so the checkbox matches the PR objective
that claims to fix `#12345`.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 5847b544-bfd0-48e4-97d5-c3fe28cd52b4
📒 Files selected for processing (6)
docs/Modules.mdkey_gen.confignettacker/modules/vuln/paloalto_panos_cve_2024_0012.yamlpr_body.mdtests/modules/__init__.pytests/modules/test_paloalto_panos_cve_2024_0012.py
✅ Files skipped from review due to trivial changes (3)
- key_gen.config
- docs/Modules.md
- tests/modules/test_paloalto_panos_cve_2024_0012.py
eb7a369 to
13ae27d
Compare
There was a problem hiding this comment.
♻️ Duplicate comments (2)
nettacker/modules/vuln/paloalto_panos_cve_2024_0012.yaml (1)
98-100:⚠️ Potential issue | 🟠 MajorTighten the response fingerprint to the full
<title>element.
Line 99uses a broad phrase match, which weakens the “zero false positives” claim. Match the full title tag pattern to keep detection strict.🔧 Proposed fix
content: - regex: "Zero Touch Provisioning" + regex: "(?i)<title>\\s*Zero Touch Provisioning\\s*</title>" reverse: false🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@nettacker/modules/vuln/paloalto_panos_cve_2024_0012.yaml` around lines 98 - 100, The current fingerprint uses the broad regex value "Zero Touch Provisioning" under the content.regex field which yields false positives; tighten it to match the full HTML title element by replacing that regex with a pattern that anchors and captures the entire <title> text (e.g. a regex matching "<title>Zero Touch Provisioning.*</title>" with appropriate escaping and case-insensitivity) in the same content.regex setting and keep the same content.reverse logic unchanged.pr_body.md (1)
30-30:⚠️ Potential issue | 🟡 MinorUpdate the issue-link checkbox to match the PR objective.
Line 30is unchecked, but this PR states it fixes#12345. Please mark it as completed.📝 Proposed fix
-- [ ] I've linked this PR with an open issue +- [x] I've linked this PR with an open issue🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@pr_body.md` at line 30, Update the checklist item "- [ ] I've linked this PR with an open issue" to checked ("- [x] I've linked this PR with an open issue") in pr_body.md, and include the issue reference "#12345" nearby (e.g., add "Fixes `#12345`" or append the issue number next to the checkbox line) so the PR body clearly reflects that this PR closes that issue; locate the checkbox text string to make the edit.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Duplicate comments:
In `@nettacker/modules/vuln/paloalto_panos_cve_2024_0012.yaml`:
- Around line 98-100: The current fingerprint uses the broad regex value "Zero
Touch Provisioning" under the content.regex field which yields false positives;
tighten it to match the full HTML title element by replacing that regex with a
pattern that anchors and captures the entire <title> text (e.g. a regex matching
"<title>Zero Touch Provisioning.*</title>" with appropriate escaping and
case-insensitivity) in the same content.regex setting and keep the same
content.reverse logic unchanged.
In `@pr_body.md`:
- Line 30: Update the checklist item "- [ ] I've linked this PR with an open
issue" to checked ("- [x] I've linked this PR with an open issue") in
pr_body.md, and include the issue reference "#12345" nearby (e.g., add "Fixes
`#12345`" or append the issue number next to the checkbox line) so the PR body
clearly reflects that this PR closes that issue; locate the checkbox text string
to make the edit.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 8c7c2e7b-ca6f-41f4-b292-7f21f361f0bc
📒 Files selected for processing (5)
docs/Modules.mdnettacker/modules/vuln/paloalto_panos_cve_2024_0012.yamlpr_body.mdtests/modules/__init__.pytests/modules/test_paloalto_panos_cve_2024_0012.py
✅ Files skipped from review due to trivial changes (1)
- docs/Modules.md
🚧 Files skipped from review as they are similar to previous changes (1)
- tests/modules/test_paloalto_panos_cve_2024_0012.py
13ae27d to
96ffa45
Compare
|
Fix: Strengthened the detection regex to strictly match the ZTP string within title tags to eliminate potential false positives. |
|
@coderabbitai resume |
✅ Actions performedReviews resumed. |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@pr_body.md`:
- Line 10: Replace the absolute claim "This logic ensures **zero false
positives** because ..." with softened wording that avoids an absolute
guarantee; find the exact sentence starting "This logic ensures **zero false
positives**" in the PR body and change it to something like "This logic
minimizes false positives because patched hosts..." or "This logic is designed
to minimize false positives..." to account for edge cases (mirrored titles,
custom error pages, honeypots) while keeping the explanatory follow-up
unchanged.
- Around line 25-27: The commit 96ffa45 is unsigned and must be GPG-signed
before merging; locate the unsigned commit (96ffa45) on your branch, sign it by
amending or interactively rebasing to apply your GPG signature to that commit
(or all unsigned commits), ensure each amended commit shows as signed, then
force-push the updated branch to this PR so the history contains only GPG-signed
commits as required by the repository policy.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 36eb3f44-087e-4435-aadf-c7a4526e811d
📒 Files selected for processing (5)
docs/Modules.mdnettacker/modules/vuln/paloalto_panos_cve_2024_0012.yamlpr_body.mdtests/modules/__init__.pytests/modules/test_paloalto_panos_cve_2024_0012.py
✅ Files skipped from review due to trivial changes (3)
- docs/Modules.md
- tests/modules/test_paloalto_panos_cve_2024_0012.py
- nettacker/modules/vuln/paloalto_panos_cve_2024_0012.yaml
96ffa45 to
71c37ae
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
♻️ Duplicate comments (2)
pr_body.md (2)
10-10:⚠️ Potential issue | 🟡 MinorAvoid absolute “zero false positives” claim.
Line 10 still uses a hard guarantee. Please soften to “minimizes false positives” to avoid overclaiming in edge environments.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@pr_body.md` at line 10, Replace the absolute claim "zero false positives" in the sentence that explains detection logic with a softened phrase like "minimizes false positives" (e.g., change "This logic ensures zero false positives because..." to "This logic minimizes false positives because...") and update any adjacent wording that implies an absolute guarantee so the sentence reads conservatively while preserving the explanation about patched hosts returning a 302 and non-target servers lacking the PAN-OS ZTP page title.
26-26:⚠️ Potential issue | 🔴 CriticalCommit signature verification failed—unsigned commit must be signed before merge.
The commit
71c37aeaa43f807a913e657225c6215a97e00ff1is unsigned (signature status:N). Line 26 claims all commits are digitally signed, but the actual commit metadata shows no valid signature. Per OWASP/Nettacker policy, all PR commits must be GPG/SSH signed.Sign the commit and force-push to resolve:
git commit --amend --no-edit -S git push origin +HEAD🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@pr_body.md` at line 26, The PR claims all commits are signed (pr_body.md line 26) but commit 71c37aeaa43f807a913e657225c6215a97e00ff1 is unsigned; amend that specific commit to add a GPG/SSH signature (create a signed amend of the commit) and then force-push the branch so the repository shows the commit as signed before merging.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@pr_body.md`:
- Line 32: The checklist item "- [x] I have attached screenshots demonstrating
my code works as intended" is inconsistent with the PR description stating
screenshots are not attached; either remove the "x" to uncheck that checklist
item in pr_body.md or actually attach the screenshot files to the PR and update
the PR description to reference them so the checked state is correct; locate the
checkbox text in pr_body.md and perform the appropriate action (toggle the
checkbox or upload images and update the text).
---
Duplicate comments:
In `@pr_body.md`:
- Line 10: Replace the absolute claim "zero false positives" in the sentence
that explains detection logic with a softened phrase like "minimizes false
positives" (e.g., change "This logic ensures zero false positives because..." to
"This logic minimizes false positives because...") and update any adjacent
wording that implies an absolute guarantee so the sentence reads conservatively
while preserving the explanation about patched hosts returning a 302 and
non-target servers lacking the PAN-OS ZTP page title.
- Line 26: The PR claims all commits are signed (pr_body.md line 26) but commit
71c37aeaa43f807a913e657225c6215a97e00ff1 is unsigned; amend that specific commit
to add a GPG/SSH signature (create a signed amend of the commit) and then
force-push the branch so the repository shows the commit as signed before
merging.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 8637945c-24d7-49f2-888a-39cf1fc2dfa2
📒 Files selected for processing (5)
docs/Modules.mdnettacker/modules/vuln/paloalto_panos_cve_2024_0012.yamlpr_body.mdtests/modules/__init__.pytests/modules/test_paloalto_panos_cve_2024_0012.py
✅ Files skipped from review due to trivial changes (2)
- docs/Modules.md
- nettacker/modules/vuln/paloalto_panos_cve_2024_0012.yaml
🚧 Files skipped from review as they are similar to previous changes (1)
- tests/modules/test_paloalto_panos_cve_2024_0012.py
71c37ae to
a8f5de4
Compare
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@tests/modules/test_paloalto_panos_cve_2024_0012.py`:
- Around line 138-152: The test test_200_with_partial_ztp_string_does_not_match
should include a real partial ZTP fragment so the regex non-match is actually
verified; update the response["content"] used in that test to contain a partial
title such as "Zero Touch" (but not the full "Zero Touch Provisioning") and keep
the rest of the HTML unchanged so the assertion verifies the pattern does not
match the partial substring. Ensure you only add the partial string in the
content used by test_200_with_partial_ztp_string_does_not_match so other tests
are unaffected.
- Around line 29-33: The module_step fixture currently only returns the loaded
step; update the test to assert the probe request invariants by loading the step
via module_step(), then verify that step["request"]["path"] equals the expected
probe path used in the YAML and that the header "X-PAN-AUTHCHECK" exists in
step["request"]["headers"] with value "off" (ensure header lookup handles the
same key casing used in the fixture). Use the module_step() helper and
MODULE_PATH reference to locate the code to change and add these assertions
alongside the existing response-matching checks.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 45da6bcd-cc86-41e3-bc89-7a14b60a400a
📒 Files selected for processing (5)
docs/Modules.mdnettacker/modules/vuln/paloalto_panos_cve_2024_0012.yamlpr_body.mdtests/modules/__init__.pytests/modules/test_paloalto_panos_cve_2024_0012.py
✅ Files skipped from review due to trivial changes (1)
- docs/Modules.md
🚧 Files skipped from review as they are similar to previous changes (1)
- nettacker/modules/vuln/paloalto_panos_cve_2024_0012.yaml
a8f5de4 to
53f36af
Compare
This commit adds a vulnerability detection module for CVE-2024-0012, a critical authentication bypass in Palo Alto Networks PAN-OS software. The module probes the Zero Touch Provisioning (ZTP) endpoint (/php/ztp_gate.php/.js.map) with the X-PAN-AUTHCHECK: off header to bypass the Nginx proxy checks on vulnerable versions. It verifies the bypass by matching the HTTP 200 response and the 'Zero Touch Provisioning' page title, ensuring zero false positives against patched systems (which return HTTP 302). Testing: - Added tests/modules/test_paloalto_panos_cve_2024_0012.py - Verified against true positive, patched, and non-target mocks - Passed make pre-commit and make test successfully
- Add probe request invariant assertions to module_step fixture: - Verify expected probe path 'php/ztp_gate.php/.js.map' in URL fuzzer - Verify X-PAN-AUTHCHECK header is set to 'off' (case-insensitive) - Update test_200_with_partial_ztp_string_does_not_match: - Use real partial ZTP fragment 'Zero Touch' (without 'Provisioning') - Actually tests that regex requires full 'Zero Touch Provisioning' string
c5a98ff to
34bfbac
Compare
Proposed change
Adds a new detection module for CVE-2024-0012, a critical authentication bypass vulnerability in Palo Alto Networks PAN-OS software.
The detection logic relies on an Nginx path confusion exploit primitive:
/php/ztp_gate.php/.js.mapX-PAN-AUTHCHECK: offheader (which the vulnerable Nginx proxy fails to override due to the missingproxy_default.confinclude on.js.mapURIs)200AND<title>Zero Touch Provisioning</title>in the response body.This logic is designed to minimize false positives because patched hosts correctly decline the bypass (returning an HTTP 302 redirect to
/php/login.php), and non-target generic web servers are unlikely to contain the PAN-OS-specific ZTP page title.Type of change
Checklist
make pre-commitand confirm it didn't generate any warnings/changesmake test, I confirm all tests passed locallydocs/folder