
RememberMe Padding Oracle Vulnerability RCE
The RememberMe cookie is encrypted using AES-128-CBC mode, which is vulnerable to padding oracle attacks.
An attacker can use a valid RememberMe cookie as a prefix for a Padding Oracle Attack, and then craft a malicious RememberMe to perform a Java deserialization attack, such as SHIRO-550.
Log in to the website and obtain the RememberMe cookie.
Use the RememberMe cookie as a prefix for the Padding Oracle Attack.
Encrypt ysoserial's serialized payload to craft a malicious RememberMe via the Padding Oracle Attack.
Request the website with the new RememberMe cookie to execute the deserialization attack.
The attacker does not need to know the secret key used to encrypt the RememberMe cookie.
1.2.5,
1.2.6,
1.3.0,
1.3.1,
1.3.2,
1.4.0-RC2,
1.4.0,
1.4.1
root@kali:/opt/tomcat/apache-tomcat-8.5.47/webapps/samples-web-1.5.0-SNAPSHOT# cat ./WEB-INF/shiro.ini |grep cipherKey
# We need to set the cipherKey, if you want the rememberMe cookie to work after restarting or on multiple nodes.
securityManager.rememberMeManager.cipherKey = kPH+bIxk5D2deZiIxcaaaA==
./WEB-INF/lib/commons-beanutils-1.9.4.jar
./WEB-INF/lib/commons-codec-1.13.jar
./WEB-INF/lib/commons-collections-3.2.2.jar
./WEB-INF/lib/jcl-over-slf4j-1.7.26.jar
./WEB-INF/lib/log4j-1.2.17.jar
./WEB-INF/lib/shiro-cache-1.5.0-SNAPSHOT.jar
./WEB-INF/lib/shiro-config-core-1.5.0-SNAPSHOT.jar
./WEB-INF/lib/shiro-config-ogdl-1.5.0-SNAPSHOT.jar
./WEB-INF/lib/shiro-core-1.5.0-SNAPSHOT.jar
./WEB-INF/lib/shiro-crypto-cipher-1.5.0-SNAPSHOT.jar
./WEB-INF/lib/shiro-crypto-core-1.5.0-SNAPSHOT.jar
./WEB-INF/lib/shiro-crypto-hash-1.5.0-SNAPSHOT.jar
./WEB-INF/lib/shiro-event-1.5.0-SNAPSHOT.jar
./WEB-INF/lib/shiro-lang-1.5.0-SNAPSHOT.jar
./WEB-INF/lib/shiro-web-1.5.0-SNAPSHOT.jar
./WEB-INF/lib/slf4j-api-1.7.26.jar
./WEB-INF/lib/slf4j-log4j12-1.7.26.jar
./WEB-INF/lib/taglibs-standard-impl-1.2.5.jar
./WEB-INF/lib/taglibs-standard-spec-1.2.5.jar
https://issues.apache.org/jira/browse/SHIRO-721
Vulnerability reproduction https://www.anquanke.com/post/id/192819