Installation
Get the code
Pull the code from the official GitHub repository:
This is made to work with docker and docker-compose, so they both need to be installed. If docker is not installed on your ubuntu machine, you can use the ./install_docker_ubuntu.sh
script to install it for you.
If you're running on debian, use the ./install_docker_debian.sh
instead.
Mythic must be installed on Linux. While macOS supports Docker and Docker-Compose, macOS doesn't handle the shared host networking that Mythic relies on. You can still access the Browser interface from any OS, but the Mythic instance must be installed on Linux
Configure your installation
Mythic configuration is all done via Mythic/.env
, which means for your configuration you can either add/edit values there or add them to your environment.
Mythic/.env doesn't exist by default. You can either let Mythic create it for you when you run sudo ./mythic-cli mythic start
for the first time or you can create it ahead of time with just the variables you want to configure
If you need to run mythic-cli
as root for Docker and you set your environment variables as a user, be sure to run sudo -E ./mythic-cli
so that your environment variables are carried over into your sudo call. The following are the default values that Mythic will generate on first execution of sudo ./mythic-cli mythic start
unless overridden:
A few important notes here:
MYTHIC_SERVER_PORT
will be the port opened on the server where you're running Mythic. TheNGINX_PORT
is the one that's opened by Nginx and acts as a reverse proxy to all other services. TheNGINX_PORT
is the one you'll connect to for your web user interface and should be the only port you need to expose externally (unless you prefer to SSH port forward your web UI port).The
allowed_ip_blocks
allow you to restrict access to thelogin
page of Mythic. This should be set as a series of netblocks with NO host bits set - i.e.127.0.0.0/16,192.168.10.0/24,10.0.0.0/8
excluded_c2_profiles
andexcluded_payload_types
allows you to exclude certain docker containers from starting. This is helpful if you know you're not going to use certain payload types or c2 profiles and want to cut down on time/space requirements. These are both just a comma-separated series of agent/c2 names like:apfell,atlas
orhttp,dynamichttp
.
The above configuration does NOT affect the port or SSL information related to your agents or callback information. It's strictly for your operator web UI.
When the mythic_server
container starts for the first time, it goes through an initialization step where it uses the password and username from Mythic/.env
to create the mythic_admin_user
user. Once the database exists, the mythic_server
container no longer uses that value.
mythic-cli
The mythic-cli
binary is used to start/stop/configure/install components of Mythic. You can see the help menu at any time with mythic-cli -h
, mythic-cli --help
or mythic-cli help
.
Installing Agents / C2 Profiles
By default, Mythic does not come with any Payload Types (agents) or C2 Profiles. This is for a variety of reasons, but one of the big ones being time/space requirements - all Payload Types and C2 Profiles have their own Docker containers, and as such, collectively they could eat up a lot of space on disk. Additionally, having them split out into separate repositories makes it much easier to keep them updated.
Available Mythic Agents can be found on GitHub at https://github.com/MythicAgents
Available Mythic C2 Profiles can be found on GitHub at https://github.com/MythicC2Profiles
To install a Payload Type or C2 Profile, use the mythic-cli
binary with:
If you have an agent already installed, but want to update it, you can do the same command again. If you supply a -f
at the end, then Mythic will automatically overwrite the current version that's installed, otherwise you'll be prompted for each piece.
You won't be able to create any payloads within Mythic until you have at least one Agent and a matching C2 Profile installed
Agent / C2 Container Version out of Sync
If you've installed an agent or c2 profile and Mythic is complaining about the version being out of bounds, this is typically a really easy fix. This means that the Mythic server version and the agent/c2 profile versions are out of sync. Mythic will give you a warning and say something like: Agent version 5 is not supported. Agent version must be between 7 and 9
. You can look here to see which Docker images or PyPi packages you should be using for your version of Mythic.
Logging
The web_log_size
and web_keep_logs
refers only to keeping web logs (i.e. web traffic hitting Mythic). If you're wanting to enable SIEM-based logging, set the siem_log_name
to anything but an empty string. Mythic will create that file if it doesn't exist, and log to that file. The following things are logged currently:
Mythic does SIEM-based logging as JSON data where each entry is as follows:
{"timestamp": "UTC Timestring", "mythic_object": "one of the values from above", "message": JSON of the actual message in question}
To start Mythic, simply run sudo ./mythic-cli mythic start
.
Start Mythic
If you came here right from the previous section, your Mythic instance should already be up and running. Check out the next section to confirm that's the case. If at any time you wish to stop Mythic, simply run sudo ./mythic-cli mythic stop
and if you want to start it again run sudo ./mythic-cli mythic start
. If Mythic is currently running and you need to make a change, you can run sudo ./mythic-cli mythic start
again without any issue, that command will automatically stop things and then restart them.
The default username is mythic_admin
, but that user's password is randomly generated when Mythic is started for the first time. You can find this random value in the Mythic/.env
file. Once Mythic has started at least once, this value is no longer needed, so you can edit or remove this entry from the Mythic/.env
file.
Mythic starts with NO C2 Profiles or Agents pre-installed. Due to size issues and the growing number of agents, this isn't feasible. Instead. use the ./mythic-cli install github <url> [branch] [-f]
command to install an agent from a GitHub (or GitLab) repository.
Troubleshooting installation and connection
If something seems off, here's a few places to check:
Run
sudo ./mythic-cli status
to give a status update on all of the docker containers. They should all be up and running. If one is exited or has only been up for less than 30 seconds, that container might be your issue.Your output will be similar to the following. Notice how the
mythic_server
docker container shows a status ofExited
? That looks like an issue
To check the logs of any container, run
sudo ./mythic-cli logs [container_name]
. For example, to see the output of our stopped container, runsudo ./mythic-cli logs mythic_server
. This will help track down if the last thing that happened was an error of some kind.If all of that looks ok, but something still seems off, it's time to check the browser.
If you're seeing "Session Expired, Please Refresh", "Socket errored, please refresh", or "Socket closed, please refresh", then there's an issue with your websocket connections.
First open up the developer tools for your browser and see if there are any errors that might indicate what's wrong. If there's no error though, check the network tab to see if there are any 404 errors.
If that's not the case, make sure you've selected a current operation (more on this in the Quick Usage section). Mythic uses websockets that pull information about your current operation to provide data. If you're not currently in an active operation (indicated at the top of your screen in big letters), then Mythic cannot provide you any data.
Container Sizes
Mythic starts every service (web server, database, each payload type, each C2 profile, rabbitmq, documentation) in its own Docker container. As much as possible, these containers leverage common image bases to reduce size, but due to the nature of so many components, there's going to be a decent footprint. For consideration, here's the Docker footprint for a fresh install of Mythic:
If you want to save space or if you know you're not going to be using a specific container, add that C2 profile or Payload Type name to the appropriate exclude
list in the config.json
specified above. That indicates to Mythic to not even build or start that container.
Last updated