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

fixed token capture logic for tokens with expiry set to 0 #571

Merged
merged 1 commit into from
Feb 8, 2021

Conversation

michaelmagyar
Copy link
Contributor

The new logic to avoid capturing empty or expired cookies was missing the case where the cookie expiry is set to 0 (cookie to be deleted by browser on exit). That is a common value for session tokens and is used by GitHub, Office 365, etc., so the existing logic broke token capture for those phishlets.

This pull request fixes the logic such that:

  • the cookie cannot be empty
  • the cookie cannot be expired (but can be zero)

This is accomplished by checking for cookies that are set to zero expiry and allowing them. If they are not zero, then the expiry must be in the future.

@michaelmagyar michaelmagyar changed the title fixed token capture logic to still capture session tokens with expiry… fixed token capture logic for tokens with expiry set to 0 Feb 8, 2021
Copy link
Owner

@kgretzky kgretzky left a comment

Choose a reason for hiding this comment

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

Thanks for fixing! That is an awful bug on my part.

@kgretzky kgretzky merged commit 511860c into kgretzky:master Feb 8, 2021
@michaelmagyar michaelmagyar deleted the token-capture-fix branch February 9, 2021 00:35
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