forked from p34709852/monkey
Agent: Rename UsersPBA to CustomPBA for consistency
This commit is contained in:
parent
24915ba797
commit
079d768f73
|
@ -51,7 +51,7 @@ from infection_monkey.post_breach.actions.schedule_jobs import ScheduleJobs
|
|||
from infection_monkey.post_breach.actions.timestomping import Timestomping
|
||||
from infection_monkey.post_breach.actions.use_signed_scripts import SignedScriptProxyExecution
|
||||
from infection_monkey.post_breach.actions.use_trap_command import TrapCommand
|
||||
from infection_monkey.post_breach.custom_pba.users_custom_pba import UsersPBA
|
||||
from infection_monkey.post_breach.custom_pba.custom_pba import CustomPBA
|
||||
from infection_monkey.puppet.puppet import Puppet
|
||||
from infection_monkey.system_singleton import SystemSingleton
|
||||
from infection_monkey.telemetry.attack.t1106_telem import T1106Telem
|
||||
|
@ -317,7 +317,7 @@ class InfectionMonkey:
|
|||
PluginType.POST_BREACH_ACTION,
|
||||
)
|
||||
puppet.load_plugin(
|
||||
"CustomPBA", UsersPBA(self._telemetry_messenger), PluginType.POST_BREACH_ACTION
|
||||
"CustomPBA", CustomPBA(self._telemetry_messenger), PluginType.POST_BREACH_ACTION
|
||||
)
|
||||
|
||||
puppet.load_plugin("ransomware", RansomwarePayload(), PluginType.PAYLOAD)
|
||||
|
|
|
@ -20,13 +20,13 @@ DIR_CHANGE_WINDOWS = "cd %s & "
|
|||
DIR_CHANGE_LINUX = "cd %s ; "
|
||||
|
||||
|
||||
class UsersPBA(PBA):
|
||||
class CustomPBA(PBA):
|
||||
"""
|
||||
Defines user's configured post breach action.
|
||||
"""
|
||||
|
||||
def __init__(self, telemetry_messenger: ITelemetryMessenger):
|
||||
super(UsersPBA, self).__init__(telemetry_messenger, POST_BREACH_FILE_EXECUTION)
|
||||
super(CustomPBA, self).__init__(telemetry_messenger, POST_BREACH_FILE_EXECUTION)
|
||||
self.filename = ""
|
||||
|
||||
def run(self, options: Dict) -> Iterable[PostBreachData]:
|
||||
|
@ -63,7 +63,7 @@ class UsersPBA(PBA):
|
|||
def _execute_default(self):
|
||||
if self.filename:
|
||||
self.download_pba_file(get_monkey_dir_path(), self.filename)
|
||||
return super(UsersPBA, self)._execute_default()
|
||||
return super(CustomPBA, self)._execute_default()
|
||||
|
||||
@staticmethod
|
||||
def should_run(options):
|
Loading…
Reference in New Issue