├── .gitignore ├── README.md ├── cobaltstrike.yml ├── crackmapexec.yml ├── fish.yml ├── impacket.yml ├── krbrelayx.yml ├── metasploit.yml ├── mitm6.yml ├── privexchange.yml ├── responder.yml ├── silenttrinity.yml └── sprayingtoolkit.yml /.gitignore: -------------------------------------------------------------------------------- 1 | *.retry 2 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # AnsiblePlaybooks 2 | 3 | These are a collection of Ansible playbooks that are designed to configure a Kali machine to my preferred setup and install a bunch of tools I commonly use. 4 | 5 | All of these were designed to be run on Kali boxes, but they should work on all Debian based distros (famous last words). 6 | 7 | The `fish.yml` playbook is expected to be ran first as it installs `virtualfish`, `pipenv` & all the environment variables needed for them to play nice together. 8 | 9 | Every tool is installed in its own Python `virtualenv` in order to avoid what I've started calling "Kali Virtual Hell" 10 | -------------------------------------------------------------------------------- /cobaltstrike.yml: -------------------------------------------------------------------------------- 1 | - name: CobaltStrike 2 | hosts: all 3 | tasks: 4 | - name: Install core deps 5 | apt: 6 | name: 7 | - openjdk-11-jdk 8 | 9 | - name: Set default Java version 10 | shell: update-java-alternatives -s java-1.11.0-openjdk-amd64 11 | 12 | - name: Get Download Token 13 | shell: "curl -s https://www.cobaltstrike.com/download -d 'dlkey={{ cstrike_key }}' | grep 'href=\"/downloads/' | cut -d '/' -f3" 14 | register: download_token 15 | args: 16 | warn: false 17 | 18 | - debug: 19 | var: download_token.stdout 20 | 21 | - name: Download 22 | shell: "curl -s https://www.cobaltstrike.com/downloads/{{ download_token.stdout }}/cobaltstrike-trial.tgz -o /tmp/cobaltstrike.tgz" 23 | args: 24 | warn: false 25 | 26 | - name: Spool Key 27 | copy: 28 | content: "{{ cstrike_key }}" 29 | dest: "{{ ansible_env.HOME }}/.cobaltstrike.license" 30 | 31 | - name: Decompress and Move Folder 32 | shell: "extract /tmp/cobaltstrike.tgz && mv cobaltstrike {{ ansible_env.HOME }}/Tools" 33 | args: 34 | executable: /usr/bin/fish 35 | chdir: /tmp 36 | 37 | - name: Update Install 38 | shell: ./update 39 | args: 40 | chdir: "{{ ansible_env.HOME }}/Tools/cobaltstrike" 41 | 42 | - name: Clone Malleable-C2 Profiles Repository 43 | git: 44 | repo: https://github.com/rsmudge/Malleable-C2-Profiles 45 | dest: "{{ ansible_env.HOME }}/Tools/malleable-c2-profiles" 46 | 47 | - name: Clone CobaltStrike-ToolKit Repository 48 | git: 49 | repo: https://github.com/killswitch-GUI/CobaltStrike-ToolKit 50 | dest: "{{ ansible_env.HOME }}/Tools/cobaltstrike-toolKit" 51 | -------------------------------------------------------------------------------- /crackmapexec.yml: -------------------------------------------------------------------------------- 1 | - name: CrackMapExec 2 | hosts: all 3 | tasks: 4 | - name: Install core deps 5 | apt: 6 | name: 7 | - libssl-dev 8 | - libffi-dev 9 | - python-dev 10 | - build-essential 11 | 12 | - name: Clone repo 13 | git: 14 | repo: https://github.com/byt3bl33d3r/crackmapexec 15 | dest: "{{ ansible_env.HOME }}/Tools/crackmapexec" 16 | 17 | - name: Install via pipenv 18 | shell: | 19 | pipenv install 20 | pipenv run python setup.py install 21 | args: 22 | chdir: "{{ ansible_env.HOME }}/Tools/crackmapexec" 23 | -------------------------------------------------------------------------------- /fish.yml: -------------------------------------------------------------------------------- 1 | - name: Install fish with oh-my-fish 2 | hosts: all 3 | tasks: 4 | - name: Update repositories cache and install deps 5 | apt: 6 | name: 7 | - git 8 | - fish 9 | - python2 10 | - python3 11 | - curl 12 | - tmux 13 | - mosh 14 | - golang 15 | - pipenv 16 | update_cache: yes 17 | 18 | - name: Install virtualfish via pip 19 | pip: 20 | name: 21 | - virtualfish 22 | 23 | - name: Get GPG keys for RVM install package 24 | shell: gpg --keyserver hkp://pool.sks-keyservers.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB 25 | 26 | - name: Install RVM 27 | shell: curl -sSL https://get.rvm.io | bash -s stable 28 | args: 29 | warn: false 30 | 31 | - name: Install fisher 32 | shell: curl https://git.io/fisher --create-dirs -sLo ~/.config/fish/functions/fisher.fish 33 | args: 34 | warn: false 35 | 36 | - name: Install fish-pipenv 37 | shell: fisher add kennethreitz/fish-pipenv 38 | args: 39 | executable: /usr/bin/fish 40 | 41 | - name: Configure fish-pipenv 42 | copy: 43 | content: set pipenv_fish_fancy yes 44 | dest: "{{ ansible_env.HOME }}/.config/fish/config.fish" 45 | 46 | - name: Git clone oh-my-fish 47 | git: 48 | repo: https://github.com/oh-my-fish/oh-my-fish 49 | dest: /tmp/oh-my-fish 50 | 51 | - name: Install oh-my-fish 52 | shell: bin/install --offline --noninteractive --yes 53 | args: 54 | chdir: /tmp/oh-my-fish/ 55 | 56 | - name: Configure oh-my-fish before.init.fish 57 | copy: 58 | content: | 59 | set -g VIRTUALFISH_PYTHON "/usr/bin/python" 60 | set -g VIRTUALFISH_PLUGINS "auto_activation" 61 | set -g VIRTUALFISH_HOME $HOME/.local/share/virtualenvs/ 62 | dest: "{{ ansible_env.HOME }}/.config/omf/before.init.fish" 63 | 64 | - name: Configure oh-my-fish init.fish 65 | copy: 66 | content: set -xg GOPATH $HOME/Tools/go 67 | dest: "{{ ansible_env.HOME }}/.config/omf/init.fish" 68 | 69 | - name: Install oh-my-fish plugins and theme 70 | shell: omf install sushi extract rvm virtualfish 71 | args: 72 | executable: /usr/bin/fish 73 | 74 | - name: Change default shell to fish 75 | shell: chsh -s /usr/bin/fish 76 | -------------------------------------------------------------------------------- /impacket.yml: -------------------------------------------------------------------------------- 1 | - name: Impacket 2 | hosts: all 3 | tasks: 4 | - name: Clone repo 5 | git: 6 | repo: https://github.com/SecureAuthCorp/impacket 7 | dest: "{{ ansible_env.HOME }}/Tools/impacket" 8 | 9 | - name: Install via pipenv 10 | shell: | 11 | pipenv install 12 | pipenv run python setup.py install 13 | args: 14 | chdir: "{{ ansible_env.HOME }}/Tools/impacket" 15 | -------------------------------------------------------------------------------- /krbrelayx.yml: -------------------------------------------------------------------------------- 1 | - name: krbrelayx 2 | hosts: all 3 | tasks: 4 | - name: Clone repo 5 | git: 6 | repo: https://github.com/dirkjanm/krbrelayx 7 | dest: "{{ ansible_env.HOME }}/Tools/krbrelayx" 8 | 9 | - name: Connect virtualenv to impacket 10 | shell: | 11 | vf activate impacket 12 | vf connect 13 | args: 14 | chdir: "{{ ansible_env.HOME }}/Tools/krbrelayx" 15 | executable: /usr/bin/fish 16 | -------------------------------------------------------------------------------- /metasploit.yml: -------------------------------------------------------------------------------- 1 | - name: Metasploit 2 | hosts: all 3 | tasks: 4 | - name: Install core deps 5 | apt: 6 | name: 7 | - libpq-dev 8 | - libpcap0.8-dev 9 | 10 | - name: Clone Repository 11 | git: 12 | repo: https://github.com/rapid7/metasploit-framework 13 | dest: "{{ ansible_env.HOME }}/Tools/metasploit" 14 | 15 | - name: Install Ruby 16 | shell: rvm install ruby-`(cat .ruby-version)` 17 | args: 18 | chdir: "{{ ansible_env.HOME }}/Tools/metasploit" 19 | executable: /usr/bin/fish 20 | 21 | - name: Install Bundler 22 | shell: gem install bundler 23 | args: 24 | chdir: "{{ ansible_env.HOME }}/Tools/metasploit" 25 | executable: /usr/bin/fish 26 | 27 | - name: Install Gems 28 | shell: bundle install 29 | args: 30 | chdir: "{{ ansible_env.HOME }}/Tools/metasploit" 31 | executable: /usr/bin/fish 32 | -------------------------------------------------------------------------------- /mitm6.yml: -------------------------------------------------------------------------------- 1 | - name: mitm6 2 | hosts: all 3 | tasks: 4 | - name: Clone repo 5 | git: 6 | repo: https://github.com/fox-it/mitm6 7 | dest: "{{ ansible_env.HOME }}/Tools/mitm6" 8 | 9 | - name: Install via pipenv 10 | shell: | 11 | pipenv install 12 | pipenv run python setup.py install 13 | args: 14 | chdir: "{{ ansible_env.HOME }}/Tools/mitm6" 15 | -------------------------------------------------------------------------------- /privexchange.yml: -------------------------------------------------------------------------------- 1 | - name: PrivExchange 2 | hosts: all 3 | tasks: 4 | - name: Clone repo 5 | git: 6 | repo: https://github.com/dirkjanm/PrivExchange 7 | dest: "{{ ansible_env.HOME }}/Tools/privexchange" 8 | 9 | - name: Connect virtualenv to impacket 10 | shell: | 11 | vf activate impacket 12 | vf connect 13 | args: 14 | chdir: "{{ ansible_env.HOME }}/Tools/privexchange" 15 | executable: /usr/bin/fish 16 | -------------------------------------------------------------------------------- /responder.yml: -------------------------------------------------------------------------------- 1 | - name: Responder 2 | hosts: all 3 | tasks: 4 | - name: Clone repo 5 | git: 6 | repo: https://github.com/lgandx/Responder 7 | dest: "{{ ansible_env.HOME }}/Tools/responder" 8 | -------------------------------------------------------------------------------- /silenttrinity.yml: -------------------------------------------------------------------------------- 1 | - name: SILENTTRINITY 2 | hosts: all 3 | tasks: 4 | - name: Install core deps 5 | apt: 6 | name: 7 | - python3 8 | 9 | - name: Clone repo 10 | git: 11 | repo: https://github.com/byt3bl33d3r/SILENTTRINITY 12 | dest: "{{ ansible_env.HOME }}/Tools/silenttrinity" 13 | 14 | - name: Install via pipenv 15 | shell: | 16 | pipenv install 17 | args: 18 | chdir: "{{ ansible_env.HOME }}/Tools/silenttrinity/Server" 19 | -------------------------------------------------------------------------------- /sprayingtoolkit.yml: -------------------------------------------------------------------------------- 1 | - name: SprayingToolkit 2 | hosts: all 3 | tasks: 4 | - name: Install core deps 5 | apt: 6 | name: 7 | - python3 8 | 9 | - name: Clone repo 10 | git: 11 | repo: https://github.com/byt3bl33d3r/SprayingToolkit 12 | dest: "{{ ansible_env.HOME }}/Tools/sprayingtoolkit" 13 | 14 | - name: Install via pipenv 15 | shell: | 16 | pipenv install 17 | args: 18 | chdir: "{{ ansible_env.HOME }}/Tools/sprayingtoolkit" 19 | --------------------------------------------------------------------------------