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

Capture credentials in multipart/form-data #1152

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

Conversation

callightmn
Copy link

This PR adds support to :

  • Capture credentials in multipart POST requests (with type: 'post/multipart' in credentials section)
  • Fix: Prevent conflicts between captured credentials of different types with the same name (matching the same regex/key)
  • Patch URL (from phishing to original)
  • Force parameters (with type: 'post/multipart' in force_post section)
  • Proxy incoming files (if any, even though it may not be useful in proxying login requests)

Capture creds:

Phishlet section:

credentials:
  username:
    key: 'email'
    search: '(.*)'
    type: 'post/multipart'
  password:
    key: 'code'
    search: '(.*)'
    type: 'post/multipart'

Request:

image

Evilginx:

image

NB: As said above, incoming phishing URLs will be converted to original/legitimate ones similarly to what is done for regular POST requests (application/x-www-form-urlencoded). Files (if any) are also proxied. The resulting Content-Length is computed by creating a new multipart body (with the same boundary).

Force parameters:

Phishlet section:

force_post:
   - path: '/api/signup.checkEmail'
     search:
     - {key: 'email', search: '.*'}
     force:
       - {key: 'email', value: '[email protected]'}
     type: 'post/multipart'

Incoming request (sent by the browser to Evilginx through Burp):

image

Outgoing request (sent by Evilginx to the original site through Burp):

image

NB: Parameter names for files can be used as search key but the value will be ignored.

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