diff --git a/monkey/infection_monkey/exploit/zerologon.py b/monkey/infection_monkey/exploit/zerologon.py index 2c180009b..684350947 100644 --- a/monkey/infection_monkey/exploit/zerologon.py +++ b/monkey/infection_monkey/exploit/zerologon.py @@ -22,25 +22,6 @@ from infection_monkey.network.windowsserver_fingerprint import ZerologonFinger LOG = logging.getLogger(__name__) -class NetrServerPasswordSet(nrpc.NDRCALL): - opnum = 6 - structure = ( - ('PrimaryName', nrpc.PLOGONSRV_HANDLE), - ('AccountName', nrpc.WSTR), - ('SecureChannelType', nrpc.NETLOGON_SECURE_CHANNEL_TYPE), - ('ComputerName', nrpc.WSTR), - ('Authenticator', nrpc.NETLOGON_AUTHENTICATOR), - ('UasNewPassword', nrpc.ENCRYPTED_NT_OWF_PASSWORD), - ) - - -class NetrServerPasswordSetResponse(nrpc.NDRCALL): - structure = ( - ('ReturnAuthenticator', nrpc.NETLOGON_AUTHENTICATOR), - ('ErrorCode', nrpc.NTSTATUS), - ) - - class ZerologonExploiter(HostExploiter): _TARGET_OS_TYPE = ['windows'] _EXPLOITED_SERVICE = 'Netlogon' @@ -194,3 +175,22 @@ class ZerologonExploiter(HostExploiter): except BaseException as ex: LOG.info(f"Unexpected error: {ex}") + + +class NetrServerPasswordSet(nrpc.NDRCALL): + opnum = 6 + structure = ( + ('PrimaryName', nrpc.PLOGONSRV_HANDLE), + ('AccountName', nrpc.WSTR), + ('SecureChannelType', nrpc.NETLOGON_SECURE_CHANNEL_TYPE), + ('ComputerName', nrpc.WSTR), + ('Authenticator', nrpc.NETLOGON_AUTHENTICATOR), + ('UasNewPassword', nrpc.ENCRYPTED_NT_OWF_PASSWORD), + ) + + +class NetrServerPasswordSetResponse(nrpc.NDRCALL): + structure = ( + ('ReturnAuthenticator', nrpc.NETLOGON_AUTHENTICATOR), + ('ErrorCode', nrpc.NTSTATUS), + )