Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

com.rapid7.client.dcerpc.transport.exceptions.RPCFaultException: Fault: nca_op_rng_error (0x1C010002 #130

Open
rahulgangarde opened this issue Apr 6, 2018 · 2 comments

Comments

@rahulgangarde
Copy link

In below code snippet i am getting the exception

final RPCTransport transport = SMBTransportFactories.SRVSVC.getTransport(session);
SecurityAccountManagerService service = new SecurityAccountManagerService(transport);
com.rapid7.client.dcerpc.dto.SID sid = //
ServerHandle openServer = service.openServer();//here it throwing an excpetion
DomainHandle openDomain = service.openDomain(openServer,sid);
GroupHandle groupHandle = new GroupHandle(openDomain.getBytes());
GroupGeneralInformation groupGeneralInformation = service.getGroupGeneralInformation(groupHandle);
System.out.println(groupGeneralInformation.getName());

com.rapid7.client.dcerpc.transport.exceptions.RPCFaultException: Fault: nca_op_rng_error (0x1C010002)
at com.rapid7.client.dcerpc.transport.exceptions.RPCFaultException.read(RPCFaultException.java:42)
at com.rapid7.client.dcerpc.transport.RPCTransport.call(RPCTransport.java:111)
at com.rapid7.client.dcerpc.service.Service.call(Service.java:46)
at com.rapid7.client.dcerpc.service.Service.callExpect(Service.java:55)
at com.rapid7.client.dcerpc.service.Service.callExpectSuccess(Service.java:50)
at com.rapid7.client.dcerpc.mssamr.SecurityAccountManagerService.openServer(SecurityAccountManagerService.java:151)
at com.rapid7.client.dcerpc.mssamr.SecurityAccountManagerService.openServer(SecurityAccountManagerService.java:137)
at com.rapid7.client.dcerpc.mssamr.SecurityAccountManagerService.openServer(SecurityAccountManagerService.java:125)
at test.Test.main(Test.java:85)

@rahulgangarde
Copy link
Author

rahulgangarde commented Apr 16, 2018

IS there any way or code get the group name and user name by using sid in java?

Also getting the below exception when i use above code


Exception in thread "main" com.rapid7.client.dcerpc.transport.exceptions.RPCFaultException: Fault: nca_op_rng_error (0x1C010002)
at com.rapid7.client.dcerpc.transport.exceptions.RPCFaultException.read(RPCFaultException.java:42)
at com.rapid7.client.dcerpc.transport.RPCTransport.call(RPCTransport.java:111)
at com.rapid7.client.dcerpc.service.Service.call(Service.java:46)
at com.rapid7.client.dcerpc.service.Service.callExpect(Service.java:55)
at com.rapid7.client.dcerpc.service.Service.callExpectSuccess(Service.java:50)
at com.rapid7.client.dcerpc.mssamr.SecurityAccountManagerService.openServer(SecurityAccountManagerService.java:151)
at com.rapid7.client.dcerpc.mssamr.SecurityAccountManagerService.openServer(SecurityAccountManagerService.java:137)
at com.rapid7.client.dcerpc.mssamr.SecurityAccountManagerService.openServer(SecurityAccountManagerService.java:125)

@lawern
Copy link

lawern commented Dec 16, 2021

Maybe a little late, but I also had the same error today.
My mistake was that I had used the WINREG SMBTransportFactory. After using the LSASVC SMBTransportFactory, my lookupNamesForSIDs request works without errors.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants