-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
add new field 'port' in network protocol #4123
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ TESTS="network/network-port.yaml" ./run.sh
::group::Build nuclei
::endgroup::
::group::Build nuclei integration-test
::endgroup::
::group::Installing nuclei templates
__ _
____ __ _______/ /__ (_)
/ __ \/ / / / ___/ / _ \/ /
/ / / / /_/ / /__/ / __/ /
/_/ /_/\__,_/\___/_/\___/_/ v2.9.13
projectdiscovery.io
[INF] No new updates found for nuclei templates
::endgroup::
skipping test case http/interactsh.yaml. disabled on darwin.
skipping test case http/interactsh-stop-at-first-match.yaml. disabled on darwin.
skipping test case http/default-matcher-condition.yaml. disabled on darwin.
[✓] Test "network/network-port.yaml" passed! |
Example templateid: network-port-example
info:
name: Example Template with Network Port
author: pdteam
severity: high
description: This is an updated description for the network port example.
reference: https://updated-reference-link
tcp:
- host:
- "{{Hostname}}"
port: 23846
inputs:
- data: "PING\r\n"
read-size: 4
matchers:
- type: word
part: data
words:
- "PONG"
|
This was
linked to
issues
Sep 4, 2023
Mzack9999
approved these changes
Sep 6, 2023
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.
Implementation: lgtm
Notes:
- Near impossible to write network templates towards http/https ports when different reserved port is defined (eg ssh with reserved port 22 but user input with custom port 80)
- Would work very well with https://github.com/projectdiscovery/netdb for filtering ports:
exclude-ports: http,ftp
New Changes
|
Mzack9999
approved these changes
Sep 11, 2023
ehsandeep
approved these changes
Sep 11, 2023
2 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Proposed Changes
currently in network template to allow running template against a different port than one hardcoded in template (ref: https://github.com/projectdiscovery/nuclei-templates/blob/main/network/cves/2001/CVE-2001-1473.yaml)
and this is achieved by sending 2 requests
and this will always cause 1 requests to fail . currently there are more than 100 network templates so 100 requests will fail
in this PR we introduce
port: 2345
<- port field in network template and this is considered as default/hardcoded port and it addresses mainly three casesscanme.sh:3674
(i.e non http) then3674
is used instead of hardcoded2345