- Merlin Server - The program that receives and handles Agent traffic and operator CLI commands to control the server and Agents
- Merlin Agent - The post-exploitation command and control Agent that runs on a compromised host
- Merlin CLI - The command line interface that allows operators to interact with the Merlin Server and Agents
This page covers the Merlin Server program
Command Line Flags
addr
The default address is
127.0.0.1:50051addr flag specifies the address to listen on for Merlin CLI connections. This IS NOT the interface for Merlin
Agents to connect to. The Merlin Server uses gRPC over TLS for CLI connections.
debug
Thedebug flag enables the debug log level for the Merlin Server and writes debug logs to the log file at
data/log/merlinServerLog.txt.
extra
Theextra flag enables the extra log level for the Merlin Server and writes extra debug logs to the log file at
data/log/merlinServerLog.txt. The extra level inherently enables the debug and trace levels as well.
This level is primarily used to log HTTP requests and responses that contain a lot of data.
password
Thepassword flag sets the password that Merlin CLI clients need in order to authenticate all gRPC requests.
secure
Thesecure flag enables mutual TLS authentication requiring Merlin CLI clients to authenticate to the server.
Use the tlsCA flag to provide a Certificate Authority file to verify client certificates.
tlsCA
ThetlsCA flag specifies the path to a Certificate Authority file to verify client certificates when the secure flag is set.
tlsCert
The Server will auto generate a self-signed TLS certificate if one is not provided
tlsCert flag specifies the path to a TLS certificate file for the Server to use for TLS connections.
tlsKey
ThetlsKey flag specifies the path to a TLS private key file for the Server to use for TLS connections.
trace
Thetrace flag enables the trace log level for the Merlin Server and writes trace logs to the log file at
data/log/merlinServerLog.txt. The trace level inherently enables the debug level as well.
This level is primarily used to log the entry and exit of functions to troubleshoot.
version
Theversion flag prints the version number of the Merlin Server and exits.
Logging
The Server typically requires administrative privileges so that it can bind to an interface and TCP port.
The log file will be created with the permissions of the user that started the Merlin Server.
data/log directory called merlinServerLog.txt and ALSO writes
messages to STDOUT where the server was executed. The default logging level is INFO. Use the debug, trace,
and extra flags to enable more verbose logging.
Mutual TLS
The Merlin Server can be configured to use mutual TLS authentication with the Merlin CLI (not for Merlin Agent connections). Use thesecure flag to enable mutual TLS authentication and the tlsCA flag to provide a Certificate Authority
file that was used to sign the client certificates.