Next move from kali plugin to attack plugin. Step2

pull/3/head
Thorsten Sick 4 years ago
parent 95e9efb966
commit 49711ee4c9

@ -15,7 +15,7 @@ from app.interface_sfx import CommandlineColors
from caldera_control import CalderaControl from caldera_control import CalderaControl
from machine_control import Machine from machine_control import Machine
from app.exceptions import ServerError from app.exceptions import ServerError
from plugins.base.kali import KaliPlugin from plugins.base.attack import AttackPlugin
from app.pluginmanager import PluginManager from app.pluginmanager import PluginManager
@ -195,7 +195,7 @@ class Experiment():
# TODO: Extend beyond Kali # 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() name = plugin.get_name()
self.attack_logger.vprint(f"{CommandlineColors.OKBLUE}Running Kali plugin {name}{CommandlineColors.ENDC}", 2) self.attack_logger.vprint(f"{CommandlineColors.OKBLUE}Running Kali plugin {name}{CommandlineColors.ENDC}", 2)

@ -6,7 +6,7 @@ from glob import glob
import os import os
from plugins.base.plugin_base import BasePlugin 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.machinery import MachineryPlugin
from plugins.base.sensor import SensorPlugin from plugins.base.sensor import SensorPlugin
from plugins.base.vulnerability_plugin import VulnerabilityPlugin from plugins.base.vulnerability_plugin import VulnerabilityPlugin
@ -17,7 +17,7 @@ sections = [{"name": "Vulnerabilities",
{"name": "Machinery", {"name": "Machinery",
"subclass": MachineryPlugin}, "subclass": MachineryPlugin},
{"name": "Kali", {"name": "Kali",
"subclass": KaliPlugin}, "subclass": AttackPlugin},
{"name": "Sensors", {"name": "Sensors",
"subclass": SensorPlugin}, "subclass": SensorPlugin},
] ]
@ -38,7 +38,7 @@ class PluginManager():
""" Returns a list plugins matching specified criteria """ 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 :param name_filter: an optional list of names to select the plugins by
:return: A list of instantiated plugins :return: A list of instantiated plugins
""" """

@ -6,7 +6,7 @@ from app.exceptions import PluginError
import os import os
class KaliPlugin(BasePlugin): class AttackPlugin(BasePlugin):
""" Class to execute a command on a kali system targeting another system """ """ Class to execute a command on a kali system targeting another system """
# Boilerplate # Boilerplate

@ -2,10 +2,10 @@
# A plugin for hydra bruteforce attacks # 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 # Boilerplate
name = "hydra" name = "hydra"
@ -22,7 +22,7 @@ class HydraPlugin(KaliPlugin):
def run(self, targets): def run(self, targets):
""" Run the command """ 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 # Set defaults if not present in config

@ -2,7 +2,7 @@
# A plugin to nmap targets # 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 ! # 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 # TODO Verify decoy scan: -D RND:5 to generate 5 decoys
class NmapPlugin(KaliPlugin): class NmapPlugin(AttackPlugin):
# Boilerplate # Boilerplate
name = "nmap" name = "nmap"

@ -2,10 +2,10 @@
# A plugin to nmap targets slow motion, to evade sensors # 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 # Boilerplate
name = "nmap_sneaky" name = "nmap_sneaky"

@ -2,10 +2,10 @@
# A plugin to nmap targets - in an agressive way to break sensors # 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 # Boilerplate
name = "nmap_stresstest" name = "nmap_stresstest"

Loading…
Cancel
Save