0x1 简介
当springboot遇到shiro,一切变得合理了起来。
0x2 利用
存在springboot env页面
https://xxx/api/actuator/env
但未发现明文shirokey,如图这种的。
使用visualvm工具读取shiro字节类型key。
下载:https://visualvm.github.io/download.html(工具在/bin目录下)
导入heapdump,在过滤文件中搜索如下条件。
org.apache.shiro.web.mgt.CookieRememberMeManager
使用脚本转换为明文key。
import base64
import struct
data=struct.pack('bbbbbbbbbbbbbbbb',xxx,-113,43,-68,-8,-64,44,58,108,-42,35,120)
print(base64.b64encode(data))
成功命令执行。
0x3 参考
https://m.freebuf.com/articles/web/288423.html