Skip to content

Commit

Permalink
Merge branch '3077-i-otp-provider' into develop
Browse files Browse the repository at this point in the history
Issue #3077
PR #3110
  • Loading branch information
mssalvatore committed Mar 14, 2023
2 parents 2c75a1b + ce0f256 commit 69f3867
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
18 changes: 18 additions & 0 deletions monkey/infection_monkey/exploit/i_agent_otp_provider.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import abc


class IAgentOTPProvider(metaclass=abc.ABCMeta):
"""
IAgentOTPProvider provides an interface for other components to get one-time passwords (OTPs).
Notably, this is used by exploiters during propagation to get OTPs for running new
Agents on exploited machines, so that they can authenticate with the Island.
"""

@abc.abstractmethod
def get_otp(self) -> str:
"""
Get a one-time password (OTP)
:return: An OTP
"""
pass
2 changes: 2 additions & 0 deletions vulture_allowlist.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
from common.base_models import InfectionMonkeyModelConfig, MutableInfectionMonkeyModelConfig
from common.credentials import LMHash, NTHash, SecretEncodingConfig
from common.types import Lock, NetworkPort, PluginName
from infection_monkey.exploit.i_otp_provider import IAgentOTPProvider
from infection_monkey.exploit.log4shell_utils.ldap_server import LDAPServerFactory
from infection_monkey.exploit.tools import generate_brute_force_credentials, secret_type_filter
from infection_monkey.exploit.zerologon import NetrServerPasswordSet, NetrServerPasswordSetResponse
Expand Down Expand Up @@ -143,3 +144,4 @@

# Remove after #3077
http_island_api_client.get_otp
IAgentOTPProvider

0 comments on commit 69f3867

Please sign in to comment.