projectdiscovery / nuclei

Fast and customizable vulnerability scanner based on simple YAML based DSL.
https://docs.projectdiscovery.io/tools/nuclei
MIT License
19.82k stars 2.44k forks source link

Issue with port input parsing for network protocol in case of URL Input #5437

Closed qianbenhyu closed 1 month ago

qianbenhyu commented 1 month ago
id: ip-port-3311-check

info:
  name: IP Port 3311 Check
  author: ProjectDiscoveryAI
  severity: medium

tcp:
  - host:
      - "{{Hostname}}"
    port: 3311

    matchers:
      - type: word
        words:
          - "mysql_native_password"

when I use the poc above. My nuclei could not send messege to a right port. image

dogancanbakir commented 1 month ago

It works as intended. Could you please share all the details necessary to repro the issue? Thanks!

$ go run . -u scanme.sh -t test_template.yaml -debug

                     __     _
   ____  __  _______/ /__  (_)
  / __ \/ / / / ___/ / _ \/ /
 / / / / /_/ / /__/ /  __/ /
/_/ /_/\__,_/\___/_/\___/_/   v3.3.0

                projectdiscovery.io

[INF] Current nuclei version: v3.3.0 (latest)
[INF] Current nuclei-templates version: v9.9.1 (latest)
[WRN] Scan results upload to cloud is disabled.
[INF] New templates added in latest release: 75
[INF] Templates loaded for current scan: 1
[WRN] Loading 1 unsigned templates for scan. Use with caution.
[INF] Targets loaded for current scan: 1
[WRN] [ip-port-3311-check] Could not make network request for (scanme.sh:3311) : could not connect to server: errKind=network-permanent-error [address=scanme.sh:3311] port closed or filtered; no route to host; connection refused
[INF] No results found. Better luck next time!
qianbenhyu commented 1 month ago

aha! when I try it again, it appears to be OK. Thank you for your help!