Closed dinosn closed 1 year ago
Hi Nicolas,
thanks for reporting :+1:
Have you any further information that could clarify why the certificate is bad? As far as I can tell, the error shows up when rmg attempts to connect to the actual RMI endpoint. The registry itself is not TLS protected (this is the reason why the general enumeration works without any problems). However, the RMI endpoint bound to the registry is, as one can see from the following output:
[+] - HPDM Server RMI
[+] --> com.hp.hpdm.interf.ServiceInterf (unknown class)
[+] Endpoint: system:40002 TLS: yes ObjID: [-52a5d3ef:18782b753bf:-7fff, 2349307879934226592]
Unfortunately, the provided stack trace gives no indicator why the TLS certificate was considered bad. The output of something like openssl s_client -connect system 40002
could help to clarify this.
rmg generally treats all TLS certificates as trusted, but a similar issue was also reported for beanshooter some time ago. In this issue, the error message was more clear an indicated that the certificate algorithm was no longer supported. I expect a similar reason for your issue. Looking at the SSLTransport.decode
method that throws the exception, one finds statements like the following:
} catch (UnsupportedOperationException unsoe) { // SSLv2Hello
// Code to deliver SSLv2 error message for SSL/TLS connections.
if (!context.sslContext.isDTLS()) {
context.outputRecord.encodeV2NoCipher();
if (SSLLogger.isOn && SSLLogger.isOn("ssl")) {
SSLLogger.finest("may be talking to SSLv2");
}
}
throw context.fatal(Alert.UNEXPECTED_MESSAGE, unsoe);
So it is likely that your exception is also raised because the certificate or other TLS parameters do not match your minimal required policies. However, without knowing the certificate details, it is hard to tell :shrug:
Best, Tobias
Hi,
Thank you for the detailed response. I will try to get access to the system to check the certificate. Regarding the minimal required policies, these are obtained from the java default setup, I haven't specified a client.policy, and on java version I'm using.
openjdk version "1.8.0_322"
OpenJDK Runtime Environment (build 1.8.0_322-b06)
OpenJDK 64-Bit Server VM (build 25.322-b06, mixed mode)
If you have a suggestion for a better configuration setup please let me know.
Regards, Nicolas
Hey Nicolas,
did you manage to get access to the system again?
Concerning your client policy I have no suggestions for a "better" setup, but sometimes one need to make things worse to get the job done. I often come into this situation when I'm trying to access old TLS servers. Modern openssl versions do not support their outdated crypto settings and one needs to enable them within /etc/ssl/openssl.conf
file. I would not recommend to configure outdated and insecure settings by default, but sometimes one has to downgrade. In the context of Java, I did not encountered the problem yet, so I have no experience which settings to adjust :shrug:
Hi Tobias,
Thank you for your response! I didn't had the chance to get access to that system again, I will close the ticket for now and if I get a similar result in another environment I'll make a new comment. Take care!
Regards, Nicolas
Hello,
One more issue if there is time to resolve :)
The request seem to failing with an alert for bad_certificate
Enum is able to retrieve information,
Thank you for the great work!
Regards, Nicolas