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

ztls fallback support and renegotiation error fix #144

Merged
merged 1 commit into from
Jul 6, 2023

Conversation

tarunKoyalwar
Copy link
Member

@tarunKoyalwar tarunKoyalwar commented Jul 6, 2023

Proposed Changes

Notes

suggesting deprecating and removing -ztls mode in nuclei . ZTLS currently does not support TLS1.3 as well as Renogotiation. using fastdialer in this PR with nuclei shows using ztls mode by default causes host to skip since it does not support renogotiation

Setup

checkout nuclei from projectdiscovery/nuclei#3909 which contains fastdialer from this PR

using nuclei with ztls mode

$  echo "https://moh.gov.sy" | go run . -v -id tech-detect -nh -ztls

                     __     _
   ____  __  _______/ /__  (_)
  / __ \/ / / / ___/ / _ \/ /
 / / / / /_/ / /__/ /  __/ /
/_/ /_/\__,_/\___/_/\___/_/   v2.9.8

		projectdiscovery.io

[INF] Current nuclei version: v2.9.8 (latest)
[INF] Current nuclei-templates version: v9.5.4 (latest)
[INF] New templates added in latest release: 51
[INF] Templates loaded for current scan: 1
[INF] Targets loaded for current scan: 1
[WRN] [tech-detect] Could not execute request for https://moh.gov.sy: GET https://moh.gov.sy giving up after 2 attempts: Get "https://moh.gov.sy": local error: no renegotiation
[INF] No results found. Better luck next time!

using nuclei without ztls mode (i.e implicit ztls fallback)

$ echo "https://moh.gov.sy" | go run . -v -id tech-detect -nh      

                     __     _
   ____  __  _______/ /__  (_)
  / __ \/ / / / ___/ / _ \/ /
 / / / / /_/ / /__/ /  __/ /
/_/ /_/\__,_/\___/_/\___/_/   v2.9.8

		projectdiscovery.io

[INF] Current nuclei version: v2.9.8 (latest)
[INF] Current nuclei-templates version: v9.5.4 (latest)
[INF] New templates added in latest release: 51
[INF] Templates loaded for current scan: 1
[INF] Targets loaded for current scan: 1
[VER] [tech-detect] Sent HTTP request to https://moh.gov.sy
[tech-detect:ms-iis] [http] [info] https://moh.gov.sy/
[tech-detect:ms-iis] [http] [info] https://moh.gov.sy/Default.aspx?tabid=704&language=en-US
[tech-detect:ms-iis] [http] [info] https://moh.gov.sy
  • unless we have a reason to explicitly keep -ztls flag i think we should remove it since its use cases are covered and sometimes using it causes issues

@tarunKoyalwar
Copy link
Member Author

successful fallback to ztls resolves projectdiscovery/nuclei#2805

$ echo https://217.75.198.227:8443 | go run . -v -id tech-detect -nh                                       130 ↵

                     __     _
   ____  __  _______/ /__  (_)
  / __ \/ / / / ___/ / _ \/ /
 / / / / /_/ / /__/ /  __/ /
/_/ /_/\__,_/\___/_/\___/_/   v2.9.8

		projectdiscovery.io


[INF] Current nuclei version: v2.9.8 (latest)
[INF] Current nuclei-templates version: v9.5.4 (latest)
[INF] New templates added in latest release: 51
[INF] Templates loaded for current scan: 1
[INF] Targets loaded for current scan: 1
[VER] [tech-detect] Sent HTTP request to https://217.75.198.227:8443
[INF] No results found. Better luck next time!

@tarunKoyalwar tarunKoyalwar self-assigned this Jul 6, 2023
Copy link
Member

@Mzack9999 Mzack9999 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm! - Let's also deprecate the -ztls flag both in nuclei and httpx once fastdialer is updated.

Copy link
Member

@ehsandeep ehsandeep left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔥

@ehsandeep ehsandeep merged commit a9b2195 into main Jul 6, 2023
5 checks passed
@ehsandeep ehsandeep deleted the feat-ztls-fallback branch July 6, 2023 14:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

fastdialer ztls fallback + bug fix remote error: tls: insufficient security level
3 participants