Finding SSH Strict Key Exchange Violations by State Learning
Fabian Bäumer, Marcel Maehren, Marcus Brinkmann, Jörg Schwenk
摘要
SSH is an important protocol for secure remote shell access to servers on the Internet. At USENIX 2024, Bäumer et al. presented the Terrapin attack on SSH, which relies on the attacker injecting optional messages during the key exchange. To mitigate this attack, SSH vendors adopted an extension developed by OpenSSH called strict key exchange (''strict KEX''). With strict KEX, optional messages are forbidden during the handshake, preventing the attack. In practice, this should simplify the state machine of an SSH handshake to a linear message flow similar to that of TLS. In this work, we analyze the design, implementation, and security of strict KEX in popular SSH servers, using black-box state learning, which can uncover the hidden state machine of an implementation. In practice, it is limited by the number of learned messages and the complexity of the state machine. Thus, learning the complete state machine of SSH is infeasible. Previous research on SSH, therefore, excluded optional messages, learning only a partial state machine. However, these messages are a critical part of the Terrapin attack. We propose to instead learn the complete state machine of the handshake phase of an SSH server, but with strict KEX enabled. We investigate the security of ten SSH implementations supporting strict KEX for up to five key exchange algorithms. In total, we learn 33 state machines, revealing significant differences in the implementations. We show that seven implementations violate the strict KEX specification and find two critical security vulnerabilities. One results in a rogue session attack in the proprietary Tectia SSH implementation. Another affects the official SSH implementation of the Erlang Open Telecom Platform, and enables unauthenticated remote code execution in the security context of the SSH server.
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
已有 2 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。
脉络
- Hop: A Modern Transport and Remote Access Protocol 引用了 Transcript Collision Attacks: Breaking Authentication in TLS, IKE and SSH
- HVLearn: Automated Black-Box Analysis of Hostname Verification in SSL/TLS Implementations 引用了 Systematic Fuzzing and Testing of TLS Libraries
- HVLearn: Automated Black-Box Analysis of Hostname Verification in SSL/TLS Implementations 引用了 SFADiff: Automated Evasion Attacks and Fingerprinting Using Black-box Differential Automata Learning
- Crossing the Streams: SSH Plaintext Recovery via a Common Compression Context in Multiplexed Channels 引用了 Transcript Collision Attacks: Breaking Authentication in TLS, IKE and SSH
- Systematic Fuzzing and Testing of TLS Libraries 引用了 Transcript Collision Attacks: Breaking Authentication in TLS, IKE and SSH
引用它的顶会 Paper2
它引用的 Paper17
- Systematic Fuzzing and Testing of TLS LibrariesJuraj SomorovskyCCS 2016 · 136 次引用
- Transcript Collision Attacks: Breaking Authentication in TLS, IKE and SSHKarthikeyan Bhargavan, Gaëtan LeurentNDSS 2016 · 128 次引用
- HVLearn: Automated Black-Box Analysis of Hostname Verification in SSL/TLS ImplementationsSuphannee Sivakorn, George Argyros, Kexin Pei, Angelos D. Keromytis 等S&P 2017 · 88 次引用
- SweynTooth: Unleashing Mayhem over Bluetooth Low EnergyMatheus E. Garbelini, Chundong Wang, Sudipta Chattopadhyay, Sumei Sun 等USENIX ATC 2020 · 83 次引用
- SFADiff: Automated Evasion Attacks and Fingerprinting Using Black-box Differential Automata LearningGeorge Argyros, Ioannis Stais, Suman Jana, Angelos D. Keromytis 等CCS 2016 · 65 次引用
相关 Paper
- Automata-Based Automated Detection of State Machine Bugs in Protocol ImplementationsPaul Fiterau-Brostean, Bengt Jonsson, Konstantinos Sagonas, Fredrik TåquistNDSS 2023
- Terrapin Attack: Breaking SSH Channel Integrity By Sequence Number ManipulationFabian Bäumer, Marcus Brinkmann, Jörg SchwenkUSENIX Security 2024 · 15 次引用
- Post-Quantum Cryptographic Analysis of SSHBenjamin Bencina, Benjamin Dowling, Varun Maram, Keita XagawaS&P 2025
- Where The Wild Things Are: Brute-Force SSH Attacks In The Wild And How To Stop ThemSachin Kumar Singh, Shreeman Gautam, Cameron Cartier, Sameer Patil 等NSDI 2024 · 15 次引用
- A Surfeit of SSH Cipher SuitesMartin R. Albrecht, Jean Paul Degabriele, Torben Brandt Hansen, Kenneth G. PatersonCCS 2016 · 36 次引用
