Skip to content
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 Connection timed out error support for max-host-error counter #3165

Closed
0cat-r opened this issue Jan 7, 2023 · 6 comments
Closed

Add Connection timed out error support for max-host-error counter #3165

0cat-r opened this issue Jan 7, 2023 · 6 comments
Assignees
Labels
Status: Abandoned This issue is no longer important to the requestor and no one else has shown an interest in it. Type: Enhancement Most issues will probably ask for additions or changes.

Comments

@0cat-r
Copy link

0cat-r commented Jan 7, 2023

The situation is like this, sometimes, security devices such as waf have blocked our server. The phenomenon is that we cannot curl access url

image

I tried using the -mhe parameter to skip the url but it didn't work.

./nuclei -u https://xxxx.xxxx.com -mhe 5 -v -stats
image
When there are a lot of requests in my xxx.yaml. And when there are many target urls in target.txt. Suppose the first url can't be skipped correctly. The program will be stuck here, unless all requests are timeout

I am using the latest version v2.8.6

@0cat-r 0cat-r added the Type: Bug Inconsistencies or issues which will cause an issue or problem for users or implementors. label Jan 7, 2023
@jaikishantulswani
Copy link

@ehsandeep Can it be possible to skip using mhe flag as it uses the flag by default for 30 errors before skipping. What if I want to force scan that domain.

@ehsandeep
Copy link
Member

@jaikishantulswani, it will be possible after https://github.com/projectdiscovery/nuclei/issues is implemented.

@0cat-r
Copy link
Author

0cat-r commented Jan 11, 2023

@ehsandeep why mhe parameter doesn't work

@ehsandeep
Copy link
Member

@0cat-r it's because Connection timed out error is not used max-host-error counter -

https://github.com/projectdiscovery/nuclei/blob/main/v2/pkg/protocols/common/hosterrorscache/hosterrorscache.go#L129

@ehsandeep ehsandeep changed the title mhe parameter doesn't work Add Connection timed out error support for max-host-error counter Jan 11, 2023
@ehsandeep ehsandeep added Type: Enhancement Most issues will probably ask for additions or changes. and removed Type: Bug Inconsistencies or issues which will cause an issue or problem for users or implementors. labels Jan 11, 2023
@Mzack9999 Mzack9999 self-assigned this Jan 31, 2023
@Mzack9999
Copy link
Member

Mzack9999 commented Jan 31, 2023

A similar error (Timeout exceeded while awaiting headers - a bit different as the network connection is established, but no response header received) is counted as a hard fail worth +1 in the host error cache. Connection Timeout is quite a risky error to add as it might result from WAF or intentional (e.g. SQL time injection). Maybe we should start assigning a weight to errors rather than a unitary increment, and if the sum is above a certain threshold, then the host is ignored (in this way, a Timeout error would trigger a lower increase than a no IPS found). What do you think @ehsandeep ?

@Mzack9999 Mzack9999 added the Status: Abandoned This issue is no longer important to the requestor and no one else has shown an interest in it. label Apr 20, 2023
@Mzack9999
Copy link
Member

This will be implemented in projectdiscovery/utils#69 and improved in nuclei auto-tuning - Closing for now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Abandoned This issue is no longer important to the requestor and no one else has shown an interest in it. Type: Enhancement Most issues will probably ask for additions or changes.
Projects
None yet
Development

No branches or pull requests

4 participants