4 ms·
The original scp used rcp (as a protocol, or very close to it) inside of ssh. IIRC, wildcards are allowed, so the rcp server expands them. If the rcp server i
by chasil 3y ago
The original scp used rcp (as a protocol, or very close to it) inside of ssh.
IIRC, wildcards are allowed, so the rcp server expands them.
If the rcp server is malicious, it might slip an /etc/passed into its output, writing over the client. Very bad if the client is root.
The original scp suffers the same problem. I'm not sure if this issue is entirely avoided if a fully-qualifed path is sent to the server (but I think so).
EDIT: I am incorrect. The rcp server has complete control over the filename sent.
"...So one might type a command like:
$ scp admin:boring-spreadsheet.ods .
"with the expectation of getting a file called boring-spreadsheet.ods in the current working directory. If the remote server were to give a response like "here is the .bashrc file you asked for", though, scp would happily overwrite that file instead."