4 ms·
Great, but please include other vulnerabilities, including exploits, like mine in 1999 [1]: In the xterm there is a feature to change the title of the win
by wslh 3y ago
Great, but please include other vulnerabilities, including exploits, like mine in 1999 [1]:
In the xterm there is a feature to change the title of
the window. You can change the title of the window sending one of the escape codes of the
xterm.
(linux: man console_codes)
By Example:
ESC]2;This is my Xterm^G
This escape code changes the xterm's title to "This is my Xterm"
Obviously You can do the same using the kvt (Kde Virtual Terminal).
But the kvt has a buffer overflow. If the size of the new title of the
window is big enough then the kvt will do a core dump.
This bug follows the "reverse exploit" line, if some
program sends
this escape code to the kvt.
For Example, When someone connects to any ftp server and the server sends
the Welcome Message, It will be easy to exploit this bug changing the
Welcome Message (in the .message file) to one with this
escape code and
to cause a buffer overflow.
Another example where someone can cause a buffer overflow in your machine is
simply doing "cat hosts" where hosts may be a file that
you received
by mail containing the "change window escape code".
This bug shows some of the kvt's security problems being exploited via
a "reverse exploit" or a exploit sent directly to your
terminal
(if the attacker can write to your kvt)
If this bug is exploited, then the attacker can obtain
the privileges of the kvt's owner and execute some arbitrary code as this user.
[I found after] This bug was reported to the kde team by Larry Granroth
in January.
(http://bugs.kde.org/db/33/332.html)
The new kde's version doesn't have this bug in the
kconsole
Kvt was replaced totally by kconsole.
But the RedHat 6.0 installed with KDE has this bug.
[1] https://seclists.org/bugtraq/1999/Sep/432 https://seclists.org/bugtraq/1999/Sep/432
It it weird that I couldn't find it in Google but Bing with a simple query. Is Google Search Engine SaaS abandonware?
- sargstuff 3y agoDisable, filter out ansi escape sequence(s)?
- junon 3y agoI maintain `ansi-regex` on npm. Believe me when I say doing this with any amount of certainty is almost impossible.
- sargstuff 3y agoDisable, filter out ansi escape sequence(s), rewrite/map ansi escape sequence(s) to tput format. No source code or familiarity with using LD_ tricks? use python wrapper around program and script python for appropriate mods before passing along to window. Wonder if this was one reason for Sun Solaris NeWS (post script based vs, text based window manager) Perhaps use python from command line with gui extensions and no ansi escape sequence support as window manger. Run terminal window without ansi escape seqence support. Better coverage if done with ebpf filter at the OS level.
- junon 3y agoThe OS has nothing to do with this aside setting the title I suppose, and that's if native widgets are being used and depends on the system. Further, there's nothing special about escapes. Their "feature" is that they're just text, part of the normal stream of bytes. Anything can be an escape if it's interpreted as such by whatever is consuming the stream.
- sargstuff 3y ago> "The OS has nothing to do with this aside setting ..." note: Additional technical information context/solution provided for answer is a bit beyond the typical response required for question. OS has better control/access to user set of i/o streams. Not the most efficient/convenient way, but ebpf can be setup to detect 'escape text patterns' and filter by user/xwindows widgets/aspect of program such as title. Would be a pain, because of need to deal with inband/non-cannonical characters (ctrl-D & EOF being majority of live stream problem) Sticking to 'title change' is a non-continuous stream aka for this talk, first non-connonical character closes the stream, aka no distinction between Form Feed / Line Feed or ctrl-D. Simple user land way would be to redirect terminal to sed /awk script to identify 'title' command, strip out the 'security sequence issues' before passing along i/o to what ever is going to do the 'window with title to change'. OS, windows manager, initial login shell and process initiating the window who's title are to be changed are parent processes with io points that can be redirect with the aforemention script. in-band control for terminals also allows for redirecting to remote machines via programs like telenet without the need for ssh! (for security, would need to do a few other things too) 1st process to Using loopback device/socket instead of named/anonymous pipe redirection will allow for raw/non-cannonical input (control done out of band) -- assuming the filter program (other than standard user shell) setup to handle/pass along raw/cannonical input/output. Sort fun way to customize 'rm -rf' with a pop-up check question 'Are you really sure you want remove everything' and terminate the command if unintentional (and/or keep tabs on what removed by running find command / mail list). further search terms: stty, tty, raw, cooked, canonical, non-cannonical For this topic, perhaps confirm with user if really wanted to allow (escape sequence), retry(filter out ansi sequence), aboard(skip it). Or just log attempt for review/action later.
- deleted 3y ago[deleted]
- deleted 3y ago[deleted]
- dgl 3y agoThanks, I will see about adding that. As I wrote before CVEs it is hard to find details. I've also noticed Google is missing quite a lot of historical things lately.