先自我介绍一下,小编浙江大学毕业,去过华为、字节跳动等大厂,目前阿里P7

深知大多数程序员,想要提升技能,往往是自己摸索成长,但自己不成体系的自学效果低效又漫长,而且极易碰到天花板技术停滞不前!

因此收集整理了一份《2024年最新Linux运维全套学习资料》,初衷也很简单,就是希望能够帮助到想自学提升又不知道该从何学起的朋友。
img
img
img
img
img

既有适合小白学习的零基础资料,也有适合3年以上经验的小伙伴深入学习提升的进阶课程,涵盖了95%以上运维知识点,真正体系化!

由于文件比较多,这里只是将部分目录截图出来,全套包含大厂面经、学习笔记、源码讲义、实战项目、大纲路线、讲解视频,并且后续会持续更新

如果你需要这些资料,可以添加V获取:vip1024b (备注运维)
img

正文

文章目录

OpenSSH 9.6更新公告

*ssh(1), sshd(8):

implement protocol extensions to thwart the so-called “Terrapin attack” discovered by Fabian Bäumer, Marcus Brinkmann and Jörg Schwenk. This attack allows a MITM to effect a limited break of the integrity of the early encrypted SSH transport protocol by sending extra messages prior to the commencement of encryption, and deleting an equal number of consecutive messages immediately after encryption starts. A peer SSH client/server would not be able to detect that messages were deleted.


实施协议扩展以挫败 Fabian Bäumer、Marcus Brinkmann 和 Jörg Schwenk 发现的所谓 “Terrapin 攻击”。这种攻击允许中间人(adversary-in-the-middle, MITM) 在加密开始前发送额外信息,并在加密开始后立即删除相同数量的连续信息,从而有限度地破坏早期加密 SSH 传输协议的完整性。对等 SSH 客户端/服务器将无法检测到信息已被删除。

While cryptographically novel, the security impact of this attack is fortunately very limited as it only allows deletion of consecutive messages, and deleting most messages at this stage of the protocol prevents user user authentication from proceeding and results in a stuck connection.


虽然在密码学上很新颖,但幸运的是,这种攻击对安全的影响非常有限,因为它只允许删除连续的报文,而在协议的这一阶段删除大部分报文会阻止用户验证的进行,并导致连接卡死。

The most serious identified impact is that it lets a MITM to delete the SSH2_MSG_EXT_INFO message sent before authentication starts, allowing the attacker to disable a subset of the keystroke timing obfuscation features introduced in OpenSSH 9.5. There is no other discernable impact to session secrecy or session integrity.


已发现的最严重影响是,它使 MITM 能够删除在身份验证开始前发送的 SSH2_MSG_EXT_INFO 消息,使攻击者能够禁用 OpenSSH 9.5 中引入的按键定时混淆功能的一个子集。对会话保密性或会话完整性没有其他明显影响。

OpenSSH 9.6 addresses this protocol weakness through a new “strict KEX” protocol extension that will be automatically enabled when both the client and server support it. This extension makes two changes to the SSH transport protocol to improve the integrity of the initial key exchange.


OpenSSH 9.6 通过新的 **"严格 KEX "**协议扩展解决了这一协议弱点,当客户端和服务器都支持该扩展时,它将自动启用。该扩展对 SSH 传输协议做了两处修改,以提高初始密钥交换的完整性。

Firstly, it requires endpoints to terminate the connection if any unnecessary or unexpected message is received during key exchange (including messages that were previously legal but not strictly required like SSH2_MSG_DEBUG). This removes most malleability from the early protocol.


首先,它要求端点在密钥交换过程中收到任何不必要或意外信息(包括 SSH2_MSG_DEBUG 等以前合法但并非严格要求的信息)时终止连接。这就消除了早期协议的大部分可变性。

Secondly, it resets the Message Authentication Code counter at the conclusion of each key exchange, preventing previously inserted messages from being able to make persistent changes to the sequence number across completion of a key exchange. Either of these changes should be sufficient to thwart the Terrapin Attack.


其次,它在每次密钥交换结束时重置信息验证码计数器,防止先前插入的信息在密钥交换完成后对序列号进行持续更改。无论哪种变化,都足以挫败 Terrapin 攻击。

More details of these changes are in the PROTOCOL file in the OpenSSH source distribition.


有关这些更改的更多详情,请参阅 OpenSSH 源代码发行版中的 PROTOCOL 文件。

Terrapin攻击 (CVE-2023-48795)

基本信息

CVE-2023-48795: BaseScore N/A

CVSS:3.1/N/A

The SSH transport protocol with certain OpenSSH extensions, found in OpenSSH before 9.6 and other products, allows remote attackers to bypass integrity checks such that some packets are omitted (from the extension negotiation message), and a client and server may consequently end up with a connection for which some security features have been downgraded or disabled, aka a Terrapin attack. This occurs because the SSH Binary Packet Protocol (BPP), implemented by these extensions, mishandles the handshake phase and mishandles use of sequence numbers. For example, there is an effective attack against SSH’s use of ChaCha20-Poly1305 (and CBC with Encrypt-then-MAC). The bypass occurs in chacha20-poly1305@openssh.com and (if CBC is used) the -etm@openssh.com MAC algorithms.


在 9.6 之前的 OpenSSH 和其他产品中找到的具有某些 OpenSSH 扩展的 SSH 传输协议允许远程攻击者绕过完整性检查,从而省略某些数据包(来自扩展协商消息),因此客户端和服务器可能最终获得某些安全功能已降级或禁用的连接。 又名 Terrapin 攻击。这是因为这些扩展实现的 SSH 二进制数据包协议 (BPP) 错误地处理了握手阶段,并错误地处理了序列号的使用。例如,针对 SSH 使用 ChaCha20-Poly1305(以及带有 Encrypt-then-MAC 的 CBC)的攻击存在有效攻击。旁路发生在 chacha20-poly1305@openssh.com 和(如果使用 CBC)-etm@openssh.com MAC 算法中。

利用手段

中间人攻击、SSH握手、流量攻击

利用路径

在SSH双方建立安全通道前,有一次明文消息握手,中间人此时向SSH服务器发送X条报文,可以阻止Server在安全通道中发送给Client的前X条消息,可以干扰连接的设置,降低所使用的安全性

握手使用计数器计算收发包数,之后计数器用于验证握手过程是否完整。只要计数正确,允许继续连接。

利用条件

  1. 特定加密算法:ChaCha20-Poly1305和CBC with Encrypt-then-MAC
  2. 攻击者处于中间人位置,可以在 TCP/IP 层拦截和修改连接的流量
  3. 本地网络发起,从Internet发起很困难

The Terrapin attack requires an active Man-in-the-Middle attacker, that means some way for an attacker to intercept and modify the data sent from the client or server to the remote peer. This is difficult on the Internet, but can be a plausible attacker model on the local network.

利用原理及示意图

攻击者可以在初始密钥交换期间注入任意数量的SSH消息,并在交换完成后移除相同数量的消息,从而破坏SSH扩展协商(RFC8308),可降级连接的安全性。

ChaCha20-Poly1305:

攻击者在握手结束前注入 IGNORE 信息,计数器的变化会在安全通道中阻断 EXT_INFO消息

在这里插入图片描述

CBC-EtM:

攻击者在Client发送 NEWKEYS 之前注入 UNKNOWN。 由于Server已经发送了 NEWKEYS,UNIMPLMENTED 消息将在 EXTINFO 之后在安全通道内发送。 损坏的未实现消息很可能被忽略

在这里插入图片描述

危害

该漏洞官方描述为:General Protocol Flaw(一般协议缺陷)

……通过中间人攻击,攻击者可能迫使SSH客户端采用较弱的身份验证方式,并停用一些防御机制,目前很难准确评估这个漏洞的真正影响……

……漏洞利用成本高,在真实场景中被利用几率很低,但影响面较大……

最后的话

最近很多小伙伴找我要Linux学习资料,于是我翻箱倒柜,整理了一些优质资源,涵盖视频、电子书、PPT等共享给大家!

资料预览

给大家整理的视频资料:

给大家整理的电子书资料:

如果本文对你有帮助,欢迎点赞、收藏、转发给朋友,让我有持续创作的动力!

网上学习资料一大堆,但如果学到的知识不成体系,遇到问题时只是浅尝辄止,不再深入研究,那么很难做到真正的技术提升。

需要这份系统化的资料的朋友,可以添加V获取:vip1024b (备注运维)
img

一个人可以走的很快,但一群人才能走的更远!不论你是正从事IT行业的老鸟或是对IT行业感兴趣的新人,都欢迎加入我们的的圈子(技术交流、学习资源、职场吐槽、大厂内推、面试辅导),让我们一起学习成长!

网上学习资料一大堆,但如果学到的知识不成体系,遇到问题时只是浅尝辄止,不再深入研究,那么很难做到真正的技术提升。

需要这份系统化的资料的朋友,可以添加V获取:vip1024b (备注运维)
[外链图片转存中…(img-8GYhZDid-1713193898336)]

一个人可以走的很快,但一群人才能走的更远!不论你是正从事IT行业的老鸟或是对IT行业感兴趣的新人,都欢迎加入我们的的圈子(技术交流、学习资源、职场吐槽、大厂内推、面试辅导),让我们一起学习成长!

Logo

加入社区!打开量化的大门,首批课程上线啦!

更多推荐