当前位置: 首页 > article >正文

极狐GitLab 重要安全版本:17.3.3, 17.2.7, 17.1.8, 17.0.8, 16.11.10

GitLab 是一个全球知名的一体化 DevOps 平台,很多人都通过私有化部署 GitLab 来进行源代码托管。极狐GitLab 是 GitLab 在中国的发行版,专门为中国程序员服务。可以一键式部署极狐GitLab。

学习极狐GitLab 的相关资料:

  1. 极狐GitLab 官网
  2. 极狐GitLab 官网文档
  3. 极狐GitLab 论坛
  4. 极狐GitLab 安装配置

本分分享更多关于极狐GitLab 重要安全版本 17.3.3, 17.2.7, 17.1.8, 17.0.8, 16.11.10 的详情内容。

在这里插入图片描述

今天我们正式发布了极狐GitLab 17.3.3, 17.2.7, 17.1.8, 17.0.8, 16.11.10 版本。该版本包含了重要的缺陷和安全修复,我们强烈建议所有的私有化部署用户应立即升级到上述推荐的某一个版本。对于极狐GitLab SaaS(JihuLab.com)来讲,专业的技术团队已经进行了升级。

建议操作

我们强烈建议所有运行以下描述问题所影响的版本应尽快升级到最新版本。

如果没有指明极狐GitLab 特定的部署类型(ominbus、源代码、helm chart 等),那也就意味着所有的类型都受影响。

安全修复

安全修复表

标题严重性
SAML 认证绕过严重

SAML 认证绕过(SAML authentication bypass)漏洞是由 Ruby SAML 库引起的,对应的漏洞 ID为 CVE-2024-45409。将依赖 omniauth-saml升级到 2.2.1、ruby-saml升级到 1.17.0就能够
减轻 CVE-2024-45409 漏洞带来的安全危害。

私有化部署版本:已知的缓解措施

以下针对私有化部署的减缓措施能够成功避免实例受到 CVE-2024-45409 漏洞带来的攻击:

  1. 为极狐GitLab 私有化部署实例上的所有用户开启双因素认证(注意:开启身份识别供应商提供的多因素认证并不能减缓该漏洞带来的安全危害)以及
  2. 不允许在极狐GitLab 中使用 SAML 双因素认证绕过选项
私有化部署实例:识别和检测该漏洞的利用尝试

尝试或成功利用 Ruby-SAML (CVE-2024-45409) 的证据将出现在 GitLab 的 application_json 和 auth_json 日志文件中。

未成功的利用尝试——捕获

未成功的利用尝试可能会从 RubySaml库产生一个 ValidationError信息。这可能是由于构造一个有效利用程序的复杂性所导致的各种原因。

下面展示了两个示例,但是错误可能以其他描述的形式出现,要在 application_json 日志文件中搜索常见的字符串 RubySaml::ValidationError。

  1. 由于不正确的回调 URL 而导致票据(ticket)无效;
    a. 日志事件示例:
    b. {"severity":"ERROR","time":"2024-xx-xx","correlation_id":"xx","message":"(saml) Authentication failure! invalid_ticket: OneLogin::RubySaml::ValidationError, The response was received at https://domain.com/users/auth/saml/incorrect_callback instead of https://domain.com/users/auth/saml/callback"}
  2. 由于证书签名问题而导致的票据(ticket)无效;
    a. 日志事件示例
    b. "message":"(saml) Authentication failure! invalid_ticket: OneLogin::RubySaml::ValidationError, Fingerprint mismatch"
成功的利用尝试——捕获

成功地利用尝试将会触发与 SAML 相关的日志事件。然而,要将正常合法的 SAML 认证事件和漏洞利用尝试成功的事件区别开来是非常有难度的。

成功的利用尝试将记录攻击者在尝试利用时设置的任何 extern_id 值。因此,识别一个在你的组织中不常见的唯一 extern_uid 可能是潜在利用的指示信号。

  1. 在 application_json 日志文件中的示例利用认证事件,其中 extern_id 在利用 PoC 代码中被设置:
    a. 日志事件
    b. {"severity":"INFO","time":"2024-xx-xx","correlation_id":"xx","meta.caller_id":"OmniauthCallbacksController#saml","meta.remote_ip":"0.0.0.0","meta.feature_category":"system_access","meta.client_id":"ip/0.0.0.0","message":"(SAML) saving user exploit-test-user@domain.com from login with admin =\\u003e false, extern_uid =\\u003e exploit-test-user"}

在构造利用程序时,攻击者需要制作许多 SAML 断言以完美复制合法登录。这些断言包括你在身份提供者(IdP)处指定的密钥和值字段,且这些字段可能对未经授权的人员未知——尤其是当你自定义了这些属性时。

你可以查看 auth_json 日志文件,以查找属性部分中信息不正确或缺失的 SAML 响应。

  1. 在 auth_json 日志文件中的 SAML authentication 事件示例
    a. "severity":"INFO","time":"2024-xx-xx","correlation_id":"xx","meta.caller_id":"OmniauthCallbacksController#saml","meta.remote_ip":"0.0.0.0","meta.feature_category":"system_access","meta.client_id":"ip/0.0.0.0","payload_type":"saml_response": {"issuer": ["xxx"],"name_id": "xxx","name_id_format": "xxx","name_id_spnamequalifier": null,"name_id_namequalifier": null,"destination": "xxx","audiences": ["xxx"],"attributes": {"first_name": ["xxx"],"last_name": ["yyy"], "email": ["zzz"]}}

对于私有化部署的客户,可以将极狐GitLab 的 application_json 日志转发到 SIEM,可以创建检测规则以识别 Ruby-SAML (CVE-2024-45409) 利用尝试。我们的团队提供了两条用 Sigma 格式编写的威胁检测规则,以检测潜在的利用行为。

注意:这些检测规则可能需要根据客户的环境进行调整和修改,以提供有效的结果。由于不同客户环境的配置各异,客户应验证这些检测规则识别的事件的合法性和准确性。

一段时间内具有多个唯一 extern_uid 的用户

此检测旨在识别具有多个 extern_uid 值与认证事件相关联的已认证 SAML 用户,这可能是攻击者设置了 extern_uid 字段的恶意认证的潜在迹象。

title: Multiple extern_ids
description: Detects when their are multiple extern_id's associated with a user. 
author: Gitlab Security Engineering
date: 09/15/2024
schedule: "*/10 * * * *"
pseudocode: |
  select log source application.log
  where 7d < event_time < now()
  where severity="INFO" and meta_caller_id="Groups::OmniauthCallbacksController#group_saml"
  regex(message, "saving user (?<user_email>\S+) .*extern_uid \S+ (?<extern_id>[\S]+)")
  count extern_id by user_email as total_extern_ids
  where total_extern_ids > 1
verify: Review Gitlab application logs for the source IP of the SAML authentications. If there is a singular IP for all extern_ids this could point to a false positive. Cross reference the SAML authentication source IP/s with the known user's IP from sso authentication logs. 
tuning: N/A
在一段时间内,同一用户的 GitLab SAML 认证与其他身份提供者(IdP)事件的 IP 地址不同

此检测旨在关联用户的认证事件,比较 GitLab SAML 认证事件与其他身份提供者(IdP)的认证事件,以识别用户 IP 地址的任何变化,这可能是攻击者认证会话的迹象。

title: Gitlab SAML IP differs from SSO IP
description: Detects when the source IP for the SAML authentication to Gitlab from application.log differs from the users known IP from SSO MFA logs. 
author: Gitlab Security Engineering
date: 09/15/2024
schedule: "*/10 * * * *"
pseudocode: |
  select log source application.log 
  where severity="INFO" and meta_caller_id="Groups::OmniauthCallbacksController#group_saml"
  regex(message, "saving user (?<user_email>\S+) ")
  #Create sub-query to bring in table from SSO authentication data
  select meta_remote_ip, user_email
  where user_email in
    (
    select log source authentication
    where 1d < event_time < now()
    where event_type="user.authentication.auth_via_mfa"
    group by user_email, sso_source_ip
    )
  where sso_source_ip!=meta_remote_ip
verify: False positives can arise when the user is traveling. Review SSO authentication logs to see if the geo-location is similar to the SAML authentication to Gitlab. If any discrepancies are found, reach out to the user for verification. If the user is not traveling, temporarily lock the user's Gitlab account and review their activity through Gitlab's application logs. 
tuning: If the query is producing high false positives, consider using

修复的缺陷

17.3.3
  • 升级了 OpenSSL 3 的升级告警说明
  • 升级了极狐GitLab 备份命令的 gem bundler
  • 升级了 ruby-saml 和 omniauth-saml
17.2.7
  • 升级了 OpenSSL 3 的升级告警说明
  • 升级了 ruby-saml 和 omniauth-saml
17.1.8
  • 升级了 OpenSSL 3 的升级告警说明
  • 升级了 ruby-saml 和 omniauth-saml
17.0.8
  • 升级了 ruby-saml 和 omniauth-saml
16.11.10
  • 升级了 ruby-saml 和 omniauth-saml

关于极狐GitLab 的安装升级以及 GitLab 升级到极狐GitLab 的详情可以查看官网指南。


http://www.kler.cn/news/310734.html

相关文章:

  • C#使用HttpWebRequest下载文件
  • Java通信协议——UDP通信协议,模拟聊天室(完整详解,附有代码)
  • android含有EditText的键盘弹出后界面的正确处理
  • 人工智能 | 基于ChatGPT开发人工智能服务平台
  • 单片机嵌入式编程中常用技术点
  • Python基础 | 在虚拟环境中安装并在指定文件夹中打开Jupyter notebook
  • Java在零工市场中的应用:构建灵活高效的劳动力平台
  • 【算法】局部敏感哈希(LSH):高效解决相似性搜索问题的利器
  • html页面整合vue2或vue3
  • 选择适合你企业发展的服务器
  • 【Java】网络编程:TCP_IP协议详解(IP协议数据报文及如何解决IPv4不够的状况)
  • C++类和对象(4)
  • Linux平台UOS系统摄像头播放
  • 爬虫--翻页tips
  • .Net Gacutil工具(全局程序集缓存工具)使用教程
  • qt-creator-10.0.2之后版本的jom.exe构建和编译速度慢下来了
  • 【Python日志功能】二.高级配置与日志处理器
  • 怎么浏览URL的PDF文件呢
  • 性能测试笔记
  • 【Linux】网络层协议——IP
  • 跨界融合,GIS如何赋能游戏商业——以《黑神话:悟空》为例
  • flutter hive的使用
  • 万兆时代 TCP/IP如何赋能以太网飞跃
  • CentOS 中使用 OpenSSL 查看 SSL 证书详细信息
  • 利用模糊综合评价法进行数值评分计算——算法过程
  • JS 性能优化
  • Linux Kernel Makefiles 编译标志详解
  • C++在Linux实现多线程和多进程的TCP服务器和客户端通信
  • 【公告】博客正在迁移至 git pages
  • RaisePropertyChanged(() => DateName)详解记录一下