by Mojah · 11y ago · 0 comments
Imagine the following scenario:
$ curl something.tld > installer.sh
$ cat installer.sh
"Hey, that looks safe, I'll go ahead and execute it".
$ bash installer.sh
If the install-file had terminal escape sequences, it could have been used to trick anyone into executing code they had no intention to execute.
More here, if you're interested: https://ma.ttias.be/terminal-escape-sequences-the-new-xss-fo...
Bottom line: assume everything you download from the internet is malicious in nature and inspect it with every possible tool you have available. And even then, run it in a sandboxed environment wherever possible.
-v Displays non-printing characters so they are visible. Control
characters print as `^X' for control-X, with the exception of the
tab and EOL characters, which are displayed normally. The tab
character, control-I, can be made visible via the -t option. The
DEL character (octal 0177) prints as `^?'. Non-ASCII characters
(with the high bit set) are printed as `M-' (for meta) followed
by the character for the low 7 bits.
http://www.openbsd.org/cgi-bin/man.cgi/OpenBSD-current/man1/...If it's not the default, it's not what's going to happen.
Ehhh. Ok that's not very actionable advice. I downloaded my entire OS from the internet.
Thanks!
But how many sysadmins do you know rely on `cat` for their day-to-day use? Too many, I reckon.