From 64827ac589f6122215db050cee1b29a44730d876 Mon Sep 17 00:00:00 2001 From: Mike Salvatore Date: Mon, 10 Jan 2022 08:30:55 -0500 Subject: [PATCH] Agent: Rename IServiceExploiter -> IExploitableService --- .../exploit/log4shell_utils/service_exploiters/__init__.py | 4 ++-- .../{exploitable_service.py => i_service_exploiter.py} | 2 +- .../exploit/log4shell_utils/service_exploiters/poc_docker.py | 4 ++-- .../exploit/log4shell_utils/service_exploiters/solr.py | 4 ++-- .../exploit/log4shell_utils/service_exploiters/tomcat.py | 4 ++-- 5 files changed, 9 insertions(+), 9 deletions(-) rename monkey/infection_monkey/exploit/log4shell_utils/service_exploiters/{exploitable_service.py => i_service_exploiter.py} (87%) 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 96823c894..e1b1595d2 100644 --- a/monkey/infection_monkey/exploit/log4shell_utils/service_exploiters/__init__.py +++ b/monkey/infection_monkey/exploit/log4shell_utils/service_exploiters/__init__.py @@ -1,10 +1,10 @@ from typing import List -from .exploitable_service import IExploitableService +from .i_service_exploiter import IServiceExploiter from .poc_docker import DockerPOCExploit from .solr import SolrExploit from .tomcat import TomcatExploit -def get_log4shell_service_exploiters() -> List[IExploitableService]: +def get_log4shell_service_exploiters() -> List[IServiceExploiter]: return [DockerPOCExploit(), SolrExploit(), TomcatExploit()] diff --git a/monkey/infection_monkey/exploit/log4shell_utils/service_exploiters/exploitable_service.py b/monkey/infection_monkey/exploit/log4shell_utils/service_exploiters/i_service_exploiter.py similarity index 87% rename from monkey/infection_monkey/exploit/log4shell_utils/service_exploiters/exploitable_service.py rename to monkey/infection_monkey/exploit/log4shell_utils/service_exploiters/i_service_exploiter.py index 20a3b92e7..963925e4d 100644 --- a/monkey/infection_monkey/exploit/log4shell_utils/service_exploiters/exploitable_service.py +++ b/monkey/infection_monkey/exploit/log4shell_utils/service_exploiters/i_service_exploiter.py @@ -3,7 +3,7 @@ import abc from infection_monkey.model import VictimHost -class IExploitableService(metaclass=abc.ABCMeta): +class IServiceExploiter(metaclass=abc.ABCMeta): @property @abc.abstractmethod def service_name(self) -> str: 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 index ae142eed7..32aba9cec 100644 --- a/monkey/infection_monkey/exploit/log4shell_utils/service_exploiters/poc_docker.py +++ b/monkey/infection_monkey/exploit/log4shell_utils/service_exploiters/poc_docker.py @@ -2,13 +2,13 @@ from logging import getLogger import requests -from infection_monkey.exploit.log4shell_utils.service_exploiters import IExploitableService +from infection_monkey.exploit.log4shell_utils.service_exploiters import IServiceExploiter from infection_monkey.model import VictimHost logger = getLogger(__name__) -class DockerPOCExploit(IExploitableService): +class DockerPOCExploit(IServiceExploiter): service_name = "GoFinance mock application" diff --git a/monkey/infection_monkey/exploit/log4shell_utils/service_exploiters/solr.py b/monkey/infection_monkey/exploit/log4shell_utils/service_exploiters/solr.py index 6e6771357..8078a106c 100644 --- a/monkey/infection_monkey/exploit/log4shell_utils/service_exploiters/solr.py +++ b/monkey/infection_monkey/exploit/log4shell_utils/service_exploiters/solr.py @@ -2,13 +2,13 @@ from logging import getLogger import requests -from infection_monkey.exploit.log4shell_utils.service_exploiters import IExploitableService +from infection_monkey.exploit.log4shell_utils.service_exploiters import IServiceExploiter from infection_monkey.model import VictimHost logger = getLogger(__name__) -class SolrExploit(IExploitableService): +class SolrExploit(IServiceExploiter): service_name = "Apache Solr" @staticmethod diff --git a/monkey/infection_monkey/exploit/log4shell_utils/service_exploiters/tomcat.py b/monkey/infection_monkey/exploit/log4shell_utils/service_exploiters/tomcat.py index bfabdd854..018896207 100644 --- a/monkey/infection_monkey/exploit/log4shell_utils/service_exploiters/tomcat.py +++ b/monkey/infection_monkey/exploit/log4shell_utils/service_exploiters/tomcat.py @@ -2,13 +2,13 @@ from logging import getLogger import requests -from infection_monkey.exploit.log4shell_utils.service_exploiters import IExploitableService +from infection_monkey.exploit.log4shell_utils.service_exploiters import IServiceExploiter from infection_monkey.model import VictimHost logger = getLogger(__name__) -class TomcatExploit(IExploitableService): +class TomcatExploit(IServiceExploiter): service_name = "Apache Tomcat" @staticmethod