evilginx2 icon indicating copy to clipboard operation
evilginx2 copied to clipboard

Fix for force_post to allow interception without evilginx session

Open stephenbradshaw opened this issue 1 year ago • 3 comments

This is a fix for an issue where EvilGinx will not do force_post replacement for requests to a phished domain if cookies (in particular the EvilGinx session cookie) are not included with the request. This is breaking proper interception of authentication flows where for example part of the process has a request made using JavaScript without adding cookies.

An example affected issue is here:

https://github.com/kgretzky/evilginx2/issues/1031

Have fixed by moving the existing force_post code into its own if branch that does not check for a evilginx session and adding a requirement for the request method to be "POST" - figured that since force_post has its own fairly specific conditions for matching requests that the session requirement can be overlooked

stephenbradshaw avatar May 20 '24 02:05 stephenbradshaw

It works like a charm with this. Let's go merging this @kgretzky.

n3rada avatar Aug 26 '24 14:08 n3rada

I will point out here that responses to the POST don't get captured by EvilGinx if they happen to have any authentication tokens even with this fix because of the missing session cookie. So if thats important to you, you might need to instead do some modification of whatever client side JavaScript code is generating the POST to include cookies so that things work as expected with EvilGinx sessions.

stephenbradshaw avatar Aug 28 '24 01:08 stephenbradshaw

My use case was to modify one of the keys of an outgoing POST request. Thanks for mentioning it though.

n3rada avatar Aug 28 '24 09:08 n3rada