Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 41 additions & 0 deletions docs/_docs/user-guide/imix.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,47 @@ Imix has run-time configuration, that may be specified using environment variabl
| IMIX_BEACON_ID | The identifier to be used during callback (must be globally unique) | Random UUIDv4 | No |
| IMIX_LOG | Log message level for debug builds. See below for more information. | INFO | No |

## Advanced Configuration (IMIX_CONFIG)

For more complex setups, such as configuring multiple transports or specifying detailed transport options, you can use the `IMIX_CONFIG` environment variable. This variable accepts a YAML-formatted string.

**Note:** When `IMIX_CONFIG` is set, you cannot use `IMIX_CALLBACK_URI`, `IMIX_CALLBACK_INTERVAL`, or `IMIX_TRANSPORT_EXTRA_*`. All configuration must be provided within the YAML structure.

### YAML Structure

```yaml
transports:
- URI: <string>
type: <grpc|http1|dns>
interval: <integer> # optional, seconds
extra: <json_string> # required (use "" if none)
server_pubkey: <string> # optional
```

### Example: Multiple Transports

This example configures Imix to use two transports:
1. A gRPC transport over HTTP.
2. A DNS transport as a fallback or alternative.

```bash
export IMIX_CONFIG='
transports:
- URI: "http://127.0.0.1:8000"
type: "grpc"
interval: 5
extra: ""
- URI: "dns://8.8.8.8:53"
type: "dns"
interval: 10
extra: "{\"domain\": \"c2.example.com\", \"type\": \"txt\"}"
server_pubkey: "YOUR_SERVER_PUBKEY_HERE"
'

# Build with the configuration
cargo build --release --bin imix
```

## DNS Transport Configuration

The DNS transport enables covert C2 communication by tunneling traffic through DNS queries and responses. This transport supports multiple DNS record types (TXT, A, AAAA) and can use either specific DNS servers or the system's default resolver with automatic fallback.
Expand Down
Loading