专栏名称: 运维帮
互联网技术分享平台,分享的力量。帮主一直坚信技术可以改变世界,从毕业到现在干了15年运维,有许多话要和你说。
目录
相关文章推荐
51好读  ›  专栏  ›  运维帮

scp 客户端发现了隐藏 35 年的漏洞

运维帮  · 公众号  · 运维  · 2019-01-15 17:52

正文

请到「今天看啥」查看全文


file to victim's home directory when the victim performs scp operation from the

server. The transfer of extra files is hidden by sending ANSI control sequences

via stderr. For example:


user@local:~$ scp user@remote:readme.txt .

readme.txt                                         100%  494     1.6KB/s   00:00

user@local:~$


2. Once the victim launches a new shell, the malicious commands in .bash_aliases get

executed.


*) Man-in-the-Middle attack does require the victim to accept the wrong host

fingerprint.


Vulnerabilities

---------------


1. CWE-20: scp client improper directory name validation [CVE-2018-20685]


The scp client allows server to modify permissions of the target directory by using empty

("D0777 0 \n") or dot ("D0777 0 .\n") directory name.


2. CWE-20: scp client missing received object name validation [CVE-2019-6111]


Due to the scp implementation being derived from 1983 rcp [1], the server chooses which

files/directories are sent to the client. However, scp client only perform cursory

validation of the object name returned (only directory traversal attacks are prevented).

A malicious scp server can overwrite arbitrary files in the scp client target directory.

If recursive operation (-r) is performed, the server can manipulate subdirectories

as well (for example overwrite .ssh/authorized_keys).







请到「今天看啥」查看全文