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

local error: tls: no renegotiation #3553

Closed
ehsandeep opened this issue Apr 16, 2023 · 4 comments · Fixed by #3909
Closed

local error: tls: no renegotiation #3553

ehsandeep opened this issue Apr 16, 2023 · 4 comments · Fixed by #3909
Assignees
Labels
Status: Completed Nothing further to be done with this issue. Awaiting to be closed. Type: Bug Inconsistencies or issues which will cause an issue or problem for users or implementors.
Milestone

Comments

@ehsandeep
Copy link
Member

Nuclei version:

dev | main

Current Behavior:

[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: tls: no renegotiation

Expected Behavior:

[VER] [tech-detect] Sent HTTP request to https://moh.gov.sy

Steps To Reproduce:

echo https://moh.gov.sy | nuclei -id tech-detect -v

Anything else:

  • works with curl (curl -v https://moh.gov.sy)
  • works with tlsx
  • same issue with httpx
@ehsandeep ehsandeep added the Type: Bug Inconsistencies or issues which will cause an issue or problem for users or implementors. label Apr 16, 2023
@jimen0
Copy link
Contributor

jimen0 commented Apr 18, 2023

This should be an issue in httpx instead as it's affected too and that's why nuclei fails @ehsandeep

$ httpx -v -u https://moh.gov.sy
...
[DBG] Failed 'https://moh.gov.sy': GET https://moh.gov.sy giving up after 1 attempts: Get "https://moh.gov.sy": local error: tls: no renegotiation

@jimen0
Copy link
Contributor

jimen0 commented Apr 18, 2023

Working Go snippet. Might be useful to compare nuclei/httpx TLS config against it:

package main

import (
	"crypto/tls"
	"fmt"
	"io"
	"net/http"
)

func main() {
	tr := &http.Transport{
		TLSClientConfig: &tls.Config{Renegotiation: tls.RenegotiateOnceAsClient},
	}
	http.DefaultClient.Transport = tr

	res, err := http.DefaultClient.Get("https://moh.gov.sy")
	if err != nil {
		panic(err)
	}
	defer res.Body.Close()

	_, err = io.Copy(io.Discard, res.Body)
	if err != nil {
		panic(err)
	}

	fmt.Println(res.StatusCode)
}

@ehsandeep
Copy link
Member Author

This should be an issue in httpx instead as it's affected too and that's why nuclei fails @ehsandeep

$ httpx -v -u https://moh.gov.sy
...
[DBG] Failed 'https://moh.gov.sy': GET https://moh.gov.sy giving up after 1 attempts: Get "https://moh.gov.sy": local error: tls: no renegotiation

it's an issue affecting both project, a similar fix will be applied on both projects.

@tarunKoyalwar tarunKoyalwar self-assigned this Apr 19, 2023
@tarunKoyalwar
Copy link
Member

tarunKoyalwar commented Apr 19, 2023

looks like this needs to be fixed in projectdiscovery/retyrablehttp-go as it used in both http , nuclei and also in other projects

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Completed Nothing further to be done with this issue. Awaiting to be closed. Type: Bug Inconsistencies or issues which will cause an issue or problem for users or implementors.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants