Maximus5 / ConEmu

Customizable Windows terminal with tabs, splits, quake-style, hotkeys and more
https://conemu.github.io/
BSD 3-Clause "New" or "Revised" License
8.55k stars 571 forks source link

Remote Code Execution #687

Open devast8a opened 8 years ago

devast8a commented 8 years ago

By default, any application that writes untrusted data to the terminal without filtering for ANSI escape sequences is vulnerable to remote code execution when running under ConEmu. This is done by using the fact that ConEmu has a special OSC for executing programs ESC ] 9; 7; prog ST.

To mitigate this you can disable Injecting ConEmuHk and ensure your process isn't directly run by ConEmu. However this may not be desirable as you lose other functionality.

A possible change to deal with this could be to add an option that by default disables ConEmu OSC handling.

Even though ConEmu isn't really to blame, applications should be filtering untrusted data, in practice the default behavior is unsafe.

Maximus5 commented 8 years ago

Actually, I'm planning to implement list of allowed commands (using masks or regexps).