A powerful and flexible HTTP reverse proxy
Modlishka is a powerful and flexible HTTP reverse proxy. It implements an entirely new and interesting approach of handling browser-based HTTP traffic flow, which allows to transparently proxy multi-domain destination traffic, both TLS and non-TLS, over a single domain, without a requirement of installing any additional certificate on the client. What does this exactly mean? In short, it simply has a lot of potential, that can be used in many use case scenarios...
From the security perspective, Modlishka can be currently used to:
Support ethical phishing penetration tests with a transparent and automated reverse proxy component that has a universal 2FA “bypass” support.
Automatically poison HTTP 301 browsers cache and permanently hijack non-TLS URLS.
Diagnose and hijack browser-based applications HTTP traffic from the "Client Domain Hooking" attack perspective.
Wrap legacy websites with TLS layer, confuse crawler bots and automated scanners, etc.
Modlishka was written as an attempt overcome standard reverse proxy limitations and as a personal challenge to see what is possible with sufficient motivation and a bit of extra research time. The achieved results appeared to be very interesting and the tool was initially released and later updated with aim to:
Highlight currently used two factor authentication (2FA) scheme weaknesses, so adequate security solutions can be created and implemented by the industry.
Support other projects that could benefit from a universal and transparent reverse proxy.
Raise community awareness about modern phishing techniques and strategies and support penetration testers in their daily work.
Modlishka was primarily written for security related tasks. Nevertheless, it can be helpful in other, non-security related, usage scenarios.
Efficient proxying !
Some of the most important 'Modlishka' features :
Point-and-click HTTP and HTTPS reverse proxying of an arbitrary domain/s.
Full control of "cross" origin TLS traffic flow from your users browsers (without a requirement of installing any additional certificate on the client).
Easy and fast configuration through command line options and JSON configuration files.
Wrapping websites with an extra "security": TLS wrapping, authentication, relevant security headers, etc.
Striping websites from all encryption and security headers (back to 90's MITM style).
Stateless design. Can be scaled up easily to handle an arbitrary amount of traffic - e.g. through a DNS load balancer.
Can be extended easily with your ideas through modular plugins.
Automatic test TLS certificate generation plugin for the proxy domain (requires a self-signed CA certificate)
Written in Go, so it works basically on all platforms and architectures: Windows, OSX, Linux, BSD supported...
Support for majority of 2FA authentication schemes (out of the box).
Practical implementation of the "Client Domain Hooking" attack. Supported with a diagnostic plugin.
User credential harvesting (with context based on URL parameter passed identifiers).
Web panel plugin with a summary of automatically collected credentials and one-click user session impersonation module (proof-of-concept/beta).
No website templates (just point Modlishka to the target domain - in most cases, it will be handled automatically without any additional manual configuration).
Proxying In Action (2FA bypass)
"A picture is worth a thousand words":
add Modlishka to NAS $PATH on installation
use command line (no automatic startup or preconfiguration)
[~] # Modlishka -h
Usage of Modlishka:
base64 encoded TLS certificate
base64 encoded TLS certificate key
base64 encoded Certification Authority certificate
JSON configuration file. Convenient instead of using command line switches.
Credential regexp with matching groups. e.g. : baase64(username_regex),baase64(password_regex)
Print extra debug information
Disable proxy security features like anti-SSRF. 'Here be dragons' - disable at your own risk.
Enable dynamic mode for 'Client Domain Hooking'
Strip all TLS from the traffic and proxy through HTTP only
Strip all clear-text from the traffic and proxy through HTTPS only
Comma separated list of URL patterns and JS base64 encoded payloads that will be injected - e.g.: target.tld:base64(alert(1)),..,etc
Listening address - e.g.: 0.0.0.0 (default "127.0.0.1")
Local file to which fetched requests will be written (appended)
Comma separated list of enabled plugin names (default "all")
Log only HTTP POST requests
Proxy domain name that will be used - e.g.: proxy.tld
Comma separated list of 'string' patterns and their replacements - e.g.: base64(new):base64(old),base64(newer):base64(older)
Target domain name - e.g.: target.tld
Comma separated list of domains that were not translated automatically. Use this to force domain translation - e.g.: static.target.tld
Session termination: Comma separated list of URLs from target's origin which will trigger session termination
URL to which a client will be redirected after Session Termination rules trigger
Name of the HTTP cookie used for track the client (default "id")
Name of the HTTP parameter used to set up the HTTP cookie tracking of the client (default "id")
TIP ME !!
Your gratitude and finance will help me to continue integration of this QPKG and maintain up to date versions.