From a4207494ece1002bd65f477829237af0f1bf49bd Mon Sep 17 00:00:00 2001 From: Shreya Date: Wed, 6 Jan 2021 15:44:44 +0530 Subject: [PATCH] Change classes order in file --- monkey/infection_monkey/exploit/zerologon.py | 38 ++++++++++---------- 1 file changed, 19 insertions(+), 19 deletions(-) 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), + )