Skip to main content

Parameters

The array of parameters shown here are the ones that are presented to the operator when building their payload. These should be things that the Payload will need in order to successfully talk through your C2 Profile.
What if your Server and Payload need some shared piece of data? There’s a ConfigCheck function that’s called that you can define here that will provide the full payload configuration. You can take this config and update something on your server-side configuration to keep parity between the two.
parameters example

Parameter Components

So what are all these components in the Parameter definitions?
  • name - What is the name of the parameter
    • this is how you’ll get the value for this parameter during build time
  • description - The long form description of what this value means
  • default_value - What is the default value for this parameter
  • verifier_regex - Optional feature you can use to provide a regex that indicates if a value is valid or not for the operator
  • required - Is this field required for the operator to fill out
  • parameter_type - What type of parameter is this:
    • String - you get a string value
    • ChooseOne`` - you get a string` value
    • ChooseOneCustom - you get a string value
    • ChooseMultiple - you get an array of string values
    • Array - you get an array of string values
    • Date - you get a string representation of the Date as YYYY-MM-DD
    • Dictionary - you get a dictionary representation, or map[string]string in Go
    • Boolean - you get a bool value
    • TypedArray - you get an array of tuples
      • this will either be something like [ ["type", "value"], ["type", "value"] ] if the UI modal was used
      • this will be something like [ ["", "user typed"], ["", "user typed"] ] and sent to your typed_array_parse function in the case that the user just typed something and needs parsing into the above format
    • File - you will get a string UUIDv4 value that you can use to upload/download via chunking
    • FileMultiple - you will get an array of string UUIDv4 values that you can use to upload/download via chunking
    • Number - you will get an int in Python and a float64 in Go by default

Mythic 4.0 parameter fields

C2 parameters now support the same display and conditional form capabilities as payload build parameters:
OtherParameters contains the values currently selected for the other C2 parameters. Return Choices when the label equals the value, or ComplexChoices when operators should see a friendly label while the payload receives a different value.
  • display_name preserves a stable internal name while improving the form label.
  • choices_display_names supplies labels for static choice values.
  • group_name and ui_position organize the builder form.
  • hide_conditions accepts eq, neq, in, nin, lt, gt, lte, gte, sw, ew, co, and nco.
  • dynamic_query_function supplies service-backed choices.
  • ParameterType.JSONString plus json_string_schema provides a structured visual/source JSON editor.
See JSONString Parameters for the schema vocabulary and Python/Go constants.