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 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)

@ -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
"""

@ -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

@ -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

@ -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"

@ -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"

@ -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"

Loading…
Cancel
Save