What is it?
Mythic tracks everything in the Postgres database so that if an operator needs to close their browser or the server where Mythic runs reboots, nothing is lost. The benefit of having all data tracked within the database and simply streamed to the operator’s interface means that all operators stay in sync about the state of the operation - each operator doesn’t have to browse all of the file shares themselves to see what’s going on and you don’t have to grep through a plethora of log files to find that one task you ran that one time.Where is it?
The database lives in thepostgres-docker
folder and is mapped into the mythic_postgres
container as a volume. This means that if you need to move Mythic to a new server, simply stop mythic with ./mythic-cli stop
, copy the Mythic
folder to its new home, and start everything back up again with ./mythic-cli start
.
On the first start of Mythic, the database schema is loaded from a schema file located in mythic-docker
: https://github.com/its-a-feature/Mythic/blob/master/mythic-docker/src/database/schema.go.
How is it used?
Since the database schema is the source of truth for all of Mythic, mythic scripting, and all of the operator’s interfaces, it needs to be easily accessible in a wide range of cases. Themythic_server
container connects directly to the mythic_postgres
container to sync the containers and quickly react to agent messages. The mythic_graphql
container (Hasura) also directly connects to the database and provides a GraphQL interface to the underlying data. This GraphQL interface is what both the React UI and mythic scripting use to provide a role-based access control (RBAC) layer on top of the database.
How do I use it?
How do you, as an operator or developer, find out more about the database schema? The easiest way is to click the hamburger icon in the top left of Mythic, select “Services”, and then select the “GraphQL Console”. This drops you into the Hasura Login screen; the password for Hasura can be found randomly generated in yourMythic/.env
file.
From here, the API tab, shown below, provides an easy way to dynamically explore the various queries, subscriptions, and modifications you can make to the database right here or via scripting.

Hasura Console

Hasura Console

Hasura Console