AI prompts
base on Modlishka. Reverse Proxy. # ..Modlishka..
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 it 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 exactly does this 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.
- Wrap legacy websites with TLS layer, confuse crawler bots and automated scanners, etc.
Modlishka was written as an attempt to 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 an aim to:
- Highlight currently used two factor authentication ([2FA](https://blog.duszynski.eu/phishing-ng-bypassing-2fa-with-modlishka/)) 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.
Features
--------
Key features of Modlishka include:
**General:**
- 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.
- Pattern based JavaScript payload injection.
- Wrapping websites with an extra "security": TLS wrapping, authentication, relevant security headers, etc.
- Stripping websites of 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...
**Security related:**
- Support for majority of 2FA authentication schemes (out of the box).
- Practical implementation of the "[Client Domain Hooking](https://blog.duszynski.eu/client-domain-hooking-in-practice/)" 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":_
Modlishka in action against an example two factor authentication scheme (SMS based bypass proof-of-concept) :
[https://vimeo.com/308709275](https://vimeo.com/308709275)
Installation
------------
Latest source code version can be fetched from [here](https://github.com/drk1wi/modlishka/zipball/master) (zip) or [here](https://github.com/drk1wi/modlishka/tarball/master) (tar).
Fetch the code with _'go install'_ :
$ go install github.com/drk1wi/Modlishka@latest
Compile manually:
$ git clone https://github.com/drk1wi/Modlishka.git
$ cd Modlishka
$ make
------
![alt text](https://github.com/drk1wi/assets/raw/master/0876a672f771046e833f2242f6be5d3cf01519efdbb9dad0e1ed2d33e33fecbc.png)
# ./dist/proxy -h
Usage of ./dist/proxy:
-cert string
base64 encoded TLS certificate
-certKey string
base64 encoded TLS certificate key
-certPool string
base64 encoded Certification Authority certificate
-config string
JSON configuration file. Convenient instead of using command line switches.
-controlCreds string
Username and password to protect the credentials page. user:pass format
-controlURL string
URL to view captured credentials and settings. (default "SayHello2Modlishka")
-credParams string
Credential regexp with matching groups. e.g. : base64(username_regex),base64(password_regex)
-debug
Print debug information
-disableSecurity
Disable proxy security features like anti-SSRF. 'Here be dragons' - disable at your own risk.
-dynamicMode
Enable dynamic mode for 'Client Domain Hooking'
-forceHTTP
Strip all TLS from the traffic and proxy through HTTP only
-forceHTTPS
Strip all clear-text from the traffic and proxy through HTTPS only
-jsRules string
Comma separated list of URL patterns and JS base64 encoded payloads that will be injected - e.g.: target.tld:base64(alert(1)),..,etc
-listeningAddress string
Listening address - e.g.: 0.0.0.0 (default "127.0.0.1")
-log string
Local file to which fetched requests will be written (appended)
-plugins string
Comma seperated list of enabled plugin names (default "all")
-proxyAddress string
Proxy that should be used (socks/https/http) - e.g.: http://127.0.0.1:8080
-proxyDomain string
Proxy domain name that will be used - e.g.: proxy.tld
-postOnly
Log only HTTP POST requests
-rules string
Comma separated list of 'string' patterns and their replacements - e.g.: base64(new):base64(old),base64(newer):base64(older)
-target string
Target domain name - e.g.: target.tld
-targetRes string
Comma separated list of domains that were not translated automatically. Use this to force domain translation - e.g.: static.target.tld
-terminateTriggers string
Session termination: Comma separated list of URLs from target's origin which will trigger session termination
-terminateUrl string
URL to which a client will be redirected after Session Termination rules trigger
-trackingCookie string
Name of the HTTP cookie used to track the client (default "id")
-trackingParam string
Name of the HTTP parameter used to track the client (default "id")
Commercial Usage
-------
Modlishka is licensed under [this License](https://raw.githubusercontent.com/drk1wi/Modlishka/master/LICENSE).
For commercial, legitimate applications, please contact the author for the appropriate licensing arrangements.
Credits
-------
Author: Modlishka was designed and implemented by Piotr Duszyński ([@drk1wi](https://twitter.com/drk1wi)). All rights reserved.
See the list of [contributors](https://github.com/drk1wi/Modlishka/graphs/contributors) who participated in this project.
* sentence copied directly from another project .
Disclaimer
----------
This tool is made only for educational purposes and can be used in legitimate penetration tests or research only. Author does not take any responsibility for any actions taken by its users.
", Assign "at most 3 tags" to the expected json: {"id":"7857","tags":[]} "only from the tags list I provide: [{"id":77,"name":"3d"},{"id":89,"name":"agent"},{"id":17,"name":"ai"},{"id":54,"name":"algorithm"},{"id":24,"name":"api"},{"id":44,"name":"authentication"},{"id":3,"name":"aws"},{"id":27,"name":"backend"},{"id":60,"name":"benchmark"},{"id":72,"name":"best-practices"},{"id":39,"name":"bitcoin"},{"id":37,"name":"blockchain"},{"id":1,"name":"blog"},{"id":45,"name":"bundler"},{"id":58,"name":"cache"},{"id":21,"name":"chat"},{"id":49,"name":"cicd"},{"id":4,"name":"cli"},{"id":64,"name":"cloud-native"},{"id":48,"name":"cms"},{"id":61,"name":"compiler"},{"id":68,"name":"containerization"},{"id":92,"name":"crm"},{"id":34,"name":"data"},{"id":47,"name":"database"},{"id":8,"name":"declarative-gui "},{"id":9,"name":"deploy-tool"},{"id":53,"name":"desktop-app"},{"id":6,"name":"dev-exp-lib"},{"id":59,"name":"dev-tool"},{"id":13,"name":"ecommerce"},{"id":26,"name":"editor"},{"id":66,"name":"emulator"},{"id":62,"name":"filesystem"},{"id":80,"name":"finance"},{"id":15,"name":"firmware"},{"id":73,"name":"for-fun"},{"id":2,"name":"framework"},{"id":11,"name":"frontend"},{"id":22,"name":"game"},{"id":81,"name":"game-engine "},{"id":23,"name":"graphql"},{"id":84,"name":"gui"},{"id":91,"name":"http"},{"id":5,"name":"http-client"},{"id":51,"name":"iac"},{"id":30,"name":"ide"},{"id":78,"name":"iot"},{"id":40,"name":"json"},{"id":83,"name":"julian"},{"id":38,"name":"k8s"},{"id":31,"name":"language"},{"id":10,"name":"learning-resource"},{"id":33,"name":"lib"},{"id":41,"name":"linter"},{"id":28,"name":"lms"},{"id":16,"name":"logging"},{"id":76,"name":"low-code"},{"id":90,"name":"message-queue"},{"id":42,"name":"mobile-app"},{"id":18,"name":"monitoring"},{"id":36,"name":"networking"},{"id":7,"name":"node-version"},{"id":55,"name":"nosql"},{"id":57,"name":"observability"},{"id":46,"name":"orm"},{"id":52,"name":"os"},{"id":14,"name":"parser"},{"id":74,"name":"react"},{"id":82,"name":"real-time"},{"id":56,"name":"robot"},{"id":65,"name":"runtime"},{"id":32,"name":"sdk"},{"id":71,"name":"search"},{"id":63,"name":"secrets"},{"id":25,"name":"security"},{"id":85,"name":"server"},{"id":86,"name":"serverless"},{"id":70,"name":"storage"},{"id":75,"name":"system-design"},{"id":79,"name":"terminal"},{"id":29,"name":"testing"},{"id":12,"name":"ui"},{"id":50,"name":"ux"},{"id":88,"name":"video"},{"id":20,"name":"web-app"},{"id":35,"name":"web-server"},{"id":43,"name":"webassembly"},{"id":69,"name":"workflow"},{"id":87,"name":"yaml"}]" returns me the "expected json"