mirror of
https://github.com/kgretzky/evilginx2.git
synced 2026-04-25 00:36:10 +03:00
[PR #1155] fixed: handle all optional cookies for given domain #177
Labels
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/evilginx2-kgretzky#177
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/kgretzky/evilginx2/pull/1155
Author: @callightmn
Created: 1/13/2025
Status: 🔄 Open
Base:
master← Head:fix/opt_tokens📝 Commits (1)
d2bb9c7fixed: support optional cookie even if single one for domain📊 Changes
1 file changed (+3 additions, -1 deletions)
View changed files
📝
core/session.go(+3 -1)📄 Description
This quick fix makes it possible, in the absence of authorization URL, to mark all cookie tokens as optional for a given
domainwhile having other mandatory tokens, that is http or body tokens, or even non-optional cookie tokens for anotherdomain.Code analysis:
In the edge case where all cookie tokens are optional and no authorization URL is provided, Evilginx will indeed never consider the session as finished since
AllCookieAuthTokensCapturedwill always returnfalse. This is because thetcopyarray will contain from the start (firstfor) an empty array which will never be deleted (secondfor). In the absence of authorization URL, Evilginx currently stores sessions in the database only if this function returnstrueat some point, which means in this case, sessions will not be displayed even though all mandatory tokens have been captured.Example:
Without the fix:

With the fix:

NB: In this case, the optional cookie is delivered before the (mandatory) body token, which is why we see it displayed in the session information. If it had been delivered after the body token, it wouldn't have been displayed at all:
In this last case, the only way to capture the optional cookie is to use an authorization URL.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.