Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
34315b5
client mixins
thorinaboenke May 29, 2026
f594f59
multi session support
thorinaboenke May 29, 2026
722df90
multi session support sliver
thorinaboenke May 29, 2026
d4414f0
add connection to metasploit schema
thorinaboenke May 29, 2026
3cf5668
multi session unit tests
thorinaboenke May 29, 2026
75b7239
update docs with multi connections
thorinaboenke May 29, 2026
72f32d5
fix name collisions connections vs config parameters
thorinaboenke May 29, 2026
54817af
docs for multi connections
thorinaboenke May 29, 2026
ed06e6e
missing comma
thorinaboenke May 29, 2026
9a042bc
scope session store by connection
thorinaboenke May 29, 2026
6929f99
informative connection log
thorinaboenke Jun 2, 2026
4e4ed48
Add alias entry 'attackm8' to pyproject.toml
whotwagner Jun 2, 2026
267f5c1
Merge pull request #238 from thorinaboenke/feature_multi_connections_…
whotwagner Jun 9, 2026
e31e8a4
fix background validator
thorinaboenke Jun 11, 2026
2c77306
add jitter fields to config
thorinaboenke Jun 11, 2026
f9cba7f
add calculation of command delay jitter
thorinaboenke Jun 11, 2026
a546b94
add jitter docstring
thorinaboenke Jun 11, 2026
a470ae4
add tests for jitter behaviour
thorinaboenke Jun 11, 2026
19f24a0
add jitter to docs
thorinaboenke Jun 11, 2026
4c27a78
add jitter to config in index.rst
thorinaboenke Jun 11, 2026
05fe5f4
fix bug report template
thorinaboenke Jun 11, 2026
fc6f645
typo
thorinaboenke Jun 11, 2026
511b2d9
add config to bug template
thorinaboenke Jun 11, 2026
130be53
Merge pull request #244 from thorinaboenke/feature/command_delay_jitter
whotwagner Jun 11, 2026
ede11ef
Merge pull request #245 from thorinaboenke/fix/issue_templates
whotwagner Jun 11, 2026
255a729
Merge pull request #241 from thorinaboenke/fix/background_validator
whotwagner Jun 11, 2026
6954dac
use attackmate-client from pypi
thorinaboenke Jun 15, 2026
3f26eb4
uv lock
thorinaboenke Jun 15, 2026
55598ff
Merge pull request #246 from thorinaboenke/fix/use_attackmate_client_…
whotwagner Jun 15, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 22 additions & 4 deletions .github/ISSUE_TEMPLATE/01_bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,33 @@ about: If something isn't working 🔧
Describe your issue here.

### Your environment
* Version of ruby
* Docker or manual installation?
* Which browser and its version
* Version of AttackMate (`attackmate --version`)
* Python version (`python --version`)
* Ansible, Docker, pip, or uv installation?
* OS and version

### Steps to reproduce
Tell us how to reproduce this issue.
Tell us how to reproduce this issue.

### Playbook
Provide a minimal playbook that reproduces the issue (remove sensitive data):

```yaml

```

### Config
Provide the config you used.

```yaml

```

### Expected behaviour
Tell us what should happen

### Actual behaviour
Tell us what happens instead

### Log output
Paste the relevant log output or error/stack trace here:
3 changes: 1 addition & 2 deletions .github/ISSUE_TEMPLATE/02_feature_request.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ about: If you have a feature request 💡

**Context**

What are you trying to do and how would you want to do it differently? Is it something you currently you cannot do? Is this related to an issue/problem?
What are you trying to do and how would you want to do it differently? Is it something you currently cannot do? Is this related to an issue/problem?

**Alternatives**

Expand All @@ -18,4 +18,3 @@ Please provide a link to the issue.
**If the feature request is approved, would you be willing to submit a PR?**

Yes / No _(Help can be provided if you need assistance submitting a PR)_

29 changes: 29 additions & 0 deletions docs/source/configuration/command_config.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ These are settings for **all** commands.
cmd_config:
loop_sleep: 5
command_delay: 0
command_delay_jitter: false
command_delay_jitter_min: 0.5
command_delay_jitter_max: 2.0

.. confval:: loop_sleep

Expand All @@ -27,3 +30,29 @@ These are settings for **all** commands.

:type: float
:default: 0

.. confval:: command_delay_jitter

When ``true``, randomizes the per-command delay. The effective delay is calculated as
``command_delay ± random(command_delay_jitter_min, command_delay_jitter_max)``,
clamped to a minimum of ``0``. Has no effect when ``command_delay_jitter``
is ``false``.

:type: bool
:default: false

.. confval:: command_delay_jitter_min

Lower bound of the jitter offset in seconds. Only used when
:confval:`command_delay_jitter` is ``true``.

:type: float
:default: 0.5

.. confval:: command_delay_jitter_max

Upper bound of the jitter offset in seconds. Only used when
:confval:`command_delay_jitter` is ``true``.

:type: float
:default: 2.0
13 changes: 9 additions & 4 deletions docs/source/configuration/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,10 @@ sliver, metasploit and remote attackmate server:

cmd_config:
loop_sleep: 5
command_delay: 0
command_delay: 1
command_delay_jitter: true
command_delay_jitter_min: 0.5
command_delay_jitter_max: 2.0

bettercap_config:
default:
Expand All @@ -35,11 +38,13 @@ sliver, metasploit and remote attackmate server:
password: password

msf_config:
password: securepassword
server: 127.0.0.1
default:
password: securepassword
server: 127.0.0.1

sliver_config:
config_file: /home/attacker/.sliver-client/configs/attacker_localhost.cfg
default:
config_file: /home/attacker/.sliver-client/configs/attacker_localhost.cfg

remote_config:
remote_server_name:
Expand Down
33 changes: 30 additions & 3 deletions docs/source/configuration/msf_config.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,40 @@
msf_config
==========

``msf_config`` holds connection settings for the Metasploit RPC daemon (``msfrpcd``).
``msf_config`` holds connection settings for one or more Metasploit RPC daemon (``msfrpcd``)
instances. Each connection is identified by a name. The first defined connection is used by
default when a command does not specify one explicitly.

.. code-block:: yaml

msf_config:
password: securepassword
server: 10.18.3.86
primary:
password: securepassword
server: 10.18.3.86

Multiple servers can be defined and selected per command via the :confval:`connection` field:

.. code-block:: yaml

msf_config:
server1:
password: securepassword
server: 10.18.3.86
server2:
password: anothersecret
server: 10.18.3.87

.. note::

**Backwards compatibility:** The legacy single-server format is still accepted and is
automatically migrated to a named entry called ``default``:

.. code-block:: yaml

# Legacy format (still supported)
msf_config:
password: securepassword
server: 10.18.3.86


.. confval:: server
Expand Down
29 changes: 27 additions & 2 deletions docs/source/configuration/sliver_config.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,37 @@
sliver_config
=============

``sliver_config`` stores all settings to control the connection to the Sliver API.
``sliver_config`` stores connection settings for one or more Sliver C2 servers.
Each connection is identified by a name. The first defined connection is used by
default when a command does not specify one explicitly.

.. code-block:: yaml

sliver_config:
config_file: /home/attacker/.sliver-client/configs/attacker_localhost.cfg
primary:
config_file: /home/attacker/.sliver-client/configs/attacker_localhost.cfg

Multiple servers can be defined and selected per command via the :confval:`connection` field:

.. code-block:: yaml

sliver_config:
sliver_server1:
config_file: /home/attacker/.sliver-client/configs/attacker_localhost.cfg
sliver_server2:
config_file: /home/attacker/.sliver-client/configs/attacker2_localhost.cfg

.. note::

**Backwards compatibility:** The legacy single-server format is still accepted and is
automatically migrated to a named entry called ``default``:

.. code-block:: yaml

# Legacy format (still supported)
sliver_config:
config_file: /home/attacker/.sliver-client/configs/attacker_localhost.cfg


.. confval:: config_file

Expand Down
2 changes: 1 addition & 1 deletion docs/source/developing/command.rst
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ The factory filters the provided configurations based on the class constructor s
'pm': self.pm,
'varstore': self.varstore,
'cmdconfig': self.pyconfig.cmd_config,
'msfconfig': self.pyconfig.msf_config,
'msf_config': self.pyconfig.msf_config,
'msfsessionstore': self.msfsessionstore,
'sliver_config': self.pyconfig.sliver_config,
'runfunc': self._run_commands,
Expand Down
10 changes: 5 additions & 5 deletions docs/source/developing/integration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -247,11 +247,11 @@ Top-level configuration object. All fields have safe defaults, so an empty
- ``CommandConfig``
- Global command execution settings. See below.
* - ``msf_config``
- ``MsfConfig``
- Metasploit RPC connection settings. See below.
- ``dict[str, MsfConfig]``
- Named Metasploit RPC connections. See below.
* - ``sliver_config``
- ``SliverConfig``
- Sliver C2 connection settings. See below.
- ``dict[str, SliverConfig]``
- Named Sliver C2 connections. See below.
* - ``bettercap_config``
- ``dict[str, BettercapConfig]``
- Named Bettercap instances. Keys are referenced by ``webserv`` commands.
Expand Down Expand Up @@ -440,7 +440,7 @@ Running a Single Command
initialize_logger(debug=False, append_logs=False)

config = Config(
msf_config={"password": "your_password", "ssl": True, "port": 55553},
msf_config={"default": {"password": "your_password", "ssl": True, "port": 55553}},
cmd_config={"loop_sleep": 10},
)
varstore = {"HOST": "10.0.0.1"}
Expand Down
9 changes: 8 additions & 1 deletion docs/source/playbook/commands/msf-module.rst
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,14 @@ Most exploit modules do not produce direct output but instead open a session

:type: str

The following example illustrates the use of sessions and payloads:
.. confval:: connection

Name of the MSF server connection to use, as defined in :ref:`msf_config`.
If omitted, the first configured connection is used.

:type: str

The following example illustrates the use of sessions and payloads:

.. code-block:: yaml

Expand Down
7 changes: 7 additions & 0 deletions docs/source/playbook/commands/msf-session.rst
Original file line number Diff line number Diff line change
Expand Up @@ -78,3 +78,10 @@ Execute commands in an active Meterpreter session previously opened by an
String indicating the end of a read-operation.

:type: str

.. confval:: connection

Name of the MSF server connection to use, as defined in :ref:`msf_config`.
If omitted, the first configured connection is used.

:type: str
7 changes: 7 additions & 0 deletions docs/source/playbook/commands/payload.rst
Original file line number Diff line number Diff line change
Expand Up @@ -100,3 +100,10 @@ Generate a Metasploit payload and save it to a file.

:type: int
:default: ``0``

.. confval:: connection

Name of the MSF server connection to use, as defined in :ref:`msf_config`.
If omitted, the first configured connection is used.

:type: str
9 changes: 9 additions & 0 deletions docs/source/playbook/commands/sliver-session.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ Execute commands within an active Sliver implant session. All commands require a

.. note::

To configure the connection to the Sliver server, see :ref:`sliver_config`.

**For developers:** The ``sliver`` and ``sliver-session`` command families use a legacy
``type`` + ``cmd`` discrimination pattern and should not be replicated. New commands
must define a unique ``type`` literal and handle sub-behavior branching via ``cmd``
Expand All @@ -22,6 +24,13 @@ Execute commands within an active Sliver implant session. All commands require a
:type: str
:required: True

.. confval:: connection

Name of the Sliver server connection to use, as defined in :ref:`sliver_config`.
If omitted, the first configured connection is used.

:type: str

File System
-----------

Expand Down
9 changes: 9 additions & 0 deletions docs/source/playbook/commands/sliver.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,20 @@ Control the Sliver C2 server via its API. All commands use ``type: sliver``.

.. note::

To configure the connection to the Sliver server, see :ref:`sliver_config`.

**For developers:** The ``sliver`` and ``sliver-session`` command families use a legacy
``type`` + ``cmd`` discrimination pattern and should not be replicated. New commands
must define a unique ``type`` literal and handle sub-behavior branching via ``cmd``
in the executor. See :ref:`command` for details.

.. confval:: connection

Name of the Sliver server connection to use, as defined in :ref:`sliver_config`.
If omitted, the first configured connection is used.

:type: str

start_https_listener
--------------------

Expand Down
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,13 @@ dependencies = [
"dotenv",
"passlib",
"python-multipart",
"attackmate-client @ git+https://github.com/ait-testbed/attackmate-client.git",
"attackmate-client>=0.1.2",
]
dynamic = ["version"]

[project.scripts]
attackmate = "attackmate.__main__:main"
attackm8 = "attackmate.__main__:main"

[build-system]
requires = ["setuptools>=61.0.0", "wheel"]
Expand Down
Loading
Loading