Build Parameters
Build parameters are defined on a payload type’s definition and allow you to configure a payload build in a way outside of C2 specific configurations. These parameters are defined in an array with a few specific fields. Below are examples in Python and Go:- Python
- Go
name
- the name of the parameter (this is required)description
- the description of the parameter - this is displayed along with the name to give users more context about what the parameter is doingrequired
- this indicates if the user is required to specify something or notparameter_type
- this is the type of value for this and can be boolean, number, choose one, choose multiple, file, string, dictionary, date, array (of strings), array of filesdefault_value
- the default value for the fieldchoices
- a list of choices to present for a choose one or choose multiple displaysupported_os
- optional list of strings of operating systems that work with this parameter. This is the same “OS” selection that you specify as part of your supported os for the payload type definition. For example, if this is “Linux”, but the user selected “macOS”, then this option will NOT be presented to the user.group_name
- optional name you can specify to group parameters together logically in the UIhide_conditions
- an optional list of HideConditions (only one element in the hide condition needs to be true for the entire thing to be hidden)
Hide Conditions
Hide conditions on a build parameter allow you specify, based on the values of other build parameters, if the current build parameter should be hidden from view or not. A good example would be to hide build parameters related to shellcode options if another option specify the output type isn’t shellcode. Hide Conditions are generally defined as:name
- this specifies the name of the OTHER build parameter that you’re looking atoperand
- this specifies the “operand” that we’re going to use. This can be one of the following:eq
- equalneq
- not equalin
- innin
- not in
value
- this is what we’re comparing the current option’s value to. In the above example, we would HIDE that build parameter if theoutput_type
build parameter’s value is Not EQ to the value Shellcode.- if you’re using
in
ornin
, then instead ofvalue
you’d specifychoices
- if you’re using
C2 Parameter Deviations
This is another really powerful addition in Mythic 3.4 - the ability for a payload type to define a variation to a supported c2 profile. This is part of the payload type’s definition, but allows you to make light modifications to any parameter for a supported c2 profile. The only thing you can’t do is add new parameter values - only remove or modify.- Python
- Go
supported
- indicate if this field is supported or not. If it’s not supported, then it won’t be shown to the user.default_value
- your own default value instead of the one that’s normally providedchoices
- your own set of choices instead of those that are provideddictionary_choices
- your own set of dictionary choice objects instead of what’s normally provided