+++ title = "HTTPX" chapter = false weight = 103 +++ ## Summary Advanced HTTP profile with malleable configuration support and message transforms for enhanced OPSEC. Based on the httpx C2 profile with extensive customization options. ### Profile Options #### Callback Domains Array of callback domains to communicate with. Supports multiple domains for redundancy and domain rotation. **Example:** `https://example.com:443,https://backup.com:443` #### Domain Rotation Domain rotation pattern for handling multiple callback domains: - **fail-over**: Uses each domain in order until communication fails, then moves to the next - **round-robin**: Cycles through domains for each request - **random**: Randomly selects a domain for each request #### Failover Threshold Number of consecutive failures before switching to the next domain in fail-over mode. **Default:** 5 #### Callback Interval in seconds Time to sleep between agent check-ins. **Default:** 10 #### Callback Jitter in percent Randomize the callback interval within the specified threshold. **Default:** 23 #### Encrypted Exchange Check **Required:** Must be true. The HTTPX profile uses RSA-4096 key exchange (EKE) for secure communication and cannot operate without it. This ensures all traffic is encrypted with client-side generated keys. **Default:** true (Cannot be disabled) #### Kill Date The date at which the agent will stop calling back. **Default:** 365 days from build #### Raw C2 Config JSON configuration file defining malleable profile behavior. If not provided, uses default configuration. ### proxy_host Proxy server hostname or IP address for outbound connections. **Example:** `proxy.company.com` ### proxy_port Proxy server port number. **Example:** `8080` ### proxy_user Username for proxy authentication (if required). ### proxy_pass Password for proxy authentication (if required). ### domain_front Domain fronting header value. Sets the `Host` header to this value for traffic obfuscation. **Example:** `cdn.example.com` ### timeout Request timeout in seconds for HTTP connections. **Default:** `240` ## Security: RSA Key Exchange (EKE) The HTTPX profile implements EKE using client-side generated RSA keys for secure communication: - **RSA Key Size:** 4096-bit key pairs generated on the agent side - **Exchange Process:** Agent generates an RSA keypair and sends the public key to Mythic, which responds with an encrypted session key - **Security:** All communication is encrypted using this negotiated session key - **Requirement:** EKE is mandatory and cannot be disabled in the HTTPX profile This ensures that even if the communication is intercepted, without the private key on the agent, the traffic remains encrypted. ## Malleable Profile Configuration The httpx profile supports extensive customization through malleable profiles defined in JSON format. ### Configuration Structure ```json { "name": "Profile Name", "get": { "verb": "GET", "uris": ["/api/status", "/health"], "client": { "headers": { "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36", "Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8" }, "parameters": { "version": "1.0", "format": "json" }, "message": { "location": "query", "name": "data" }, "transforms": [ { "action": "base64", "value": "" } ] }, "server": { "headers": { "Content-Type": "application/json", "Server": "nginx/1.18.0" }, "transforms": [ { "action": "base64", "value": "" } ] } }, "post": { "verb": "POST", "uris": ["/api/data", "/submit"], "client": { "headers": { "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36", "Content-Type": "application/x-www-form-urlencoded" }, "message": { "location": "body", "name": "" }, "transforms": [ { "action": "base64", "value": "" } ] }, "server": { "headers": { "Content-Type": "application/json", "Server": "nginx/1.18.0" }, "transforms": [ { "action": "base64", "value": "" } ] } } } ``` ### Message Locations Messages can be placed in different parts of HTTP requests: - **body**: Message in request body (default for POST) - **query**: Message as query parameter - **header**: Message in HTTP header - **cookie**: Message in HTTP cookie ### Transform Actions The following transform actions are supported: #### base64 Standard Base64 encoding/decoding. #### base64url URL-safe Base64 encoding/decoding (uses `-` and `_` instead of `+` and `/`). #### netbios NetBIOS encoding (lowercase). Each byte is split into two nibbles and encoded as lowercase letters. #### netbiosu NetBIOS encoding (uppercase). Each byte is split into two nibbles and encoded as uppercase letters. #### xor XOR encryption with specified key. **Example:** ```json { "action": "xor", "value": "mysecretkey" } ``` #### prepend Prepend data with specified value. **Example:** ```json { "action": "prepend", "value": "prefix" } ``` #### append Append data with specified value. **Example:** ```json { "action": "append", "value": "suffix" } ``` ### Transform Chains Transforms are applied in sequence. For client transforms, they are applied in order. For server transforms, they are applied in reverse order to decode the data. **Example Transform Chain:** ```json "transforms": [ { "action": "xor", "value": "secretkey" }, { "action": "base64", "value": "" }, { "action": "prepend", "value": "data=" } ] ``` ## Example Malleable Profiles ### Microsoft Update Profile ```json { "name": "Microsoft Update", "get": { "verb": "GET", "uris": [ "/msdownload/update/v3/static/trustedr/en/authrootstl.cab", "/msdownload/update/v3/static/trustedr/en/disallowedcertstl.cab" ], "client": { "headers": { "Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8", "Accept-Encoding": "gzip, deflate", "Connection": "Keep-Alive", "Cache-Control": "no-cache", "User-Agent": "Microsoft-CryptoAPI/10.0" }, "parameters": null, "message": { "location": "query", "name": "cversion" }, "transforms": [ { "action": "base64url", "value": "" } ] }, "server": { "headers": { "Content-Type": "application/vnd.ms-cab-compressed", "Server": "Microsoft-IIS/10.0", "X-Powered-By": "ASP.NET", "Connection": "keep-alive", "Cache-Control": "max-age=86400" }, "transforms": [ { "action": "xor", "value": "updateKey2025" }, { "action": "base64", "value": "" }, { "action": "prepend", "value": "MSCF\u0000\u0000\u0000\u0000" }, { "action": "append", "value": "\u0000\u0000\u0001\u0000\u0000\u0000\u0000\u0000" } ] } }, "post": { "verb": "POST", "uris": [ "/msdownload/update/v3/static/feedbackapi/en/feedback.aspx" ], "client": { "headers": { "Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8", "Accept-Encoding": "gzip, deflate", "Connection": "Keep-Alive", "Content-Type": "application/x-www-form-urlencoded", "User-Agent": "Microsoft-CryptoAPI/10.0" }, "parameters": null, "message": { "location": "body", "name": "feedback" }, "transforms": [ { "action": "xor", "value": "feedbackKey" }, { "action": "base64", "value": "" } ] }, "server": { "headers": { "Content-Type": "text/html; charset=utf-8", "Server": "Microsoft-IIS/10.0", "X-Powered-By": "ASP.NET", "Connection": "keep-alive", "Cache-Control": "no-cache, no-store" }, "transforms": [ { "action": "xor", "value": "responseKey" }, { "action": "base64", "value": "" }, { "action": "prepend", "value": "