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

Ability to send captured sessions to gophish (needs gophish update) #1133

Closed
wants to merge 2 commits into from

Conversation

callightmn
Copy link

@callightmn callightmn commented Oct 24, 2024

Hello there,

By default, Evilginx does not send session information to Gophish. This is on purpose not to expose credentials and keep them in Evilginx only. Nevertheless, having credentials readily available in Gophish could be a nice feature to have, provided Gophish's admin interface is properly secured (with a firewall for instance).

The main (second) commit introduces the ability to send captured sessions to Gophish via a config flag (config gophish sessions). This is an opt-in feature to keep the default behavior, which does not expose credentials and keeps them in Evilginx only.

NB: This update requires the ability for Gophish to receive session information (see kgretzky/gophish#3).

Default behavior (or after config gophish sessions false in Evilginx' terminal):

Capture d’écran 2024-10-24 à 23 48 54

After config gophish sessions true in Evilginx' terminal:

Capture d’écran 2024-10-24 à 23 51 10

The feature takes into account all three types of credentials (username, password and custom) and all three types of auth_tokens (cookies, body and HTTP tokens).


The first commit contains two fixes regarding request interception and HTTP token capture.

Request interception:

The value of req.Host contains the legitimate remote host and not the phishing host anymore after commit e3bef9433c3cc95d3e523533e498c834506739f0 enabling the capture of credentials in intercepted requests. The comparison fails and the request is not intercepted.

HTTP token capture:

The header should be captured from the response (resp.Header) and not the request (resp.Request.Header). The check should not be performed on every endpoint, but taking into account the domain and path specified in the phishlet (v.domain and v.path).

@callightmn callightmn changed the title fixed: request interception and http token capture Fix for request interception and HTTP token capture + ability to send captured sessions to gophish (need gophish update) Oct 24, 2024
@callightmn callightmn changed the title Fix for request interception and HTTP token capture + ability to send captured sessions to gophish (need gophish update) Ability to send captured sessions to gophish (need gophish update) Oct 24, 2024
@callightmn callightmn marked this pull request as draft October 24, 2024 20:54
@callightmn callightmn marked this pull request as ready for review October 24, 2024 22:10
@callightmn callightmn marked this pull request as draft October 24, 2024 22:10
@callightmn callightmn changed the title Ability to send captured sessions to gophish (need gophish update) Ability to send captured sessions to gophish (needs https://github.com/kgretzky/gophish/pull/3) Oct 24, 2024
@callightmn callightmn changed the title Ability to send captured sessions to gophish (needs https://github.com/kgretzky/gophish/pull/3) Ability to send captured sessions to gophish (needs gophish update) Oct 24, 2024
@callightmn callightmn closed this Oct 24, 2024
@callightmn
Copy link
Author

Closed as already done by #1081.

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.

1 participant