diff --git a/app/experimentcontrol.py b/app/experimentcontrol.py index 393400e..76f3896 100644 --- a/app/experimentcontrol.py +++ b/app/experimentcontrol.py @@ -15,7 +15,7 @@ from app.interface_sfx import CommandlineColors from caldera_control import CalderaControl from machine_control import Machine from app.exceptions import ServerError -from plugins.base.kali import KaliPlugin +from plugins.base.attack import AttackPlugin from app.pluginmanager import PluginManager @@ -195,7 +195,7 @@ class Experiment(): # TODO: Extend beyond Kali - for plugin in self.plugin_manager.get_plugins(KaliPlugin, [attack]): + for plugin in self.plugin_manager.get_plugins(AttackPlugin, [attack]): name = plugin.get_name() self.attack_logger.vprint(f"{CommandlineColors.OKBLUE}Running Kali plugin {name}{CommandlineColors.ENDC}", 2) diff --git a/app/pluginmanager.py b/app/pluginmanager.py index a40634b..74fdfe9 100644 --- a/app/pluginmanager.py +++ b/app/pluginmanager.py @@ -6,7 +6,7 @@ from glob import glob import os from plugins.base.plugin_base import BasePlugin -from plugins.base.kali import KaliPlugin +from plugins.base.attack import AttackPlugin from plugins.base.machinery import MachineryPlugin from plugins.base.sensor import SensorPlugin from plugins.base.vulnerability_plugin import VulnerabilityPlugin @@ -17,7 +17,7 @@ sections = [{"name": "Vulnerabilities", {"name": "Machinery", "subclass": MachineryPlugin}, {"name": "Kali", - "subclass": KaliPlugin}, + "subclass": AttackPlugin}, {"name": "Sensors", "subclass": SensorPlugin}, ] @@ -38,7 +38,7 @@ class PluginManager(): """ Returns a list plugins matching specified criteria - :param subclass: The subclass to use to filter plugins. Currently: KaliPlugin, MachineryPlugin, SensorPlugin, VulnerabilityPlugin + :param subclass: The subclass to use to filter plugins. Currently: AttackPlugin, MachineryPlugin, SensorPlugin, VulnerabilityPlugin :param name_filter: an optional list of names to select the plugins by :return: A list of instantiated plugins """ diff --git a/plugins/base/kali.py b/plugins/base/attack.py similarity index 99% rename from plugins/base/kali.py rename to plugins/base/attack.py index 14becdf..387b3ba 100644 --- a/plugins/base/kali.py +++ b/plugins/base/attack.py @@ -6,7 +6,7 @@ from app.exceptions import PluginError import os -class KaliPlugin(BasePlugin): +class AttackPlugin(BasePlugin): """ Class to execute a command on a kali system targeting another system """ # Boilerplate diff --git a/plugins/default/kali/hydra/hydra_plugin.py b/plugins/default/kali/hydra/hydra_plugin.py index bdb7904..3934cf7 100644 --- a/plugins/default/kali/hydra/hydra_plugin.py +++ b/plugins/default/kali/hydra/hydra_plugin.py @@ -2,10 +2,10 @@ # A plugin for hydra bruteforce attacks -from plugins.base.kali import KaliPlugin +from plugins.base.attack import AttackPlugin -class HydraPlugin(KaliPlugin): +class HydraPlugin(AttackPlugin): # Boilerplate name = "hydra" @@ -22,7 +22,7 @@ class HydraPlugin(KaliPlugin): def run(self, targets): """ Run the command - @param targets: A list of targets, ip addresses will do + @param targets: A list of targets """ # Set defaults if not present in config diff --git a/plugins/default/kali/nmap/nmap_plugin.py b/plugins/default/kali/nmap/nmap_plugin.py index c2a3784..730141c 100644 --- a/plugins/default/kali/nmap/nmap_plugin.py +++ b/plugins/default/kali/nmap/nmap_plugin.py @@ -2,7 +2,7 @@ # A plugin to nmap targets -from plugins.base.kali import KaliPlugin +from plugins.base.attack import AttackPlugin # TODO All scan patterns need explicit logging into the attack log ! @@ -56,7 +56,7 @@ from plugins.base.kali import KaliPlugin # TODO Verify decoy scan: -D RND:5 to generate 5 decoys -class NmapPlugin(KaliPlugin): +class NmapPlugin(AttackPlugin): # Boilerplate name = "nmap" diff --git a/plugins/default/kali/nmap/nmap_sneaky_plugin.py b/plugins/default/kali/nmap/nmap_sneaky_plugin.py index 5d1454e..6ad338e 100644 --- a/plugins/default/kali/nmap/nmap_sneaky_plugin.py +++ b/plugins/default/kali/nmap/nmap_sneaky_plugin.py @@ -2,10 +2,10 @@ # A plugin to nmap targets slow motion, to evade sensors -from plugins.base.kali import KaliPlugin +from plugins.base.attack import AttackPlugin -class NmapSneakyPlugin(KaliPlugin): +class NmapSneakyPlugin(AttackPlugin): # Boilerplate name = "nmap_sneaky" diff --git a/plugins/default/kali/nmap/nmap_stresstest_plugin.py b/plugins/default/kali/nmap/nmap_stresstest_plugin.py index 9078cd4..8ae993f 100644 --- a/plugins/default/kali/nmap/nmap_stresstest_plugin.py +++ b/plugins/default/kali/nmap/nmap_stresstest_plugin.py @@ -2,10 +2,10 @@ # A plugin to nmap targets - in an agressive way to break sensors -from plugins.base.kali import KaliPlugin +from plugins.base.attack import AttackPlugin -class NmapStresstestPlugin(KaliPlugin): +class NmapStresstestPlugin(AttackPlugin): # Boilerplate name = "nmap_stresstest"