ait-testbed / attackmate

AttackMate is an attack orchestration tool that executes full attack-chains based on playbooks.
GNU General Public License v3.0
20 stars 3 forks source link

Clean API for adding executors #104

Open whotwagner opened 3 months ago

whotwagner commented 3 months ago

Currently adding an executor to attackmate is done in attackmate.py and it is necessary to initialize the executor(https://github.com/ait-testbed/attackmate/blob/b09912ac1de0fc1a0214d67ec788d8d8fd2968af/src/attackmate/attackmate.py#L62) and add the command-type to an endless list of a "for-statement" (https://github.com/ait-testbed/attackmate/blob/b09912ac1de0fc1a0214d67ec788d8d8fd2968af/src/attackmate/attackmate.py#L112). Make that more easier for developers to add executors and make the code more clear.

whotwagner commented 3 months ago

I reopened this issue, because I still miss a couple of things. The purpose of this issue is, to make it as easy as possible for developers to create new executors. Currently it is necessary to create an executor, a schema for the correlating command and then the developer has to register the executor in that init.py and has to declare an initializer for the executor in attackmate.py and has to write an condition for the command-type to run the command with the correlating executor. I think we should brainstorm about possible solutions