Skip to content

Commit

Permalink
Merge pull request #78 from annaerdi/docs
Browse files Browse the repository at this point in the history
Ansible installation documentation
  • Loading branch information
whotwagner authored Jun 13, 2024
2 parents d31dd70 + 830b68e commit e622717
Showing 1 changed file with 81 additions and 2 deletions.
83 changes: 81 additions & 2 deletions docs/source/installation/ansible.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,87 @@ Installation with Ansible
It is possible to automatically install AttackMate using
Ansible. The `ansible-role <https://github.com/ait-aecid/attackmate-ansible>`_ also deploys the sliver-fix.

A sample playbook can be found in the README-page of the `github-repository <https://github.com/ait-aecid/attackmate-ansible>`_

.. note::

Currently the ansible role only works with Debian and Ubuntu distributions.


Installation Steps
==================

1. Install Ansible:

::

$ sudo apt update
$ sudo apt install ansible -y

2. Set Up the Playbook

Create a new directory for your AttackMate setup, navigate into it, and create your playbook file:

::

$ mkdir my-attackmate
$ cd my-attackmate
$ touch install_attackmate.yml

Open the `install_attackmate.yml` file and fill it with this sample playbook (it also can be found on the README-page
of the `github-repository <https://github.com/ait-aecid/attackmate-ansible>`_), which installs AttackMate on localhost:

::

- name: Install attackmate
become: true
hosts: localhost
roles:
- role: attackmate
vars:
attackmate_sliverfix: True
attackmate_version: development
attackmate_msf_server: localhost
attackmate_msf_passwd: hackerman
attackmate_playbooks:
- upgradeshell.j2
- attackchain.j2



3. Create an Inventory File:

Create an inventory file to specify the hosts. For example, create a file named `hosts` with the
following content:

::

[local]
localhost ansible_connection=local


3. Clone the Ansible Role

Ansible expects all roles to be in the **roles** directory. Create this directory and clone the repository:

::

$ mkdir -p roles/attackmate
$ git clone https://github.com/ait-testbed/attackmate-ansible roles/attackmate

4. Run the playbook

::

$ ansible-playbook -i hosts install_attackmate.yml

.. note::

If you don't have an SSH key set up for passwordless access, you might need to use the `--ask-become-pass` flag, as
Ansible requires a password for `sudo` operations.

To verify that the installation was successful, run:

::

$ attackm8 -h

This should display the usage of AttackMate.

0 comments on commit e622717

Please sign in to comment.