Agent: Fix timeout in ZeroLogon

Timeout should be on DCERPC transport factory.
This commit is contained in:
Ilija Lazoroski 2022-03-29 13:36:53 +02:00
parent e7e6201d75
commit 0a5fc84b4e
1 changed files with 3 additions and 2 deletions

View File

@ -91,8 +91,9 @@ class ZerologonExploiter(HostExploiter):
@staticmethod @staticmethod
def connect_to_dc(dc_ip) -> object: def connect_to_dc(dc_ip) -> object:
binding = epm.hept_map(dc_ip, nrpc.MSRPC_UUID_NRPC, protocol="ncacn_ip_tcp") binding = epm.hept_map(dc_ip, nrpc.MSRPC_UUID_NRPC, protocol="ncacn_ip_tcp")
rpc_con = transport.DCERPCTransportFactory(binding).get_dce_rpc() rpc_transport = transport.DCERPCTransportFactory(binding)
rpc_con.set_connect_timeout(LONG_REQUEST_TIMEOUT) rpc_transport.set_connect_timeout(LONG_REQUEST_TIMEOUT)
rpc_con = rpc_transport.get_dce_rpc()
rpc_con.connect() rpc_con.connect()
rpc_con.bind(nrpc.MSRPC_UUID_NRPC) rpc_con.bind(nrpc.MSRPC_UUID_NRPC)
return rpc_con return rpc_con