Live data from Hacker News

S/party/hack like it's 1999

openwall.com

1–10 of 33 posts

Re: S/party/hack like it's 1999

#4
post #2

But it wouldn't fool any text editor, right? Or even less ?

Did you read the article?

"'less' doesn't interpret escape sequences unless the -r switch is used, so stop aliasing it to 'less -r' just because there's no colored output."

Re: S/party/hack like it's 1999

#5
The ANSI driver that came with MS-DOS, ANSI.SYS, also allowed keys to be rebound to small macros.

So you could TYPE (cat) a file and then later press a harmless key like D and ANSI.SYS could output something like whatever the DOS equivalent of "rm -fr /" was (probably DELTREE /Y C:\) as though it had come from your very keyboard.

This was very common in the BBS era. Anti-virus software would usually detect those sequences. People who wanted to look at ANSI art but were aware of this would use alternative ANSI implementations like the one from PC Magazine, which I am a bit surprised to find out can still be downloaded from their website, which also still exists: http://www.pcmag.com/article2/0,2817,5343,00.asp

Re: S/party/hack like it's 1999

#7

Title is wrong. Should be: s/party/hack/ like it's 1999

Or perhaps

    s/party/hack/g like it's 1999
...But I supposed we'd be distracting attention away from the point... ;)

Anyway, does anyone know of any escape sequences or similar content which would cause GNU or OSX to perform and action? Or, of any buffer-overflow-type scenarios for the escape sequence handlers? (Surely most graphical terminals rely on some well-known library...)

Re: S/party/hack like it's 1999

#9
You can even put ANSI escape sequences in file names, since there is no notion of an encoding for file names in POSIX. They're just strings of any byte except / and NUL. Fortunately GNU ls won't print most escape sequences verbatim to stdout, but other implementations and/or programs might, and I have had some success creating a file name that GNU ls always prints in a fixed color (this was a while ago, don't have it on hand).
Post reply on HN