Skip to content

Remove leftover Wappalyzer metadata from web_technologies regexes - #1957

Closed
NSK-394 wants to merge 1 commit into
OWASP:masterfrom
NSK-394:fix-web-technologies-wappalyzer-suffix
Closed

NSK-394 wants to merge 1 commit into
OWASP:masterfrom
NSK-394:fix-web-technologies-wappalyzer-suffix

Conversation

@NSK-394

@NSK-394 NSK-394 commented Dec 1, 2026 •

Copy link
Copy Markdown
Contributor

Part of #1945 (first batch)

Proposed change

Many regexes in nettacker/modules/scan/web_technologies.yaml still carry Wappalyzer's version-extraction suffix (\;version:\1, \;confidence:NN). In a Python regex \; is a literal ;, so the pattern also requires the text ;version: in the response, which real servers never send. The fingerprint therefore cannot match. This PR removes the suffix from 20 lines: the Nginx Server regex (it only matches if the response contains ;version:) and 19 entries where an unescaped $ sits right before the suffix, which makes a match impossible. Only the suffix text is removed from those lines; everything else is unchanged (20 insertions, 20 deletions, 238 characters removed). Versions are not reported; this is detection only.

Not in this PR:

  • Four of the 24 lines listed in the issue are left out on purpose. Botble: its confidence:0 made it a weak fingerprint, and stripping it would make it over-broad. CodeIgniter: stripping changes nothing. FancyBox and Inveon: content patterns where $ means the end of the body.
  • About 440 other lines carry the suffix without a $ (for example Apache and Python's SimpleHTTP; I confirmed both are missed on real containers). I would send those in later batches if you agree.

Verification

Real containers on an isolated Docker network with no published ports, web_technologies_scan, technologies reported on upstream/master (2f23fab) and on this branch:

Target What the server sends master branch
nginx:stable 1.30.4 Server: nginx/1.30.4 none Nginx
nginx:stable, server_tokens off Server: nginx none Nginx
easyengine/nginx-proxy:v4.15.0 (one hand-written vhost) X-Powered-By: EasyEngine v4 none EasyEngine, Nginx
sanluan/publiccms:V6 + mysql:8.4.13 (after the installer) X-Powered-PublicCMS: V6 none Public CMS
pandoc/core:3.14.0 (Warp) Server: Warp/3.4.21 on /version; GET / returns 405 none none (the scan cannot see it)
kibana:8.19.23 (setup mode) no kbn-version on /, /login or /api/status none none
httpd:2.4.71-alpine Server: Apache/2.4.71 (Unix) UNIX UNIX
caddy:2.11.9-alpine Server: Caddy Caddy Caddy
python:3.11-slim http.server Server: SimpleHTTP/0.6 Python/3.11.16 none none

Apart from the intended new detections (Nginx, EasyEngine, Public CMS) the two states are identical. Apache and Python are missed in both states because they carry the suffix without $ (not in this batch).

I also ran the Nginx case myself on the official nginx container (Server: nginx/1.30.4, port 8081, real CLI: python nettacker.py -i 127.0.0.1 -m web_technologies_scan -g 8081 -t 1 -M 1 --skip-service-discovery).

Before, upstream master (61bab4e): no technology reported, only the generic status row.

After, this branch: "Nginx Found".

Real software: Nginx, EasyEngine (v4.15.0) and Public CMS (V6) are detected on this branch and not on master. The Nginx run I did myself; the others were run by Claude Code against pinned images on an isolated network, and I reviewed the captured headers. Warp's real header matches the edited regex, but the pandoc server I could run answers GET / with 405, so the module cannot see it. Kibana 8.19.23 does not send kbn-version at all, so that fingerprint is stale for current Kibana (the edit is still correct; it just cannot fire there). I did not run Shopware (1.6 GB); from its source the two headers are not sent on GET /. The remaining entries are covered only by unit tests with sample responses built from each product's source or documentation (links in the test file): several are SaaS or proprietary (Oracle Commerce Cloud, Shopfa, SharePoint), and the others (Kooboo, Umbraco, Neos, Sulu, CppCMS, Aegea, PHPFusion, Arastta) need a source build or a database, or have no maintained image. Where I found no vendor documentation (Aegea, Arastta, Kooboo, Oracle Commerce Cloud, PHPFusion, Shopfa) the sample comes from the webappanalyzer fingerprint, so it is not verified against the real product.

Tests: tests/unit/test_web_technologies_scan.py (233 tests) runs each edited entry through TemplateLoader and response_conditions_matched, the same path the module uses. It checks a positive sample, a negative sample, eight neutral server responses, that the suffix is gone, and that no edited regex matches the empty string.

  • On master's YAML, 59 of them fail (all assertion failures). On this branch all 233 pass: 3 runs on Windows (Python 3.10.11) and 3 in a Python 3.11.16 container.
  • Negative control: reverting the YAML makes the tests fail, and restoring it gives an identical diff.
  • tests/unit/test_yaml_schema_and_regex.py still passes (134 passed, 6 skipped).
  • Full unit suite in the container: 839 passed, 6 skipped, 2 xfailed (baseline on master: 606 passed, 6 skipped, 2 xfailed).
  • ruff 0.1.13 (the pinned version) and the other pre-commit hooks pass.
  • I also ran pre-commit and the test suite locally on Windows (Python 3.10.11): all hooks pass and all tests pass.

Limits and questions

  • Not verified: EasyEngine was tested with one hand-written vhost (no HTTPS; its HTTPS template adds an HSTS add_header that may drop the header), Public CMS only on / after the install, Kibana only in setup mode without Elasticsearch, and Warp only where / is not 200. Some unit test samples are older than what the real products send (Kibana 4.5 kbn-version, EasyEngine 2.2.3, Public CMS V5); the real responses also match the regexes, except Kibana 8, which sends no kbn-version. Other entries: the Public CMS header format and the Shopware headers on GET / are unconfirmed.
  • Should further batches be about this size, or larger?
  • Should captured versions be reported at some point, or only the technology name?

AI tools were used in preparing this PR. I reviewed the diff and the tests and can explain every change.

Type of change

  • New core framework functionality
  • Bugfix (non-breaking change that fixes an issue)
  • Code refactoring without any functionality changes
  • New or existing module/payload change
  • Documentation/localization improvement
  • Test coverage improvement
  • Dependency upgrade
  • Other improvement (best practice, cleanup, optimization, etc)

Checklist

  • I've followed the contributing guidelines
  • I've digitally signed all my commits in this PR
  • I've run make pre-commit and confirm it didn't generate any warnings/changes
  • I've run make test and I confirm all tests passed locally
  • I've added/updated any relevant documentation in the docs/ folder (no user-facing behavior or description text changed)
  • I've linked this PR with an open issue
  • I've tested and verified that my code works as intended and resolves the issue as described
  • I've attached screenshots demonstrating that my code works as intended (if applicable)
  • I've checked all other open PRs to avoid submitting duplicate work
  • I confirm that the code and comments in this PR are not direct unreviewed outputs of AI
  • I confirm that I am the Sole Responsible Author for every line of code, comment, and design decision

…ASP#1945)

The \;version:\1 and \;confidence suffixes are Wappalyzer syntax, not part of the match, so these fingerprints could not match real responses. Strip the suffix from 20 entries (Nginx and the entries with $ before the suffix) and add tests for each.
@coderabbitai

coderabbitai Bot commented Dec 1, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

Caution

Review failed

The pull request is closed.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

Share

@NSK-394 NSK-394 changed the title Remove leftover Wappalyzer metadata from web_technologies regexes (#1945) Remove leftover Wappalyzer metadata from web_technologies regexes Dec 1, 2026
@github-actions

github-actions Bot commented Dec 1, 2026

Copy link
Copy Markdown

Contribution validation failed:

  • issue_reference: This PR must be linked to an issue or include a valid closing issue reference in the description.

@github-actions github-actions Bot closed this Dec 1, 2026
@github-actions

github-actions Bot commented Dec 1, 2026

Copy link
Copy Markdown

Contribution validation failed:

  • issue_reference: This PR must be linked to an issue or include a valid closing issue reference in the description.

@NSK-394
NSK-394 deleted the fix-web-technologies-wappalyzer-suffix branch December 1, 2026 10:02
@github-actions

github-actions Bot commented Dec 1, 2026

Copy link
Copy Markdown

Contribution validation failed:

  • issue_reference: This PR must be linked to an issue or include a valid closing issue reference in the description.

@NSK-394
NSK-394 restored the fix-web-technologies-wappalyzer-suffix branch December 1, 2026 10:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant