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 a rule for Slowloris Attack #807

Closed
ccojocar opened this issue Apr 25, 2022 · 1 comment · Fixed by #809
Closed

Add a rule for Slowloris Attack #807

ccojocar opened this issue Apr 25, 2022 · 1 comment · Fixed by #809

Comments

@ccojocar
Copy link
Member

ccojocar commented Apr 25, 2022

Summary

Add rule which should detect if ReadHeaderTimeout is configured in the http.Server. This should prevent a Slowloris Attack. See more details at https://medium.com/a-journey-with-go/go-understand-and-mitigate-slowloris-attack-711c1b1403f6.

@adamdecaf
Copy link

adamdecaf commented Jul 21, 2022

Wouldn't this check be more correct to alert when ReadTimeout == 0 and ReadHeaderTimeout == 0?

	// (snip) If ReadHeaderTimeout
	// is zero, the value of ReadTimeout is used. If both are
	// zero, there is no timeout.
	ReadHeaderTimeout [time](https://pkg.go.dev/time).[Duration](https://pkg.go.dev/time#Duration)

https://pkg.go.dev/net/http#Server.ReadHeaderTimeout

Edit: This appears to be used in Go 1.18.4 how the docs mention.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants