Agent: Always try to move the dropper first
This commit is contained in:
parent
5c668505e6
commit
5162d973d7
|
@ -86,7 +86,6 @@ class Configuration(object):
|
||||||
# dropper config
|
# dropper config
|
||||||
###########################
|
###########################
|
||||||
|
|
||||||
dropper_try_move_first = True
|
|
||||||
dropper_set_date = True
|
dropper_set_date = True
|
||||||
dropper_date_reference_path_windows = r"%windir%\system32\kernel32.dll"
|
dropper_date_reference_path_windows = r"%windir%\system32\kernel32.dll"
|
||||||
dropper_date_reference_path_linux = "/bin/sh"
|
dropper_date_reference_path_linux = "/bin/sh"
|
||||||
|
|
|
@ -72,8 +72,8 @@ class MonkeyDrops(object):
|
||||||
if not file_moved and os.path.exists(self._config["destination_path"]):
|
if not file_moved and os.path.exists(self._config["destination_path"]):
|
||||||
os.remove(self._config["destination_path"])
|
os.remove(self._config["destination_path"])
|
||||||
|
|
||||||
# first try to move the file
|
# always try to move the file first
|
||||||
if not file_moved and WormConfiguration.dropper_try_move_first:
|
if not file_moved:
|
||||||
try:
|
try:
|
||||||
shutil.move(self._config["source_path"], self._config["destination_path"])
|
shutil.move(self._config["source_path"], self._config["destination_path"])
|
||||||
|
|
||||||
|
@ -187,11 +187,8 @@ class MonkeyDrops(object):
|
||||||
logger.info("Cleaning up the dropper")
|
logger.info("Cleaning up the dropper")
|
||||||
|
|
||||||
try:
|
try:
|
||||||
if (
|
if self._config["source_path"].lower() != self._config["destination_path"].lower() \
|
||||||
(self._config["source_path"].lower() != self._config["destination_path"].lower())
|
and os.path.exists(self._config["source_path"]):
|
||||||
and os.path.exists(self._config["source_path"])
|
|
||||||
and WormConfiguration.dropper_try_move_first
|
|
||||||
):
|
|
||||||
|
|
||||||
# try removing the file first
|
# try removing the file first
|
||||||
try:
|
try:
|
||||||
|
|
|
@ -26,7 +26,6 @@
|
||||||
|
|
||||||
"monkey_dir_name": "monkey_dir",
|
"monkey_dir_name": "monkey_dir",
|
||||||
|
|
||||||
"dropper_try_move_first": true,
|
|
||||||
"exploiter_classes": [
|
"exploiter_classes": [
|
||||||
"SSHExploiter",
|
"SSHExploiter",
|
||||||
"SmbExploiter",
|
"SmbExploiter",
|
||||||
|
|
Loading…
Reference in New Issue