metasploit-framework icon indicating copy to clipboard operation
metasploit-framework copied to clipboard

Post: Powershell methods do not escape special characters ($) in command strings

Open bcoles opened this issue 2 years ago • 1 comments

Many Post libraries contain shell methods which are presumed to work on powershell sessions. While this is often true, the shell methods do not appropriately escape special characters such as $.

  • https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_special_characters?view=powershell-7.2
  • https://www.rlmueller.net/PowerShellEscape.htm

The Msf::Post::Windows::Registry library methods offer an example of this issue:

Registry query

This is likely a systemic issue in Post libraries in Framework.

bcoles avatar Aug 21 '22 04:08 bcoles

Hi!

This issue has been left open with no activity for a while now.

We get a lot of issues, so we currently close issues after 60 days of inactivity. It’s been at least 30 days since the last update here. If we missed this issue or if you want to keep it open, please reply here. You can also add the label "not stale" to keep this issue open!

As a friendly reminder: the best way to see this issue, or any other, fixed is to open a Pull Request.

github-actions[bot] avatar Sep 20 '22 15:09 github-actions[bot]