FileSysOrg / jfileserver

Java file server with SMB, FTP/FTPS and NFS support, virtual filesystems, database filesystems
GNU Lesser General Public License v3.0
42 stars 17 forks source link

It is not supported SAMR? #15

Open fengyingkong opened 9 months ago

fengyingkong commented 9 months ago

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;

/**

It is meant to be unsupported samr and NETLOGON?not finished yet?

FileSysOrg commented 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.

FileSysOrg commented 9 months ago

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.