Replies: 1 comment 1 reply
-
@mhmdiaa we have
|
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Nuclei version:
3.3.0
Current Behavior:
When a network template sends multiple messages separated by CRLF sequences and the server responds to each individually, the engine only reads the first response.
This pattern can lead to potential false negatives. For example, the ftp-weak-credentials template uses this pattern:
Some FTP servers respond to the
USER
command with a message like a server banner orPlease specify the password
. They then read thePASS
command and, if the credentials are correct, return the230 Login successful
response that the template matches against. If the engine doesn't read the second response, it won't catch this.Expected Behavior:
The engine should keep listening on the connection after the first response.
Steps To Reproduce:
test-tcp-conn.yaml
:nuclei -t test-tcp-conn.yaml -debug
220 (vsFTPd 3.0.5)
.Anything else:
I was about to take a stab at fixing this but noticed a couple of things:
-1
(not sure why). So if we add aread-size: -1
, the above template works.So I held off on the PR because there seem to be a few potential fixes to consider:
read
values.network.ConnReadNWithTimeout()
withgithub.com/projectdiscovery/utils/reader.ConnReadNWithTimeout()
throughout.network.ConnReadNWithTimeout()
to continue reading until the connection is closed.Beta Was this translation helpful? Give feedback.
All reactions