Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remote Code Execution #687

devast8a opened this issue May 22, 2016 · 1 comment

Remote Code Execution #687

devast8a opened this issue May 22, 2016 · 1 comment


Copy link

devast8a commented May 22, 2016

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.

Copy link

Maximus5 commented May 22, 2016

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

Maximus5 added a commit that referenced this issue Jun 9, 2016
…lowed code and macro.

  This allows [ConEmu specific OSC](
  to be executed: `^]]9;6;""*macro*""^]\\` and `^]]9;7;""*cmd*""^]\\`.

  Since now, they allowed by default in `cmd.exe` only (were implemented for `GitShowBranch.cmd`).
  User may also disable or enable they for any process.

  Also, there is a list of allowed commands. Commands are case-sensitive, one line - one command.
  User may use `*` to allow bunch of commands by ‘mask’.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet

No branches or pull requests

2 participants