Automated deployment and configuration of a Mythic server using Terraform and Ansible
git clone https://github.com/0xdeadbeefJERKY/mythic-deploy
cd mythic-deploy/terraform
- Create
main.tf
, using the.tf
files interraform/examples
for guidance- e.g.,
cp examples/digitalocean.tf main.tf
- e.g.,
cp terraform.tfvars.example terraform.tfvars
- Modify
terraform.tfvars
as needed - Configure provider authentication
terraform init
terraform plan
and review the output- Optionally, run
terraform plan -out terraform.tfplan
to save the Terraform plan locally.
- Optionally, run
terraform apply
cd mythic-deploy/ansible
- Modify
roles/mythic/files/config.json
to customize the Mythic deployment ansible-playbook -i inventory site.yml
- SSH into the Mythic server using one of the following methods:
cd mythic-deploy/terraform && $(terraform output ssh_connect_cmd)
cd mythic-deploy/terraform/ssh_keys && ssh -F config mythic
cat mythic-deploy/terraform/ssh_keys/config >> ~/.ssh/config && ssh mythic
- From SSH session, run
cd $HOME/mythic && sudo ./start_mythic.sh
- Open browser, navigate to https://<instance_ip>:7443 and log in using the credentials from
ansible/roles/mythic/files/config.json