nuclei
nuclei copied to clipboard
Templates with multiple DNS requests fail when the input is in "host:port" format
Nuclei version:
3.3.0
Current Behavior:
While executing a DNS template with multiple requests with a host:port input(s), the FQDN variable includes the port that causes the DNS requests to fail.
Expected Behavior:
The FQDN variable should not include a port regardless of the input format or the template protocol.
Steps To Reproduce:
- Write the following template to
test-multi-request-input-handling.yamlid: test-multi-request-input-handling info: name: Test Single Protocol Input Handling author: mhmdiaa severity: info dns: - name: "{{FQDN}}" type: A - name: "{{FQDN}}" type: A - Run
nuclei -debug -u example.com:443 -t test-multi-request-input-handling.yaml - The debug output will show the sent DNS requests which include the port.
;; QUESTION SECTION: ;example.com:443. IN A
Anything else:
The FQDN is parsed correctly when the template has a single request, uses another protocol, or when the input is a full URL.
$ cat test-single-request-input-handling.yaml
id: test-single-request-input-handling
info:
name: Test Single Request Input Handling
author: mhmdiaa
severity: info
dns:
- name: "{{FQDN}}"
type: A
$ nuclei -debug -u example.com:443 -t test-single-request-input-handling.yaml
...
;; QUESTION SECTION:
;example.com. IN A
...
;; ANSWER SECTION:
example.com. 1009 IN A 93.184.215.14
@mhmdiaa thanks for creating an issue and fix for it.
possible related issue - https://github.com/projectdiscovery/nuclei-templates/issues/10349