-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Response time logging and filtering #433
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
Conversation
|
One bazillion decimal points on Here's what the |
joohoi
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR! This is cool!
I see that you changed up the output (since the last comment) to use milliseconds throughout. I think this is perfect.
The code in general looks very good (thanks for writing a few tests too!), there's just a small addition I'd love to see: adding the template to the ffufrc.example file.
Something I also noticed: sometimes with for example -ft '>30' the responses show durations of 31ms, but this must be related to the rounding in the output, but I'm a bit confused. I think the Time.Milliseconds() and Duration.Round... have a bit of discrepancy there. I don't think this is critical to change, but if you have a simple way of doing it, it'd be great :)
|
Hmm, seems like there must be some discrepancy between I'm not sure what you mean by adding the template to the |
|
Ahh that's right, I used |
|
Thanks for the update. I'd prefer using a well defined, static output format for the duration, and in this case the best fit would be milliseconds. Currently, durations under a second get printed in ms, and durations over a second in seconds: |
|
Fair enough, have switched it to always print milliseconds. |
joohoi
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, merging! Thanks again for the high quality pull request.
* Added response time reporting and filtering * Update to use the http config context * Added changelog and contributor info * Round time output in stdout to nearest millisecond * Change stdout duration rounding to use Milliseconds() * Go back to Round() for timing output * Changed stdout to display millisecond durations Co-authored-by: Joona Hoikkala <joohoi@users.noreply.github.com>
Description
This pull request implements response time logging and filtering. Timing is performed using Golang's HTTP Tracing, so the logged time is the duration between the request being fully written (so we avoid logging overhead from DNS and TLS connection setup) and the first byte of the response being received.
Matchers and filters have been implemented with
-mtand-ft. This is particularly useful when fuzzing things and looking for time discrepancies. The idea is to let the user tweak these parameters and see responses that fall outside of the expected response time.Here is an example of using this to find blind sqli in the OWASP DVWA (using the SQLI Blind fuzzing list from Seclists)
And another example of finding SSRF based on timing discrepancy (using the https://owasp-skf.gitbook.io/asvs-write-ups/kbid-262-server-side-request-forgery container as the target)
Fixes: #196