-
Notifications
You must be signed in to change notification settings - Fork 18
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
[BUG] FAIL on lower case headers #8
Comments
Hello, Thanks a lot for the bug report, I will work on it and keep you informed. |
I have tested using the latest version of venom on Windows 10 Pro using test suites from the GitHub repository and I did not face the problem mentioned: Same result on a Linux machine: 🤔Do you used the latest version of venom ? |
Yes I first heard about venom about yesterday and wanted to try it, I was using the latest version |
No problem, I will perform more tests and keep you updated. Thanks for your feedback.
|
📖Test on https://owasp.org returning the following headers: 💻Venom run: 📖Test on https://www.google.com/ returning the following headers: 💻Venom run: 🤔For me, venom and the test suites behaves as expected: Did I miss something? |
That's weird let me write my logs venom version
Version venom: v1.1.0 test_suite.ymlname: HTTP security response headers test suites vars: target_site: '' logout_url: '' request_timeout_in_seconds: 20 testcases: - name: Strict-Transport-Security steps: - type: http method: GET url: '{{.target_site}}' skip_body: true timeout: '{{.request_timeout_in_seconds}}' assertions: - result.statuscode ShouldEqual 200 - result.headers.Strict-Transport-Security ShouldNotBeNil - result.headers.Strict-Transport-Security ShouldEqual "max-age=31536000; includeSubDomains" - name: X-Frame-Options steps: - type: http method: GET url: '{{.target_site}}' skip_body: true timeout: '{{.request_timeout_in_seconds}}' assertions: - result.statuscode ShouldEqual 200 - result.headers.X-Frame-Options ShouldNotBeNil - result.headers.X-Frame-Options ShouldBeIn "deny" "DENY" - name: X-Content-Type-Options steps: - type: http method: GET url: '{{.target_site}}' skip_body: true timeout: '{{.request_timeout_in_seconds}}' assertions: - result.statuscode ShouldEqual 200 - result.headers.X-Content-Type-Options ShouldNotBeNil - result.headers.X-Content-Type-Options ShouldEqual "nosniff" - name: Content-Security-Policy steps: - type: http method: GET url: '{{.target_site}}' skip_body: true timeout: '{{.request_timeout_in_seconds}}' assertions: - result.statuscode ShouldEqual 200 - result.headers.Content-Security-Policy ShouldNotBeNil - result.headers.Content-Security-Policy ShouldNotContainSubstring "unsafe" - name: X-Permitted-Cross-Domain-Policies steps: - type: http method: GET url: '{{.target_site}}' skip_body: true timeout: '{{.request_timeout_in_seconds}}' assertions: - result.statuscode ShouldEqual 200 - result.headers.X-Permitted-Cross-Domain-Policies ShouldNotBeNil - result.headers.X-Permitted-Cross-Domain-Policies ShouldEqual "none" - name: Referrer-Policy steps: - type: http method: GET url: '{{.target_site}}' skip_body: true timeout: '{{.request_timeout_in_seconds}}' assertions: - result.statuscode ShouldEqual 200 - result.headers.Referrer-Policy ShouldNotBeNil - result.headers.Referrer-Policy ShouldEqual "no-referrer" - name: Clear-Site-Data steps: - type: http method: GET url: '{{.target_site}}/{{.logout_url}}' skip_body: true timeout: '{{.request_timeout_in_seconds}}' assertions: - result.statuscode ShouldEqual 200 - result.headers.Clear-Site-Data ShouldNotBeNil - result.headers.Clear-Site-Data ShouldEqual '"cache","cookies","storage"' - name: Cross-Origin-Embedder-Policy steps: - type: http method: GET url: '{{.target_site}}' skip_body: true timeout: '{{.request_timeout_in_seconds}}' assertions: - result.statuscode ShouldEqual 200 - result.headers.Cross-Origin-Embedder-Policy ShouldNotBeNil - result.headers.Cross-Origin-Embedder-Policy ShouldEqual "require-corp" - name: Cross-Origin-Opener-Policy steps: - type: http method: GET url: '{{.target_site}}' skip_body: true timeout: '{{.request_timeout_in_seconds}}' assertions: - result.statuscode ShouldEqual 200 - result.headers.Cross-Origin-Opener-Policy ShouldNotBeNil - result.headers.Cross-Origin-Opener-Policy ShouldEqual "same-origin" - name: Cross-Origin-Resource-Policy steps: - type: http method: GET url: '{{.target_site}}' skip_body: true timeout: '{{.request_timeout_in_seconds}}' assertions: - result.statuscode ShouldEqual 200 - result.headers.Cross-Origin-Resource-Policy ShouldNotBeNil - result.headers.Cross-Origin-Resource-Policy ShouldEqual "same-origin" - name: Permissions-Policy steps: - type: http method: GET url: '{{.target_site}}' skip_body: true timeout: '{{.request_timeout_in_seconds}}' assertions: - result.statuscode ShouldEqual 200 - result.headers.Permissions-Policy ShouldNotBeNil - result.headers.Permissions-Policy ShouldEqual "accelerometer=(), autoplay=(), camera=(), cross-origin-isolated=(), display-capture=(), encrypted-media=(), fullscreen=(), geolocation=(), gyroscope=(), keyboard-map=(), magnetometer=(), microphone=(), midi=(), payment=(), picture-in-picture=(), publickey-credentials-get=(), screen-wake-lock=(), sync-xhr=(self), usb=(), web-share=(), xr-spatial-tracking=(), clipboard-read=(), clipboard-write=(), gamepad=(), hid=(), idle-detection=(), interest-cohort=(), serial=(), unload=()" - name: Cache-Control steps: - type: http method: GET url: '{{.target_site}}' skip_body: true timeout: '{{.request_timeout_in_seconds}}' assertions: - result.statuscode ShouldEqual 200 - result.headers.Cache-Control ShouldNotBeNil - 'result.headers.Cache-Control ShouldEqual "no-store, max-age=0"' - name: Feature-Policy steps: - type: http method: GET url: '{{.target_site}}' skip_body: true info: >- This header has now been renamed to Permissions-Policy in the specification. timeout: '{{.request_timeout_in_seconds}}' assertions: - result.statuscode ShouldEqual 200 - result.headers.Feature-Policy ShouldBeNil - name: Public-Key-Pins steps: - type: http method: GET url: '{{.target_site}}' skip_body: true info: >- This header has been deprecated by all major browsers and is no longer recommended. Avoid using it, and update existing code if possible! timeout: '{{.request_timeout_in_seconds}}' assertions: - result.statuscode ShouldEqual 200 - result.headers.Public-Key-Pins ShouldBeNil - name: Expect-CT steps: - type: http method: GET url: '{{.target_site}}' skip_body: true info: >- This header will likely become obsolete in June 2021. Since May 2018 new certificates are expected to support SCTs by default. Certificates before March 2018 were allowed to have a lifetime of 39 months, those will all be expired in June 2021. timeout: '{{.request_timeout_in_seconds}}' assertions: - result.statuscode ShouldEqual 200 - result.headers.Expect-CT ShouldBeNil - name: X-XSS-Protection steps: - type: http method: GET url: '{{.target_site}}' skip_body: true info: >- The X-XSS-Protection header has been deprecated by modern browsers and its use can introduce additional security issues on the client side. timeout: '{{.request_timeout_in_seconds}}' assertions: - result.statuscode ShouldEqual 200 - result.headers.X-XSS-Protection ShouldBeNilVenom run google.comvenom run --var="target_site=https://google.com" owasp.securityheader.yml
• HTTP security response headers test suites (owasp.securityheader.yml) Venom run owasp.orgvenom run --var="target_site=https://owasp.org" owasp.securityheader.yml
• HTTP security response headers test suites (owasp.securityheader.yml) |
That worked. apparently the install from venom got me the older version |
Happy to have helped you 😉 |
Describe the bug
Test suite returns false negatives when lowercase headers are used
https://www.rfc-editor.org/rfc/rfc7540#section-8.1.2
When running oshp yml with venom
Headers:
strict-transport-security | max-age=63072000; includeSubDomains; preload
x-frame-options | DEN
Actual:
Also I think I found a typo
failed. expected: Not Nil but is was
is supposed to be
failed. expected: Not Nil but **it** was
To Reproduce
Steps to reproduce the behavior:
venom run --var="target_site=https://owasp.org" owasp.securityheader.yml
(I renamed my file)Expected behavior
A clear and concise description of what you expected to happen.
To not not throw false positives when working with headers.
Screenshots
N/A
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: