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

Unverified Vulnerability Causes Command Execution #12

Open
JulianWu520 opened this issue Dec 29, 2019 · 4 comments
Open

Unverified Vulnerability Causes Command Execution #12

JulianWu520 opened this issue Dec 29, 2019 · 4 comments

Comments

@JulianWu520
Copy link

(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
Copy link
Author

JulianWu520 commented Dec 29, 2019

该漏洞是后台的一个设置修改处的未校验漏洞,可以任意配置后缀名并写入到数据库中,上传文件的时候会从数据库中调取被允许的后缀名,从而绕过上传限制。上传可执行命令的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
Copy link
Author

JulianWu520 commented Dec 29, 2019

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

@diyhi
Copy link
Owner

diyhi commented Dec 29, 2019

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

@JulianWu520
Copy link
Author

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

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