(KoC for short)
An Ansible playbook to install common red team operator tools on Kali machines. Mainly meant for Red vs. Blue competitions but maybe in the future can be used to do other cool stuff.
- Removes default installation of Impacket
- Removes
impacket-*binaries - Installs Impacket suite from ThePorgs
- Installs Ghostpack compiled binaries
- Installs NetExec
- Downloads ScareCrow
- Downloads sliver client and server
- Downloads sliver_dispatcher
Requirements:
- Ansible Core
- Ansible
Community.Generalcollection
To install dependencies:
apt -y update
apt -y install ansible-core sshpass
ansible-galaxy collection install community.generalTo download KoC:
git clone https://github.com/fyrworx4/kali-on-command.git
cd kali-on-command
To run the playbook locally:
ansible-playbook -c local -i localhost, playbook.ymlTo run the playbook on multiple machines, create an inventory file called "hosts" with IP addresses of your red team infra:
[operator_vms]
10.128.0.10
10.128.0.11
10.128.0.12
[cobaltstrike]
10.128.0.12
[sliver]
10.128.0.13
[pwndrop]
10.128.0.14Then run:
ansible-playbook -i hosts -u kali -k -b --ask-become-pass playbook.ymlWhere:
-i hosts: Use thehostsfile for inventory-u kali: SSH into thekaliuser on all hosts in inventory-k: Prompt for SSH password-b --ask-become-pass: Elevate torootafter SSH'ing in, and prompt for sudo password as wellplaybook.yml- the file of the playbook
You may need to set StrictHostKeyChecking to no in your /etc/ssh/ssh_config file.
I've included a Dockerfile that builds a Kali image and runs the playbook for testing purposes (if you are like me and too lazy to test this on a VM):
docker-compose up --build
docker run -t -d <IMAGE-HASH> bash
docker exec -it <CONTAINER-HASH> bash- Install more tools
- Deploy C2 team server
- Deploy payload hosting web server (pwndrop)
- Deploy raven
- Build redirectors