-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
fix raw req single slash issue #4955
Conversation
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.
- edgecase when request in unsafe
id: raw-path-single-slash
info:
name: Test RAW HTTP Template with single slash
author: pdteam
severity: info
requests:
- raw:
- |+
GET / HTTP/1.1
Host: {{Hostname}}
Origin: {{BaseURL}}
unsafe: true
$ ./nuclei -t a.yaml -u http://testphp.vulnweb.com/test.php -debug-req
__ _
____ __ _______/ /__ (_)
/ __ \/ / / / ___/ / _ \/ /
/ / / / /_/ / /__/ / __/ /
/_/ /_/\__,_/\___/_/\___/_/ v3.2.2
projectdiscovery.io
[WRN] Found 1 templates loaded with deprecated protocol syntax, update before v3 for continued support.
[INF] Current nuclei version: v3.2.2 (latest)
[INF] Current nuclei-templates version: v9.8.0 (latest)
[WRN] Scan results upload to cloud is disabled.
[INF] New templates added in latest release: 85
[INF] Templates loaded for current scan: 1
[WRN] Loaded 1 unsigned templates for scan. Use with caution.
[INF] Targets loaded for current scan: 1
[INF] [raw-path-single-slash] Dumped HTTP request for http://testphp.vulnweb.com/test.php/
GET /test.php/ HTTP/1.1
Host: testphp.vulnweb.com
Origin: http://testphp.vulnweb.com/test.php
[INF] No results found. Better luck next time!
cloned := inputURL.Clone() | ||
cloned.Params.IncludeEquals = true |
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.
not related to this PR , but sharing here for context , since we will need to remove IncludeEquals hack we use now
More reference - #2377 (comment) |
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.
looks like this change broke a existing behaviour ( see: integration test)
$ TESTS="protocols/http/get-sni-unsafe.yaml" ./run.sh
::group::Build nuclei
::endgroup::
::group::Build nuclei integration-test
::endgroup::
::group::Installing nuclei templates
__ _
____ __ _______/ /__ (_)
/ __ \/ / / / ___/ / _ \/ /
/ / / / /_/ / /__/ / __/ /
/_/ /_/\__,_/\___/_/\___/_/ v3.2.2
projectdiscovery.io
[INF] No new updates found for nuclei templates
::endgroup::
2024/04/02 21:45:42 Could not connect to Docker: cannot connect to Docker endpoint
2024/04/02 21:45:42 Could not start resource: dial unix /var/run/docker.sock: connect: connection refused
skipping test case protocols/http/interactsh.yaml. disabled on darwin.
skipping test case protocols/http/interactsh-stop-at-first-match.yaml. disabled on darwin.
skipping test case protocols/http/default-matcher-condition.yaml. disabled on darwin.
skipping test case protocols/code/ps1-snippet.yaml. disabled on darwin.
____ __
/ __/___/ / ___
/ _// __/ _ \/ _ \
/___/\__/_//_/\___/ v4.10.2
High performance, minimalist Go web framework
https://echo.labstack.com
____________________________________O/_______
O\
./nuclei -t protocols/http/get-sni-unsafe.yaml -target https://127.0.0.1:58421 -sni test -duc -interactions-poll-duration 1 -interactions-cooldown-period 10 -allow-local-file-access -debug
⇨ http server started on 127.0.0.1:8082
[ERR] failed to load provider keys got [uncover:RUNTIME] provider config file .uncover-config/uncover/provider-config.yaml does not exist
__ _
____ __ _______/ /__ (_)
/ __ \/ / / / ___/ / _ \/ /
/ / / / /_/ / /__/ / __/ /
/_/ /_/\__,_/\___/_/\___/_/ v3.2.2
projectdiscovery.io
[WRN] Found 1 templates loaded with deprecated protocol syntax, update before v3 for continued support.
[INF] Current nuclei version: v3.2.2 (outdated)
[INF] Current nuclei-templates version: v9.8.0 (latest)
[INF] New templates added in latest release: 85
[INF] Templates loaded for current scan: 1
[WRN] Loaded 1 unsigned templates for scan. Use with caution.
[INF] Targets loaded for current scan: 1
[INF] [basic-unsafe-get] Dumped HTTP request for https://127.0.0.1:58421
GET HTTP/1.1
Host: 127.0.0.1:58421
[DBG] [basic-unsafe-get] Dumped HTTP response https://127.0.0.1:58421
HTTP/1.1 400 Bad Request
Connection: close
Content-Type: text/plain; charset=utf-8
400 Bad Request
[INF] No results found. Better luck next time!
[✘] Test "protocols/http/get-sni-unsafe.yaml" failed: incorrect number of results: 0 (actual) vs [1] (expected)
Results:
skipping test case protocols/javascript/redis-pass-brute.yaml. disabled on darwin.
skipping test case protocols/javascript/ssh-server-fingerprint.yaml. disabled on darwin.
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.
lgtm !
Proposed changes
Closes #4921
Checklist