最近打算审一审
审计时可以FindBugs
还是有一些帮助的。
后台任意
漏洞路径 /ofcms/ofcms-admin/
public vo
这里可以看到没有任何限制,直接写入
POST /ofcms_admin_war/admin/cms/template/save.
为什么要写到static
/**
* 请求后缀名处理
*
* @author OF
* @date 2017年11月24日
*/
public class
可以看到这里将 jsp、html、json 的后缀都为空了,但是如果是 /static 目录就直接 return 了,那么把shell写到这个目录下即可。
CSRF打助攻
显然没有
后台任意文件上传漏洞(鸡肋)
@Clear
public void upload() {
try {
UploadFile file = this.getFile("file", "image");
file.getFile().createNewFile();
Map data = new
在 file.getFile().createNewFile(); ,可以跟到
private boolean isSafeFile(UploadFile uploadFile) {
String fileName = uploadFile.getFileName().trim().toLowerCase();
if (!fileName.endsWith(".jsp") && !fileName.endsWith(".jspx")) {
return true;
} else {
uploadFile.getFile().delete();
return false;
}
}
限制了是否以指定后缀结束,但是这里可以利用
但是我说这个洞为什么鸡肋呢,因为没办法跨目录上传,上传到image目录下是利用不了的,原因我上面说了,所以说它鸡肋。
通过看FreeMarker ,这个应该是java中比较经典的模板注入了,来看文章 http://drops.xmd5.com/static/drops/tips-8292.html
使用payload
${ ex("id") }