You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+74-21Lines changed: 74 additions & 21 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,34 +6,63 @@ It is further possible to roll out playbooks.
6
6
7
7
## Requirements
8
8
9
-
- Debian or Ubuntu
9
+
- Debian 13
10
+
11
+
- Ubuntu 24.04
12
+
13
+
- Kali Linux (Rolling)
14
+
15
+
16
+
Note on gRPC: To ensure high performance and fast deployment, pre-compiled Python wheels (.whl) for grpc are automatically fetched by the role from our internal image server for the distributions listed above. For other operating systems, the role will fallback to compiling gRPC locally, which may significantly increase the initial setup time.
10
17
11
18
(Currently there are no packages defined for RedHat distributions)
| attackmate_tmux_session | str | attackmate | Use this existing session-name for the tmux-wrapper |
26
-
| attackmate_tmux_window | str | attackmate | The name of the tmux-window for attackmate |
27
-
| attackmate_config_dir | path | /etc/attackmate | Path to the config-directory |
28
-
| attackmate_playbook_path | path |`{{ attackmate_config_dir }}/playbooks`| Path to the playbooks-directory |
29
-
| attackmate_playbooks | list of playbook-templates(j2) |`[]`| List of playbooks to deploy |
30
-
| attackmate_config_tpl | str | attackmate.yml.j2 | Name of the config-template(jinja) |
31
-
| attackmate_sliver_config | path |**None**| Path to the generated sliver-config. (only needed for sliver-commands) |
32
-
| attackmate_msf_server | hostname |**None**| Hostname of the Metasploit rpcd. (only needed for msf-commands) |
33
-
| attackmate_msf_passwd | password |**None**| Password for the Metasploit rpcd. (only needed for msf-commands) |
34
-
| attackmate_playwright | bool | True | Whether to install Playwright and its dependencies |
35
-
| command_delay | float |**None**| delay in seconds before commands for the CommandConfig |
36
-
| attackmate_remote_config | dict | {} | Optional map of named remote AttackMate connections. Each entry requires url, username, password, and optionally cafile. If empty, no remote_config section is written to the config file. |
24
+
| attackmate_url | url |https://github.com/ait-aecid/attackmate.git| Official attackmate repository |
25
+
| attackmate_version | version-str | main | Version/Branch of the Git-Repository in attackmate_url |
| attackmate_tmux_session | str | attackmate | Use this existing session-name for the tmux-wrapper |
33
+
| attackmate_tmux_window | str | attackmate | The name of the tmux-window for attackmate |
34
+
| attackmate_config_dir | path | /etc/attackmate | Path to the config-directory |
35
+
| attackmate_playbook_path | path |`{{ attackmate_config_dir }}/playbooks`| Path to the playbooks-directory |
36
+
| attackmate_playbooks | list of playbook-templates(j2) |`[]`| List of playbooks to deploy |
37
+
| attackmate_config_tpl | str | attackmate.yml.j2 | Name of the config-template(jinja) |
38
+
| attackmate_sliver_config | path |**None**| Path to the generated sliver-config. (only needed for sliver-commands) |
39
+
| attackmate_msf_server | hostname |**None**| Hostname of the Metasploit rpcd. (only needed for msf-commands) |
40
+
| attackmate_msf_passwd | password |**None**| Password for the Metasploit rpcd. (only needed for msf-commands) |
41
+
| attackmate_playwright | bool | True | Whether to install Playwright and its dependencies |
42
+
| command_delay | float |**None**| delay in seconds before commands for the CommandConfig |
43
+
| attackmate_remote_config | dict | {} | Optional map of named remote AttackMate connections. Each entry requires url, username, password, and optionally cafile. If empty, no remote_config section is written to the config file.|
44
+
45
+
## Additional role Variables for installation as Api server
| attackmate_api_server_url | url |https://github.com/ait-testbed/attackmate-api-server.git| Repository URL for the api server |
50
+
| attackmate_api_server_version | version-str | main | Version/Branch of the api server repository |
51
+
| attackmate_api_server_dest | path | {{ attackmate_shared_dir }}/attackmate-api-server | Installation path of the api server |
52
+
| attackmate_api_bin_path | path | /usr/local/bin/attackmate-api | Installation path for the attackmate-api executable |
53
+
| attackmate_api_service_path | path | /etc/systemd/system/attackmate-api.service | Path for the systemd service unit file |
54
+
| attackmate_api_log_dir | path | /var/log/attackmate-api | Directory for API server log files |
55
+
| attackmate_api_logs_to_disk | bool | False | Whether to write playbook logs to disk |
56
+
| attackmate_ssl_key_path | path | /etc/ssl/private/attackmate.key | Path for the generated RSA private key |
57
+
| attackmate_ssl_cert_path | path | /etc/ssl/certs/attackmate.pem | Path for the generated self-signed certificate |
58
+
| attackmate_api_plain_ users | dict | {} | Map of username to plaintext password used to generate argon2 hashes at deploy time. Format: {"username": "password", ...}. Leave empty to skip user generation. Never commit plaintext passwords! |
59
+
60
+
61
+
> [!WARNING]
62
+
> `attackmate_api_plain_users` contains plaintext passwords and must **never** be committed to version control.
63
+
> Only define this variable locally on the machine you are running the playbook from, either by passing it via
64
+
> `--extra-vars` at runtime or in a local vars file that is excluded from your repository via `.gitignore`.
65
+
> The hashing and deployment happen in memory only — the plaintext passwords are never written to the target host.
37
66
38
67
## Example Playbook
39
68
@@ -66,6 +95,30 @@ This role installs to executables:
66
95
* **/usr/local/bin/attackm8**: a wrapper for attackmate that uses the virtual environment
67
96
* **/usr/local/bin/attackmate-tmux**: a wrapper that executes attackmate in a tmux-session
68
97
98
+
## Installing as API Server
99
+
100
+
AttackMate can optionally be installed together with the [AttackMate API Server](https://github.com/ait-testbed/attackmate-api-server),
101
+
which exposes AttackMate's functionality via a REST API and allows remote instances to be controlled over the network.
102
+
The API server is installed into the same virtual environment as AttackMate, since it depends on it.
103
+
104
+
To enable the API server, set `attackmate_api_server: True` in your playbook:
105
+
```yaml
106
+
- name: Install attackmate with API server
107
+
become: true
108
+
hosts: localhost
109
+
roles:
110
+
- role: attackmate
111
+
vars:
112
+
attackmate_api_server: True
113
+
attackmate_api_plain_users:
114
+
admin: "securepassword"
115
+
116
+
```
117
+
118
+
installs to executables:
119
+
120
+
* **/usr/local/bin/attackmate-api-server**: symlink to the attackmate-api-server executable in the virtual environment
0 commit comments