Mythic
Mythic copied to clipboard
Unable to start mythic
Trying to install Mythic on a brand new (fully updated) Kali Linux machine (not a VM). Linux kali 6.8.11-amd64 Docker version: 20.10.25+dfsg1 Docker-compose version: 1.29.2
I pull down mythic with:
git clone https://github.com/its-a-feature/Mythic --depth 1
Build mythic-cli
sudo make
Try to start mythic
sudo -E ./mythic-cli start
I get the following error...
2024/08/07 11:57:32 [-] Error while reading in docker-compose file: Config File "docker-compose" Not Found in "[/home/prborg/Mythic]"
2024/08/07 11:57:32 [+] Successfully created new docker-compose.yml file.
2024/08/07 11:57:32 [+] Added mythic_postgres to docker-compose
2024/08/07 11:57:32 [+] Added mythic_react to docker-compose
2024/08/07 11:57:32 [+] Added mythic_server to docker-compose
2024/08/07 11:57:32 [+] Added mythic_nginx to docker-compose
2024/08/07 11:57:32 [+] Added mythic_rabbitmq to docker-compose
2024/08/07 11:57:32 [+] Added mythic_graphql to docker-compose
2024/08/07 11:57:32 [+] Added mythic_documentation to docker-compose
2024/08/07 11:57:32 [+] Added mythic_jupyter to docker-compose
Traceback (most recent call last):
File "/usr/bin/docker-compose", line 33, in <module>
sys.exit(load_entry_point('docker-compose==1.29.2', 'console_scripts', 'docker-compose')())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/compose/cli/main.py", line 81, in main
command_func()
File "/usr/lib/python3/dist-packages/compose/cli/main.py", line 200, in perform_command
project = project_from_options('.', options)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/compose/cli/command.py", line 60, in project_from_options
return get_project(
^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/compose/cli/command.py", line 152, in get_project
client = get_client(
^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/compose/cli/docker_client.py", line 41, in get_client
client = docker_client(
^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/compose/cli/docker_client.py", line 124, in docker_client
kwargs = kwargs_from_env(environment=environment, ssl_version=tls_version)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: kwargs_from_env() got an unexpected keyword argument 'ssl_version'
Traceback (most recent call last):
File "/usr/bin/docker-compose", line 33, in <module>
sys.exit(load_entry_point('docker-compose==1.29.2', 'console_scripts', 'docker-compose')())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/compose/cli/main.py", line 81, in main
command_func()
File "/usr/lib/python3/dist-packages/compose/cli/main.py", line 200, in perform_command
project = project_from_options('.', options)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/compose/cli/command.py", line 60, in project_from_options
return get_project(
^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/compose/cli/command.py", line 152, in get_project
client = get_client(
^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/compose/cli/docker_client.py", line 41, in get_client
client = docker_client(
^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/compose/cli/docker_client.py", line 124, in docker_client
kwargs = kwargs_from_env(environment=environment, ssl_version=tls_version)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: kwargs_from_env() got an unexpected keyword argument 'ssl_version'
[+] Successfully made ssl folder in nginx-docker folder
[*] Failed to find SSL certs for Nginx container, generating now...
[+] Successfully generated new SSL certs
2024/08/07 11:57:33 [-] Service mythic_rabbitmq should be running on the host, but isn't. Containers will be unable to connect.
Start it by starting Mythic ('sudo ./mythic-cli mythic start') or manually with 'sudo ./mythic-cli mythic start mythic_rabbitmq'
2024/08/07 11:57:33 [*] Waiting for Mythic Server and Nginx to come online (Retry Count = 10)
2024/08/07 11:57:33 [*] Attempting to connect to Mythic UI at https://127.0.0.1:7443, attempt 1/10
2024/08/07 11:57:33 [-] Failed to make connection to host, retrying in 10s
2024/08/07 11:57:33 Get "https://127.0.0.1:7443": dial tcp 127.0.0.1:7443: connect: connection refused
2024/08/07 11:57:43 [*] Attempting to connect to Mythic UI at https://127.0.0.1:7443, attempt 2/10
2024/08/07 11:57:43 [-] Failed to make connection to host, retrying in 10s
2024/08/07 11:57:43 Get "https://127.0.0.1:7443": dial tcp 127.0.0.1:7443: connect: connection refused
2024/08/07 11:57:53 [*] Attempting to connect to Mythic UI at https://127.0.0.1:7443, attempt 3/10
2024/08/07 11:57:53 [-] Failed to make connection to host, retrying in 10s
2024/08/07 11:57:53 Get "https://127.0.0.1:7443": dial tcp 127.0.0.1:7443: connect: connection refused
2024/08/07 11:58:03 [*] Attempting to connect to Mythic UI at https://127.0.0.1:7443, attempt 4/10
2024/08/07 11:58:03 [-] Failed to make connection to host, retrying in 10s
2024/08/07 11:58:03 Get "https://127.0.0.1:7443": dial tcp 127.0.0.1:7443: connect: connection refused
2024/08/07 11:58:13 [*] Attempting to connect to Mythic UI at https://127.0.0.1:7443, attempt 5/10
2024/08/07 11:58:13 [-] Failed to make connection to host, retrying in 10s
2024/08/07 11:58:13 Get "https://127.0.0.1:7443": dial tcp 127.0.0.1:7443: connect: connection refused
2024/08/07 11:58:23 [*] Attempting to connect to Mythic UI at https://127.0.0.1:7443, attempt 6/10
2024/08/07 11:58:23 [-] Failed to make connection to host, retrying in 10s
2024/08/07 11:58:23 Get "https://127.0.0.1:7443": dial tcp 127.0.0.1:7443: connect: connection refused
2024/08/07 11:58:33 [*] Attempting to connect to Mythic UI at https://127.0.0.1:7443, attempt 7/10
2024/08/07 11:58:33 [-] Failed to make connection to host, retrying in 10s
2024/08/07 11:58:33 Get "https://127.0.0.1:7443": dial tcp 127.0.0.1:7443: connect: connection refused
2024/08/07 11:58:43 [*] Attempting to connect to Mythic UI at https://127.0.0.1:7443, attempt 8/10
2024/08/07 11:58:43 [-] Failed to make connection to host, retrying in 10s
2024/08/07 11:58:43 Get "https://127.0.0.1:7443": dial tcp 127.0.0.1:7443: connect: connection refused
2024/08/07 11:58:53 [*] Attempting to connect to Mythic UI at https://127.0.0.1:7443, attempt 9/10
2024/08/07 11:58:53 [-] Failed to make connection to host, retrying in 10s
2024/08/07 11:58:53 Get "https://127.0.0.1:7443": dial tcp 127.0.0.1:7443: connect: connection refused
2024/08/07 11:59:03 [*] Attempting to connect to Mythic UI at https://127.0.0.1:7443, attempt 10/10
2024/08/07 11:59:03 [-] Failed to make connection to host, retrying in 10s
2024/08/07 11:59:03 Get "https://127.0.0.1:7443": dial tcp 127.0.0.1:7443: connect: connection refused
2024/08/07 11:59:13 [-] Failed to make connection to Mythic Server
2024/08/07 11:59:13 This could be due to limited resources on the host (recommended at least 2CPU and 4GB RAM)
2024/08/07 11:59:13 If there is an issue with Mythic server, use 'mythic-cli logs mythic_server' to view potential errors
MYTHIC SERVICE WEB ADDRESS BOUND LOCALLY
Nginx (Mythic Web UI) https://127.0.0.1:7443 false
Mythic Backend Server http://127.0.0.1:17443 true
Hasura GraphQL Console http://127.0.0.1:8080 true
Jupyter Console http://127.0.0.1:8888 true
Internal Documentation http://127.0.0.1:8090 true
ADDITIONAL SERVICES ADDRESS BOUND LOCALLY
Postgres Database postgresql://mythic_user:[email protected]:5432/mythic_db true
React Server http://127.0.0.1:3000/new true
RabbitMQ amqp://mythic_user:[email protected]:5672 true
Mythic Main Services
CONTAINER NAME STATE STATUS MOUNT PORTS
Installed Services
CONTAINER NAME STATE STATUS MOUNT
2024/08/07 11:59:13 [*] There are no services installed
2024/08/07 11:59:13 To install one, use "sudo ./mythic-cli install github <url>"
2024/08/07 11:59:13 Agents can be found at: https://github.com/MythicAgents
2024/08/07 11:59:13 C2 Profiles can be found at: https://github.com/MythicC2Profiles
2024/08/07 11:59:13
[*] RabbitMQ is currently listening on localhost. If you have a remote Service, they will be unable to connect (i.e. one running on another server)
2024/08/07 11:59:13
Use 'sudo ./mythic-cli config set rabbitmq_bind_localhost_only false' and restart mythic ('sudo ./mythic-cli restart') to change this
2024/08/07 11:59:13
[*] MythicServer is currently listening on localhost. If you have a remote Service, they will be unable to connect (i.e. one running on another server)
2024/08/07 11:59:13
Use 'sudo ./mythic-cli config set mythic_server_bind_localhost_only false' and restart mythic ('sudo ./mythic-cli restart') to change this
2024/08/07 11:59:13 [*] If you are using a remote PayloadType or C2Profile, they will need certain environment variables to properly connect to Mythic.
2024/08/07 11:59:13 Use 'sudo ./mythic-cli config service' for configs for these services.
2024/08/07 11:59:13 [*] Fetching logs from mythic_server now:
2024/08/07 11:59:13 [-] Failed to find that container
It seems like for some reason mythic-cli is looking for docker compose in the current directory but it is installed where it is supposed to be in /usr/bin/docker-compose
Traceback (most recent call last): File "/usr/bin/docker-compose", line 33, in
sys.exit(load_entry_point('docker-compose==1.29.2', 'console_scripts', 'docker-compose')())
Kali did something recently that broken pretty much everything related to Docker. You're not the first one running into this. The docker-compose python script (in /usr/bin/docker-compose) is crashing and throwing an error on Kali because TypeError: kwargs_from_env() got an unexpected keyword argument 'ssl_version'. There's another open issue from somebody else here that's trying to get Docker and Docker Compose to work on Kali too. They're running into similar issues. I put a solution in there that somebody else said was working for them, so maybe that'll work for you too?
What you're seeing about docker compose in the current directory is that it's simply looking for the standard docker-compose.yml file, and since it doesn't exist, it creates it and starts adding the Mythic services to it:
2024/08/07 11:57:32 [-] Error while reading in docker-compose file: Config File "docker-compose" Not Found in "[/home/prborg/Mythic]" 2024/08/07 11:57:32 [+] Successfully created new docker-compose.yml file.
Did this work for you?
actually i gave up and ended uninstalling docker-compose all.together and installed the latest docker.io package, which has compose as a command under docker. that fixed all.of my issues. you may want to.close this.
Would you happen to be able to include the steps you took? I can try to update the install file for Kali with Mythic to match what worked for you
when i get back home later this weekend i can send what i did
Get TypeApp for Android
On Aug 14, 2024, 11:45, at 11:45, Cody Thomas @.***> wrote:
Would you happen to be able to include the steps you took? I can try to update the install file for Kali with Mythic to match what worked for you
-- Reply to this email directly or view it on GitHub: https://github.com/its-a-feature/Mythic/issues/397#issuecomment-2289294844 You are receiving this because you authored the thread.
Message ID: @.***>
Steps... Let me see how much I can recreate from memory and zsh history
-
Uninstalled docker-compose-plugin and everything else that I had related to docker, including containerd(maybe didn't need to do this, but wanted to start fresh). This is because the latest version of docker already has 'docker compose' as an option2. Installed the latest version of docker on system (as of when I did it, it was version 27.1.1) - apt install docker-ce docker-ce-cli containerd.io
-
pulled Mythic to my local computer4. configured .env as needed5. built as per Mythic instructions6. Installed needed modules As you said Kali (or someone) did something to mess up docker-compose. That said the newest versions of Docker already have a compose option so using docker-compose-plugin is not needed. +-------------------------------------------------| Jose J. Cintron| @.***|| "Time is the fire in which we burn..."+-------------------------------------------------
On Wednesday, August 14, 2024 at 12:45:59 PM EDT, Cody Thomas @.***> wrote:
Would you happen to be able to include the steps you took? I can try to update the install file for Kali with Mythic to match what worked for you
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>
Thank you for these steps! I'll test these out and some other steps people gave on some fresh Kali VMs to see what sticks