/mythic-deploy

Automated deployment and configuration of a Mythic server using Terraform and Ansible

Primary LanguageHCLMIT LicenseMIT

mythic-deploy

Automated deployment and configuration of a Mythic server using Terraform and Ansible

Prerequisites

Runbook

Deploy infrastructure (Terraform)

  1. git clone https://github.com/0xdeadbeefJERKY/mythic-deploy
  2. cd mythic-deploy/terraform
  3. Create main.tf, using the .tf files in terraform/examples for guidance
    • e.g., cp examples/digitalocean.tf main.tf
  4. cp terraform.tfvars.example terraform.tfvars
  5. Modify terraform.tfvars as needed
  6. Configure provider authentication
  7. terraform init
  8. terraform plan and review the output
    • Optionally, run terraform plan -out terraform.tfplan to save the Terraform plan locally.
  9. terraform apply

Provision servers (Ansible)

  1. cd mythic-deploy/ansible
  2. Modify roles/mythic/files/config.json to customize the Mythic deployment
  3. ansible-playbook -i inventory site.yml

Start Mythic

  1. 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
  2. From SSH session, run cd $HOME/mythic && sudo ./start_mythic.sh
  3. Open browser, navigate to https://<instance_ip>:7443 and log in using the credentials from ansible/roles/mythic/files/config.json