Skip to main content
Dynamic command parameters let a payload type calculate the choices shown to an operator when a tasking modal opens. Use them when the valid values depend on callback state, another parameter, Mythic data, or an external service. Dynamic queries run before a task exists. They can query Mythic by callback, but cannot use task-scoped RPC calls.

Define a query

Set dynamic_query_function on a ChooseOne or ChooseMultiple command parameter. The function receives a PTRPCDynamicQueryFunctionMessage and returns a PTRPCDynamicQueryFunctionMessageResponse.
OtherParameters contains the current values of the other fields in the modal. This lets one dynamic choice depend on an earlier operator selection.

Request fields

The request contains: Return Success=True and a Choices list. Return Success=False with Error when the choices could not be generated. An empty successful list means there are currently no valid choices. Mythic 4.0 also supports dynamic queries for payload build parameters and C2 profile parameters. Those definitions can return complex choices with separate stored and display values. See Dynamic Build Parameters and C2 Profile Parameters.