CVE-2022-26138 Confluence Server 硬编码漏洞分析
source link: https://paper.seebug.org/1989/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
作者:xxhzz@星阑科技PortalLab
原文链接:https://mp.weixin.qq.com/s/HRqWtQh1q1R--NDIlHLCMA
漏洞描述
7月21日,Atlassian官方发布了2022年7月的安全更新,其中涉及到Confluence Server的多个漏洞,其中CVE-2022-26138为一个硬编码漏洞。
当Confluence Server或Data Center上的Questions for Confluence app启用时,它会创建一个名为disabledsystemuser的Confluence用户帐户。此帐户旨在帮助将数据从应用程序迁移到 Confluence Cloud的管理员账号中。该帐户通过使用硬编码密码创建并添加到confluence-users组中,在默认情况下允许查看和编辑 Confluence 中的所有非受限页面。未经身份验证攻击者可以利用所知的硬编码密码登录Confluence并访问该组有权限访问的所有页面。
相关介绍
Atlassian Confluence Server是澳大利亚Atlassian公司的一套具有企业知识管理功能,并支持用于构建企业WiKi的协同软件的服务器版本。
利用范围
Questions for Confluence app == 2.7.34
Questions for Confluence app == 2.7.35
Questions for Confluence app == 3.0.2
漏洞分析
环境搭建
此次漏洞分析环境可参考CVE-2022-26134 Confluence OGNL RCE 漏洞分析。
进行搭建。分析源码为confluence-questions-3.0.2.jar或者另外两个版本。
代码分析
动态调试之前,在配置文件default.properties中可以找到所创建用户的相关信息,其中的username和password都是固定的。
紧接着在com.atlassian.confluence.plugins.questions.util#BuildInformationManager处打下断点。
开启debug模式,随后在confluence中上传confluence-questions.jar应用。
在安装应用的过程中,会从配置文件中获取到固定的账号信息。
随后进入com.atlassian.confluence.plugins.questions.service.UserCreatorServiceImpl
实例化UserCreatorServiceImpl对象。
继续跟进,会进入下面的addPredefinedPermittedDisabledUser方法。
在此,固定disabledsystemuser用户完成创建并将其添加到confluence-users组。
漏洞复现
成功上传Questions for Confluence应用程序。
使用硬编码密码创建的账号进行登录。
成功登录,且该用户拥有管理员权限。
修复建议
参考官方公告中的修复建议:
更新Questions for Confluence扩展至以下安全版本:
2.7.x >= 2.7.38 (Confluence 6.13.18 到 7.16.2)
Versions >= 3.0.5 (Confluence 7.16.3 之后的版本)
参考材料
本文由 Seebug Paper 发布,如需转载请注明来源。本文地址:https://paper.seebug.org/1989/
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK