Command
class, there are two functions - create_go_tasking
and process_response
. As the names suggest, the first one allows you to create and manipulate a task before an agent pulls it down, and the second one allows you to process the response that comes back. If you’ve been following along in development, then you know that Mythic supports many different fields in its post_response
action so that you can automatically create artifacts, register keylogs, manipulate callback information, etc. However, all of that requires that your agent format things in a specific way for Mythic to pick them up and process. That can be tiring.
process_response
function takes in one argument class that contains two pieces of information: The task
that generated the response in the first place, and the response
that was sent back from the agent. Now, there’s a specific process_response
keyword you have to send for mythic to shuttle data off to this function instead of processing it normally. When looking at a post_response
message, it’s structured as follows:
process_response
key will get sent to the process_response
function in your Payload Type container. This value for process_response
can be any type - int, string, dictionary, array, etc.
Some caveats:
task_id
and a process_container
key, then as soon as the data is shipped off to your process_response
function, Mythic is going to send the all clear back down to the agent and say everything was successful. It doesn’t wait for your function to finish processing anything, nor does it expect any output from your function.
process_response
functionality because the agent needs the response in order to keep functioning. Compare this to something like registering a keylog, creating an artifact, or providing some output to the user which the agent tends to think of in a “fire and forget” style. These sorts of things are fine for async parallel processing with no response to the agent.
task
is the same task data you’d get from your create_go_tasking
function, and response
is whatever you sent back.
You have full access to all of the RPC methods to Mythic from here just like you do from the other functions.