bbs icon indicating copy to clipboard operation
bbs copied to clipboard

Unverified Vulnerability Causes Command Execution

Open JulianWu520 opened this issue 5 years ago • 4 comments

(1) Log in as a normal user, post, and you cannot upload a jsp file when posting a topic 1 2 3 jsp file is not allowed to upload (2) After logging in to the management page as an administrator user, modify the configuration information to allow uploading files with jsp extension

4 Select basic configuration 5

Select Submit and use tool to intercept packets 6

Modify parameters to add jsp suffix

(3) Log in as a normal user, add theme, add attachments, select jsp files with malicious command execution functions to upload 8

image

Execute system command “whoami”

image

JulianWu520 avatar Dec 29 '19 08:12 JulianWu520

该漏洞是后台的一个设置修改处的未校验漏洞,可以任意配置后缀名并写入到数据库中,上传文件的时候会从数据库中调取被允许的后缀名,从而绕过上传限制。上传可执行命令的jsp,进而控制整台服务器 普通用户登陆 1

选择上传文件

2

不允许上传 3

登陆到后台 4

登陆 http://192.168.52.136:8080/bbs_war_exploded/admin/login.htm admin/1234567

5

选择提交并且拦截数据包 6

修改数据包,添加一个jsp后缀

7

修改成功 8

登陆普通用户继续上传

上传成功 9

执行该木马程序 10

JulianWu520 avatar Dec 29 '19 08:12 JulianWu520

由于准备申请cve所以该issue提了英文版先,请见谅,已附上中文细节,从白盒的角度也分析了一部分细节,作者应该比我更加清楚整个框架,若有需要我可以将整个漏洞流程细节从白盒审计的角度进行的分析工作贴上来。

JulianWu520 avatar Dec 29 '19 08:12 JulianWu520

放开jsp文件扩展名限制需要管理员账户操作才行,实际使用中管理员账户可以操作全站数据,这个问题要形成安全漏洞需要管理员蓄意而为才行。后续的版本会对比限制设置页面提交的扩展名和配置文件预设的扩展名

diyhi avatar Dec 29 '19 12:12 diyhi

是的,你说的对,需要高权限用户如admin才能操作,所以这个漏洞的利用条件相对高了一些,实际上大多数情况下存在管理员账户密码设置较为简单而被爆破密码成功的情况。另外很感谢作者的回复,虽然利用起来比较鸡肋了

JulianWu520 avatar Dec 29 '19 13:12 JulianWu520