its-a-feature / Mythic

A collaborative, multi-platform, red teaming framework
Other
3.29k stars 432 forks source link

feature request: podman and Nix flake support #380

Open drishal opened 8 months ago

drishal commented 8 months ago

As the title says, is it possible to add support for podman? on the latest mythic-cli with podman it complains that it needs a minimum docker version even though I have latest version of podman installed. Also would it be possible to add support for nix flakes as well?

its-a-feature commented 7 months ago

I'm not sure if there's a podman golang library or what nix flakes is, but I recently refactored the mythic-cli to try to support multiple things besides just Docker. I factored everything out to an interface, https://github.com/its-a-feature/Mythic/blob/master/Mythic_CLI/src/cmd/manager/managerInterface.go. All you'd need to do:

drishal commented 7 months ago

I'm not sure if there's a podman golang library or what nix flakes is, but I recently refactored the mythic-cli to try to support multiple things besides just Docker. I factored everything out to an interface, https://github.com/its-a-feature/Mythic/blob/master/Mythic_CLI/src/cmd/manager/managerInterface.go. All you'd need to do:

* implement that interface in its own file (like this https://github.com/its-a-feature/Mythic/blob/master/Mythic_CLI/src/cmd/manager/dockerComposeManager.go)

* add a case for your interface here https://github.com/its-a-feature/Mythic/blob/master/Mythic_CLI/src/cmd/manager/managerInterface.go#L89-L99

* in your `.env` file set the `global_manager` to be your new thing (i.e. `sudo ./mythic-cli config set global_manager podman`. Now when you run mythic-cli commands, it'll leverage your interface instead of the docker one

ah thanks a lot for podman will definitely take a look at this, also for now I decided to instead use the nix docker image to be able to use nix to manage my dependencies for now (edit: though if possible please do add a little more out of the box support for podman)