Open fengyingkong opened 9 months ago
The JFileServer only implements the minimal DCE/RPC services that the server needs to run, basically the Workstation and Server services. JFileServer can work with domain clients but is not a member of the domain, using Kerberos authentication that is usually configured via an Active Directory server.
The SAMR operations are documented in the Microsoft [MS-SAMR] document, but it looks like a considerable amount of work to implement. I don't have plans to implement this. You can implement your own DCE/RPC services and plug them in using the DCEPipeHandler.addHandlerForType() method.
Maybe there is another way around the issue, can you make a call to a server, such as an Active Directory server, to do what you need to do.
I would consider implementing the SAMR service as paid contract work. It will also require implementing NDR64, the 64bit data representation, but this should be fairly easy to implement in the DCEBuffer class, plus will require the pipe negotiation that selects the original NDR32 or newer NDR64.
I'm doing a windows into the domain operation, the process needs to create samr path, and found that the reported error.
the logs: [T4:1] IPC$ Request [1] - cmd = 0xa2 [T4:1] NT Create AndX [1] name=\samr, flags=0x10, attr=0x0, allocSize=0
the code as below:
`package org.filesys.smb.dcerpc.server;
import org.filesys.smb.dcerpc.DCEPipeType;
/**
@author gkspencer */ public class DCEPipeHandler {
// DCE/RPC pipe request handlers private static DCEHandler[] _handlers = { new SrvsvcDCEHandler(), null, // samr null, // winreg new WkssvcDCEHandler(), null, // NETLOGON null, // lsarpc null, // spoolss null, // netdfs null, // service control null, // eventlog null // netlogon1 };
/**
@return DCEHandler */ public final static DCEHandler getHandlerForType(DCEPipeType typ) { int ival = typ.intValue();
if (ival >= 0 && ival < _handlers.length) return _handlers[ival]; return null; } } `
It is meant to be unsupported samr and NETLOGON?not finished yet?