Insecure service configuration - Key pair
The credentials to access the Key pair are the same to access the Keystore, good practices with respect to containers recommend that they are different because in case one is compromised not both are compromised keytool -genkey, -keyalg RSA, -alias opkeystore, -keypass Kpassword, -keystore opkeystore.jks, -storepass Spassword, - validity 365. The Kpassword must be different from the Spassword.
Compromise the access to the files if the keys of the keystore are the same as those of the key pair.
Implement best practices in cryptographic systems Recommendation for Cryptographic Key Generation.
Anonymous attacker in adjacent network.
Expected Remediation Time
⌚ 60 minutes.
Default score using CVSS 3.1. It may change depending on the context of the vulnerability.
- Attack vector: A
- Attack complexity: L
- Privileges required: N
- User interaction: N
- Scope: U
- Confidentiality: L
- Integrity: L
- Availability: N
- Exploit code madurity: X
- Remediation level: O
- Report confidence: X
- Vector string: CVSS:3.1/AV:A/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:N/E:X/RL:O/RC:X
- Base: 5.4
- Temporal: 5.2
- Base: Medium
- Temporal: Medium
Every sensitive resource has a secure key pair configuration
jarsigner -keystore "enc_password" -certchain "bundle.pem" -tsa "http://time.certum.pl" -storetype PKCS11
-providerClass sun.security.pkcs11.SunPKCS11 -providerArg "provider.cfg" -keypass "enc_password1"
-storepass "enc_password2" "[your_code].jar" "[your_alias]"
Non compliant code
There are shared key pairs for several sensitive resources
jarsigner -keystore "password1" -certchain "bundle.pem" -tsa "http://time.certum.pl" -storetype PKCS11
-providerClass sun.security.pkcs11.SunPKCS11 -providerArg "provider.cfg" -keypass "password1"
-storepass "password1" "[your_code].jar" "[your_alias]"
Search for vulnerabilities in your apps for free with our automated security testing! Start your 21-day free trial and discover the benefits of our Continuous Hacking Machine Plan. If you prefer a full service that includes the expertise of our ethical hackers, don't hesitate to contact us for our Continuous Hacking Squad Plan.