Mitm
In Egern, Mitm
provides the functionality for man-in-the-middle (MitM) attacks on HTTPS traffic. By decrypting and re-encrypting the traffic, it enables control over HTTP(S) requests, such as intercepting, modifying, and resending requests.
Configuration Instructions
Below are the configuration fields for Mitm
:
Field Name | Type | Required | Description |
---|---|---|---|
enabled | boolean | Yes | Whether to enable MitM. |
ca_p12 | string | Yes | Path to the CA certificate file. This certificate is used to establish trust between Egern and the target server, as well as for decrypting and re-encrypting the traffic. |
ca_passphrase | string | Yes | Password for the CA certificate. |
hostnames | array of strings | No | A list of hostnames to restrict the MitM functionality. Only hostnames listed here will be intercepted by MitM. |
Configuration Example
Here is an example configuration for Mitm
:
mitm:
enabled: true
ca_p12: "/path/to/ca.p12"
ca_passphrase: "your_passphrase"
hostnames:
- "example.com"
In this configuration, we enable the MitM feature, specify the path and password for the CA certificate, and restrict MitM to only intercept traffic from the example.com
hostname.