translation_container = "binaryTranslator"
. Now we need to create the container.
The process for making a translation container is almost identical to a c2 profile or payload type container, we’re simply going to change which classes we instantiate, but the rest of it is the same.
Unlike Payload Type and C2 Profile containers that mainly do everything over RabbitMQ for potentially long-running queues of jobs, Translation containers use gRPC for fast responses.
If a translation_container
is specified for your Payload Type, then the three functions defined in the following two examples will be called as Mythic processes requests from your agent.
You then need to get the new container associated with the docker-compose file that Mythic uses, so run sudo ./mythic-cli add binaryTranslator
. Now you can start the container with sudo ./mythic-cli start binaryTranslator
and you should see the container pop up as a sub heading of your payload container.
Additionally, if you’re leveraging a payload type that has mythic_encrypts = False
and you’re doing any cryptography, then you should use this same process and perform your encryption and decryption routines here. This is why Mythic provides you with the associated keys you generated for encryption, decryption, and which profile you’re getting a message from.
main.py
file, simply import the file with this definition and then start the service:
main.go
code, we call the Initialize function and start the services:
service_wrapper
instead of serviceWrapper