forked from p15670423/monkey
Agent: Modify modify shell startup files PBA to return PostBreachData
This commit is contained in:
parent
29d40f8e9d
commit
8418a5ce77
|
@ -1,11 +1,11 @@
|
||||||
import subprocess
|
import subprocess
|
||||||
|
|
||||||
from common.common_consts.post_breach_consts import POST_BREACH_SHELL_STARTUP_FILE_MODIFICATION
|
from common.common_consts.post_breach_consts import POST_BREACH_SHELL_STARTUP_FILE_MODIFICATION
|
||||||
|
from infection_monkey.i_puppet.i_puppet import PostBreachData
|
||||||
from infection_monkey.post_breach.pba import PBA
|
from infection_monkey.post_breach.pba import PBA
|
||||||
from infection_monkey.post_breach.shell_startup_files.shell_startup_files_modification import (
|
from infection_monkey.post_breach.shell_startup_files.shell_startup_files_modification import (
|
||||||
get_commands_to_modify_shell_startup_files,
|
get_commands_to_modify_shell_startup_files,
|
||||||
)
|
)
|
||||||
from infection_monkey.telemetry.post_breach_telem import PostBreachTelem
|
|
||||||
|
|
||||||
|
|
||||||
class ModifyShellStartupFiles(PBA):
|
class ModifyShellStartupFiles(PBA):
|
||||||
|
@ -27,7 +27,9 @@ class ModifyShellStartupFiles(PBA):
|
||||||
False,
|
False,
|
||||||
)
|
)
|
||||||
]
|
]
|
||||||
PostBreachTelem(self, results).send()
|
# `command` is empty here since multiple commands were run and the results
|
||||||
|
# were aggregated to send the telemetry just once
|
||||||
|
return PostBreachData(self.name, "", results).send()
|
||||||
|
|
||||||
def modify_shell_startup_PBA_list(self):
|
def modify_shell_startup_PBA_list(self):
|
||||||
return self.ShellStartupPBAGenerator().get_modify_shell_startup_pbas()
|
return self.ShellStartupPBAGenerator().get_modify_shell_startup_pbas()
|
||||||
|
|
Loading…
Reference in New Issue