repositories

daemon-sec-cheatsheet

The cheatsheet vault for operators: AD, enumeration, exploitation, priv-esc, web, DFIR

clonegit clone https://git.daemon-sec.xyz/daemon-sec-cheatsheet.git
mythic.mdMarkdown346 lines24.1 KiBsource raw download

title: "Mythic" section: "Windows" sectionSlug: "windows-hardening" sourcePath: "src/windows-hardening/mythic.md" sourceUrl: "https://github.com/HackTricks-wiki/hacktricks/blob/188de82beb54e70956b2952367a0af91d26758b8/src/windows-hardening/mythic.md" sha: "188de82beb54e70956b2952367a0af91d26758b8" isIndex: false modified: true license: "CC-BY-NC-4.0"#

Mythic#

What is Mythic?#

Mythic is an open-source, modular, collaborative command and control (C2) framework designed for red teaming. It allows operators to manage and deploy agents (payloads) across different operating systems, including Windows, Linux, and macOS. Mythic provides a browser UI for multi-operator tasking, file handling, SOCKS/rpfwd management, and payload generation.

Unlike monolithic frameworks, the Mythic repository itself does not ship payload types or C2 profiles. Agents, wrappers, and C2 profiles are typically installed as external components and can be updated independently from Mythic core.

Installation#

To install Mythic, follow the instructions on the official Mythic repo. A common bootstrap from the Mythic directory is:

sudo make
sudo ./mythic-cli start

If Mythic is already running, you can normally add a new agent or profile with ./mythic-cli install github ... and then either restart Mythic or just start the new component directly.

Agents#

Mythic supports multiple agents, which are the payloads that perform tasks on the compromised systems. Each agent can be tailored to specific needs and can run on different operating systems.

By default Mythic doesn't have any agents installed. The open-source community agents live in https://github.com/MythicAgents, and the community feature matrix is useful to quickly check supported operating systems, payload formats, wrappers, and C2 profiles.[1]

To install an agent from that org you can run:

sudo ./mythic-cli install github https://github.com/MythicAgents/<agent-name>
sudo ./mythic-cli install github https://github.com/MythicAgents/Apollo.git
sudo -E ./mythic-cli install github https://github.com/MythicAgents/Apollo.git

The sudo -E form is useful when you are installing from a non-root environment. You can add new agents with the previous command even if Mythic is already running.

C2 Profiles#

C2 profiles in Mythic define how agents communicate with the Mythic server. They specify the communication protocol, encryption methods, and other settings. You can create and manage C2 profiles through the Mythic web interface.

By default Mythic is installed with no profiles, however, it's possible to download some profiles from the repo https://github.com/MythicC2Profiles running:

sudo ./mythic-cli install github https://github.com/MythicC2Profiles/<c2-profile>
sudo ./mythic-cli install github https://github.com/MythicC2Profiles/http

Current operator-relevant profiles to keep in mind:

Current platform notes#

Wrapper payloads#

Wrapper payloads let you keep the same agent logic while changing the on-disk representation that gets delivered or persisted.

Apollo Agent#

Apollo is a Windows agent written in C# using the 4.0 .NET Framework designed to be used in SpecterOps training offerings.[2]

Install it with:

./mythic-cli install github https://github.com/MythicAgents/Apollo.git

Current build/profile notes#

This agent has a lot of commands that makes it very similar to Cobalt Strike's Beacon with some extras. Among them, it supports:

Common actions#

Privilege escalation#

Process execution#

Mythic Forge#

This allows to load COFF/BOF files from the Mythic Forge, which is a repository of pre-compiled payloads and tools that can be executed on the target system. With all the commands that can be loaded it'll be possible to perform common actions executing them in the current agent process as BOFs (usually with better OPSEC than spawning a separate process).

Start installing them with:

./mythic-cli install github https://github.com/MythicAgents/forge.git

Then, use forge_collections to show the COFF/BOF modules from the Mythic Forge to be able to select and load them into the agent's memory for execution. By default, the following 2 collections are added in Apollo:

After one module is loaded, it'll appear in the list as another command like forge_bof_sa-whoami or forge_bof_sa-netuser.

For BOFs, remember that Forge does not just pass one flat argument string to Apollo. It maps BOF parameters into Mythic's typed-array format and then forwards them into Apollo's execute_coff flow. If a Forge-loaded BOF behaves strangely, check the expected BOF argument types / entrypoint rather than only the command line you typed. Also note that Apollo's newer BOF loader changed argument handling relative to much older 2.3.1-era builds, so stale BOFs or old collections can fail purely because the marshaling expectations changed.

PowerShell & scripting execution#

Lateral Movement#

For the lower-level WMI execution primitives used underneath jump_wmi or wmiexecute, check WmiExec. For broader pivoting patterns, check Tunneling and Port Forwarding.

Miscellaneous Commands#

Poseidon Agent#

Poseidon is a Golang agent that compiles into Linux and macOS executables.

./mythic-cli install github https://github.com/MythicAgents/poseidon.git

Current build/profile notes#

For macOS-specific tradecraft around Mythic-backed operations, JAMF abuse, or MDM-as-C2 ideas, check macOS Red Teaming.

When used on Linux or macOS it has some interesting commands:

Common actions#

Search Sensitive Information#

macOS-specific tradecraft#

Move laterally#

Process execution#

References#