Repository navigation
feat(scan): add zammad_version_scan module (#1810) #1826
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 2 commits
016e7cd
9baa46f
8ef5564
034b9c1
6ca4fc4
db6e637
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,97 @@ | ||
| info: | ||
| name: zammad_version_scan | ||
| author: devjoshi2005 | ||
| severity: 3 | ||
| description: > | ||
| Zammad version scan - detects a Zammad helpdesk instance via its web | ||
| branding and probes the /api/v1/version endpoint. Properly configured | ||
| Zammad deployments protect the version endpoint with authentication | ||
| (unauthenticated requests receive Zammad's distinctive "Authentication | ||
| required" JSON error); the module reports this as the version-unknown | ||
| outcome instead of guessing a version. It does not assess | ||
| vulnerabilities. | ||
| reference: | ||
| - https://docs.zammad.org/ | ||
| - https://github.com/zammad/zammad | ||
| profiles: | ||
| - scan | ||
| - http | ||
| - info_severity | ||
| - zammad | ||
|
|
||
| payloads: | ||
| - library: http | ||
| steps: | ||
| # Step 1: product confirmation on the unauthenticated root page. | ||
| # Real Zammad serves the single-page application at / with | ||
| # <title>Zammad</title> (verified against a current public Zammad | ||
| # instance). Non-Zammad targets cannot match and are never | ||
| # misreported. | ||
| - method: get | ||
| timeout: 3 | ||
| headers: | ||
| User-Agent: "{user_agent}" | ||
| allow_redirects: true | ||
| ssl: false | ||
| url: | ||
| nettacker_fuzzer: | ||
| input_format: "{{schema}}://{target}:{{ports}}/" | ||
| prefix: "" | ||
| suffix: "" | ||
| interceptors: | ||
| data: | ||
| schema: | ||
| - "http" | ||
| - "https" | ||
| ports: | ||
| - 80 | ||
| - 443 | ||
| - 8080 | ||
| response: | ||
| condition_type: and | ||
| log: "Zammad helpdesk detected, version not assessed (version endpoint requires authentication)" | ||
|
coderabbitai[bot] marked this conversation as resolved.
Resolved
|
||
| conditions: | ||
| status_code: | ||
| regex: "200" | ||
| reverse: false | ||
| content: | ||
| regex: '<title>\s*Zammad' | ||
| reverse: false | ||
|
|
||
| # Step 2: version unknown outcome - the unauthenticated version API is | ||
|
Comment on lines
+59
to
+72
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
| # rejected with Zammad's distinctive JSON error (verified on a current | ||
| # Zammad instance: "error_human":"Authentication required" among the | ||
| # returned keys). "Version unknown" is a | ||
| # first-class outcome, never a guessed version. Reverse proxies and | ||
| # other products reject the same request with HTML pages, so they | ||
| # cannot trigger this step. | ||
| - method: get | ||
| timeout: 3 | ||
| headers: | ||
| User-Agent: "{user_agent}" | ||
| allow_redirects: false | ||
| ssl: false | ||
| url: | ||
| nettacker_fuzzer: | ||
| input_format: "{{schema}}://{target}:{{ports}}/api/v1/version" | ||
| prefix: "" | ||
| suffix: "" | ||
| interceptors: | ||
| data: | ||
| schema: | ||
| - "http" | ||
| - "https" | ||
| ports: | ||
| - 80 | ||
| - 443 | ||
| - 8080 | ||
| response: | ||
| condition_type: and | ||
| log: "Zammad version endpoint accessible, version unknown (protected by authentication)" | ||
| conditions: | ||
| status_code: | ||
| regex: "401|403" | ||
| reverse: false | ||
| content: | ||
| regex: '"error_human"\s*:\s*"Authentication required"' | ||
| reverse: false | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Describe the request as unauthenticated, not the endpoint.
/api/v1/versionis authentication-protected. The module sends an unauthenticated request and recognizes the authentication error response. (raw.githubusercontent.com)Change this to: “probes the authentication-protected
/api/v1/versionendpoint with an unauthenticated request.”