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

Fix 2195 #2482

Merged
merged 2 commits into from Aug 31, 2023
Merged

Fix 2195 #2482

merged 2 commits into from Aug 31, 2023

Conversation

simonai1254
Copy link
Contributor

@simonai1254 simonai1254 commented Aug 30, 2023

Description

Trying to fix arbitrary code execution documented in #2195 by enclosing the vulnerable string with quotation marks. This should force powershell to interpret the input as string and not as code.

Motivation and Context

Should fix a security vulnerability.

How Has This Been Tested?

This code has not been tested (don't heave the development environment up and running) and I'm not sure if the double quotation is correct way of escaping the character in C#. Please verify this before merging.

Notes:

Depending on how the command is passed to the backend it might still be possible to terminate the string section with arbitrary quotation marks in the crafted string. It might be necessary to filter the input for the escaping quotation mark sequence (and thereby limiting real passwords for this use case)

Screenshots (if appropriate):

n/a

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Changed feature (non-breaking change which changes functionality)
  • Changed feature (breaking change which changes functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Updated translation

Checklist:

  • I have read the CONTRIBUTING document.
  • My code follows the code style of this project.
  • All Tests within VisualStudio are passing [no dev environment available]
  • This pull request does not target the master branch.
  • I have updated the changelog file accordingly, if necessary.
  • I have updated the documentation accordingly, if necessary.

In order to interpret variable as string and not arbitrary code
@Kvarkas Kvarkas merged commit ac99115 into mRemoteNG:v1.77.3-dev Aug 31, 2023
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants