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

Windows installer appears to write a temp file to c:\metasploit-framework.zip without admin escalation #96

Open
busterb opened this issue Mar 22, 2019 · 3 comments
Labels

Comments

@busterb
Copy link
Member

busterb commented Mar 22, 2019

See rapid7/metasploit-framework#11560 (comment) , since the installer was changed to use the fastzip method, it fails when executed as a regular user, even if UAC asks for escalation ahead of time. This appears to be because the temp file that gets extracted is placed in c:\ which the installer does not have privileges for unless you run the MSI from an administrator prompt in the first place.

I wonder if the .zip file could be placed in a standard %TEMP location instead.

@CORS1ER
Copy link

CORS1ER commented Jun 23, 2020

Could it be possible that fastzip requires a buffer when generating a file output? (see https://github.com/sasq64/fastzip/blob/master/src/fastzip.cpp) the requirement could be larger than the previous method. I had low free space at the time, approx 5GB. Another user mentioned the same thing...

I have had hit and miss with executing from elevated PS or similar.

I presume the code would handle the exception by outputting to another partition/drive with the appropriate free space. I say this because my installation was output to D:\ despite C:\ being selected, similar to another user

Then, the bug in the fixzip code does not allow the modification of the %PATH env var (speculation). This needed to be manually updated after copying the source from D:\ to C:\

@busterb
Copy link
Member Author

busterb commented Jun 23, 2020

That could be it, it hadn't occurred to me to try it with lower disk space available as well.

@buffcode
Copy link

buffcode commented Aug 3, 2020

I have 72 GB available and still reveice the same error as rapid7/metasploit-framework#11560 (comment). Patching registry did not help, starting msiexec with /a immediately fails with error 2203

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

No branches or pull requests

3 participants