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

Feature: Phishlet-Specific redirect URL #932

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

aalex954
Copy link

@aalex954 aalex954 commented Jul 24, 2023

This feature adds the ability to define phishlet-specific redirect URLs in the phishlet's .yaml file.
If a phishlet-specific redirect URL is available for the current request's host it will supersede the global redirect URL.

Redirect URLs continue to work as normal otherwise.

When running multiple campaigns or phishlets it may be useful to have the ability to present different redirect pages for unauthorized requests. Presenting different redirect_url pages may help with limiting the association of the redirect_url page for one phishlet with the overall campaign.

This feature was built into the core/http_proxy.go/blockRequest() function as to modify as little as possible.

The core/phishlets.go file was modified to accept a new variable from the phishlet .yaml configuration.

  • struct Phishlet
  • struct ConfigPhishlet
  • func Clear
  • func LoadFromFile

The phishlets/example.yaml was also modified to include "https://example.com" as the example for the redirect_url parameter.

Linked to feature request #915

Test Cases:

image

Added parameter redirect_url to the Phishlets model.
Added configuration to the ConfigPhishlet struct.
Added check for Phishlet redirect_url parameter in the blockRequest function. The redirect_url defined in the phishlet configuration file will supersede the global redirect_url parameter.
Added redirect_url parameter to the example phishlet yaml config file.
…et url override logic in the http_proxy/blockRequests
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