octopus icon indicating copy to clipboard operation
octopus copied to clipboard

There is a deserialization vulnerability

Open lip2eye opened this issue 1 year ago • 0 comments

In HtxkEmsm/HtxkEmsm-framework/src/main/java/com/htxk/ruoyi/framework/config/ShiroConfig.java we can find a fixed key and uses this key to encrypt the rememberMe parameter in the cookie. It will cause deserialization vulnerability

image-20220729233241818

I set up a a local environment for attacks.

I found that the source code contains commons-collections-3.2.1.jar dependency, which is actually a dependency included in shiro. Using this dependency, it is possible to generate a deserialized payload and then encrypt the payload using the key obtained by blasting. write this payload after the rememberMe field and attack it. Successful RCE.

image-20220730000445961

lip2eye avatar Jul 29 '22 16:07 lip2eye