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

Update http_cookies #351

Merged
merged 1 commit into from
Apr 27, 2021
Merged

Conversation

tsellers-r7
Copy link
Contributor

@tsellers-r7 tsellers-r7 commented Apr 26, 2021

Description

This PR updates http_cookies by:

  • Adding missing examples
  • Re-ordering some of the matches to improve metrics
  • Removing unnecessary captures where the value doesn't change.

Motivation and Context

Improving fingerprints

How Has This Been Tested?

rspec

Checklist:

  • I have updated the documentation accordingly (or changes are not required).
  • I have added tests to cover my changes (or new tests are not required).
  • All new and existing tests passed.

<fingerprint pattern="^__cfd?uid=">
<description>CloudFlare web load balancer endpoint</description>
<example>__cfuid=1337</example>
<example>__cfduid=dd450f2431e1e611a61a15f68974de9a41618794671; expires=Wed, 19-May-21 01:11:11 GMT; path=/; domain=.foo.bar; HttpOnly; SameSite=Lax</example>
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fingerprint moved up due to frequency of observation. Coverage for __cfduid added

<param pos="0" name="service.cpe23" value="cpe:/a:php:php:-"/>
</fingerprint>

<fingerprint pattern="^(ASPSESSIONID[A-Z]+|ASP\.NET_SessionId|\.ASPXANONYMOUS)=.*">
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This and above moved up for performance reasons

@tsellers-r7
Copy link
Contributor Author

FYI @hdm

@hdm
Copy link
Contributor

hdm commented Apr 26, 2021

Thanks!

@hdm
Copy link
Contributor

hdm commented Apr 26, 2021

This LGTM at first glance. We may want to consider normalizing cookies in the future so that we parse each cookie separately vs the entire Set-Cookie header, as the order of cookies can change. Any anchors (^) might not be valid when there is an application cookie set first.

@tsellers-r7 tsellers-r7 merged commit a3aa379 into rapid7:master Apr 27, 2021
@tsellers-r7 tsellers-r7 deleted the update_http_cookies branch April 27, 2021 17:50
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.

2 participants