Replies: 1 comment 1 reply
-
Hey @gelim, thank you for bringing this up, and you are right; at the time we started with this project, we expected that users would be doing port scans to feed the input to nuclei, which seems to be not the case due to the majority of the HTTP based template where inputs are filtered that runs http web services, as a results network templates being discarded. To increase scan coverage with default input that can work with all protocols, we started to hardcode the default ports specific to the service + also accept users' port input, just in case the specific network service is running on unrelated ports. Possibly this will be resolved with projectdiscovery/nuclei#2614 where users don't need to feed URLs as input, and probing will be done internally depending on the template protocol in use; anyway, the primary issue will remain as it is, where hardcoded ports can be useful in network templates to increase scan coverage for the cases when host inputs are used without port information. What do you think? Some related discussion: |
Beta Was this translation helpful? Give feedback.
-
Issue description:
Hello,
I noticed there are templates (often network ones) that have the following
{{Host}}:port
within the network host definition.I see it as a design issue. With this, you cannot guarantee that the target you scan will be hit only on the ports you specify (either via URL, or host:port notation).
Usually in your pipeline you will have this dedicated port scanning activity before nuclei is launched.
By doing
echo "127.0.0.1:22" | nuclei -tags network
you will have not only port 22 that will be hit, but all the others that are hardcoded.Anything else:
Current templates that are illustrating this issue:
Beta Was this translation helpful? Give feedback.
All reactions