Example #1
0
 def test_hlookup(self):
     resp = epm.hept_lookup(self.machine)
     #for entry in resp:
     #    print epm.PrintStringBinding(entry['tower']['Floors'], self.machine)
     MSRPC_UUID_SAMR   = uuidtup_to_bin(('12345778-1234-ABCD-EF00-0123456789AC', '1.0'))
     resp = epm.hept_lookup(self.machine, inquiry_type = epm.RPC_C_EP_MATCH_BY_IF, ifId = MSRPC_UUID_SAMR)
     MSRPC_UUID_ATSVC = uuidtup_to_bin(('1FF70682-0A51-30E8-076D-740BE8CEE98B', '1.0'))
     resp = epm.hept_lookup(self.machine, inquiry_type = epm.RPC_C_EP_MATCH_BY_IF, ifId = MSRPC_UUID_ATSVC)
     MSRPC_UUID_SCMR = uuidtup_to_bin(('367ABB81-9844-35F1-AD32-98F038001003', '2.0'))
     resp = epm.hept_lookup(self.machine, inquiry_type = epm.RPC_C_EP_MATCH_BY_IF, ifId = MSRPC_UUID_SCMR)
Example #2
0
 def test_dceAuth(self):
     rpctransport = transport.DCERPCTransportFactory(self.stringBinding)
     if hasattr(rpctransport, 'set_credentials'):
         # This method exists only for selected protocol sequences.
         rpctransport.set_credentials(self.username, self.password, self.domain)
     dce = rpctransport.get_dce_rpc()
     dce.set_credentials(*(rpctransport.get_credentials()))
     dce.connect()
     dce.bind(epm.MSRPC_UUID_PORTMAP)
     resp = epm.hept_lookup(self.machine)
     dce.disconnect()
Example #3
0
 def test_dceAuth(self):
     rpctransport = transport.DCERPCTransportFactory(self.stringBinding)
     if hasattr(rpctransport, 'set_credentials'):
         # This method exists only for selected protocol sequences.
         rpctransport.set_credentials(self.username, self.password,
                                      self.domain)
     dce = rpctransport.get_dce_rpc()
     dce.set_credentials(*(rpctransport.get_credentials()))
     dce.connect()
     dce.bind(epm.MSRPC_UUID_PORTMAP)
     resp = epm.hept_lookup(self.machine)
     dce.disconnect()
Example #4
0
 def test_dceAuthHasHashesKerberos(self):
     rpctransport = transport.DCERPCTransportFactory(self.stringBinding)
     if hasattr(rpctransport, 'set_credentials'):
         lmhash, nthash = self.hashes.split(':')
         # This method exists only for selected protocol sequences.
         rpctransport.set_credentials(self.username, '', self.domain, lmhash, nthash)
         rpctransport.set_kerberos(True)
     dce = rpctransport.get_dce_rpc()
     dce.set_credentials(*(rpctransport.get_credentials()))
     dce.connect()
     dce.bind(epm.MSRPC_UUID_PORTMAP)
     resp = epm.hept_lookup(self.machine)
     dce.disconnect()
Example #5
0
 def test_packetAnonWINNTPacketPrivacy(self):
     rpctransport = transport.DCERPCTransportFactory(self.stringBinding)
     if hasattr(rpctransport, 'set_credentials'):
         lmhash, nthash = self.hashes.split(':')
         # This method exists only for selected protocol sequences.
         rpctransport.set_credentials(self.username, self.password, self.domain, lmhash, nthash)
     dce = rpctransport.get_dce_rpc()
     #dce.set_max_fragment_size(1)
     dce.connect()
     dce.set_auth_type(rpcrt.RPC_C_AUTHN_WINNT)
     dce.set_auth_level(rpcrt.RPC_C_AUTHN_LEVEL_PKT_PRIVACY)
     dce.bind(epm.MSRPC_UUID_PORTMAP)
     resp = epm.hept_lookup(self.machine)
     dce.disconnect()
Example #6
0
 def test_dceAuthHasHashesKerberos(self):
     rpctransport = transport.DCERPCTransportFactory(self.stringBinding)
     if hasattr(rpctransport, 'set_credentials'):
         lmhash, nthash = self.hashes.split(':')
         # This method exists only for selected protocol sequences.
         rpctransport.set_credentials(self.username, '', self.domain,
                                      lmhash, nthash)
         rpctransport.set_kerberos(True)
     dce = rpctransport.get_dce_rpc()
     dce.set_credentials(*(rpctransport.get_credentials()))
     dce.connect()
     dce.bind(epm.MSRPC_UUID_PORTMAP)
     resp = epm.hept_lookup(self.machine)
     dce.disconnect()
Example #7
0
 def test_packetAnonWINNTPacketPrivacy(self):
     rpctransport = transport.DCERPCTransportFactory(self.stringBinding)
     if hasattr(rpctransport, 'set_credentials'):
         lmhash, nthash = self.hashes.split(':')
         # This method exists only for selected protocol sequences.
         rpctransport.set_credentials(self.username, self.password,
                                      self.domain, lmhash, nthash)
     dce = rpctransport.get_dce_rpc()
     #dce.set_max_fragment_size(1)
     dce.connect()
     dce.set_auth_type(rpcrt.RPC_C_AUTHN_WINNT)
     dce.set_auth_level(rpcrt.RPC_C_AUTHN_LEVEL_PKT_PRIVACY)
     dce.bind(epm.MSRPC_UUID_PORTMAP)
     resp = epm.hept_lookup(self.machine)
     dce.disconnect()