Is it possible to exploit the SSH UseRoaming Vulnerability?

407    Asked by AnilJha in Cyber Security , Asked on Feb 3, 2022

 I recently heard about a serious bug in an OpenSSH client (CVE-2016-0777 and CVE-2016-0778) that if I understood correctly could cause remote code execution. How difficult would it be for an active man-in-the-middle to exploit that?

Answered by Anisha Dalal

Like Steve Sether said, this is not a man-in-the-middle attack. How dangerous is it? In some cases, buffer overflow attacks are possible. Your private SSH keys can be leaked to an attacker.

According to the page: SSH Useroaming enables a client, in case an SSH connection breaks unexpectedly, to resume it at a later time, provided the server also supports it. The OpenSSH server doesn't support roaming, but the OpenSSH client supports it (even though it's not documented) and it's enabled by default. For starters, this feature is enabled by default in OpenSSH. Even worse, it is undocumented in the ssh_config(5) man page. Note that this is two exploits: CVE-2016-0777An information leak (memory disclosure) can be exploited by a rogue SSH server to trick a client into leaking sensitive data from the client memory, including for example private keys.

 CVE-2016-0778 A buffer overflow (leading to file descriptor leak), can also be exploited by a rogue SSH server, but due to another bug in the code is possibly not exploitable, and only under certain conditions (not the default configuration), when using ProxyCommand, ForwardAgent or ForwardX11. Regarding the buffer overflow attack, note that it's only vulnerable under certain conditions, when you have ProxyCommand, and ForwardAgent or ForwardX11 enabled. Those are non-default options, so while it's possible it won't be exploited in a large majority of cases, it is possible. In the case of a successful buffer overflow attack, assume everything accessible by the SSH client is breached. More Information I would read the Qualys Analysis. This paper will explain this attack in great detail far better than most of us, including myself.



Your Answer

Interviews

Parent Categories