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 #15662, fix meterpreter download of utf8 filenames #15666

Merged
merged 1 commit into from
Sep 20, 2021

Conversation

timwr
Copy link
Contributor

@timwr timwr commented Sep 13, 2021

Quick fix for #15662

Verification

List the steps needed to make sure this thing works

  • Start msfconsole
  • Get a native windows meterpreter session
  • Run the following

meterpreter > mkdir test
Creating directory: test
meterpreter > cd test
meterpreter > edit 🔥
meterpreter > ls
Listing: C:\test
=================

Mode              Size  Type  Last modified              Name
----              ----  ----  -------------              ----
100666/rw-rw-rw-  5     fil   2021-09-13 16:16:23 +0100  🔥

meterpreter > download 🔥
[*] Downloading: 🔥 -> /metasploit-framework/🔥/🔥
[*] Downloaded 5.00 B of 5.00 B (100.0%): 🔥 -> /metasploit-framework/🔥/🔥
[*] download   : 🔥 -> /metasploit-framework/🔥/🔥
Before fix:
meterpreter > download 🔥
[-] Error running command download: Encoding::CompatibilityError incompatible character encodings: ASCII-8BIT and UTF-8

@adfoster-r7
Copy link
Contributor

Github tests are failing for unrelated reasons, if you rebase against master and push it up again, they should go green 👍

@jmartin-tech
Copy link
Contributor

@msjenkins-r7 test this please.

@space-r7
Copy link
Contributor

Worked for me:

meterpreter > download 🔥 /Users/space/Desktop
[*] Downloading: 🔥 -> /Users/space/Desktop/🔥
[*] Downloaded 20.00 B of 20.00 B (100.0%): 🔥 -> /Users/space/Desktop/🔥
[*] download   : 🔥 -> /Users/space/Desktop/🔥

@space-r7 space-r7 added the rn-fix release notes fix label Sep 20, 2021
@space-r7 space-r7 merged commit 7fa880f into rapid7:master Sep 20, 2021
@space-r7
Copy link
Contributor

Release Notes

This fixes an issue found in Meterpreter's download functionality where downloading a file with a name containing unicode characters would fail due to incompatible encoding.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants