mandiant / flare-vm

A collection of software installations scripts for Windows systems that allows you to easily setup and maintain a reverse engineering environment on a VM.
Apache License 2.0
6.35k stars 896 forks source link

Fail to install Flare-VM #454

Closed SuperSchramm closed 1 year ago

SuperSchramm commented 1 year ago

Description

When attempting to install flare-vm application an error received stating that

Steps to Reproduce

### Tasks
- [ ] In PowerShell Admin prompt, run: (New-Object net.webclient).DownloadFile('https://raw.githubusercontent.com/mandiant/flare-vm/main/install.ps1',"$([Environment]::GetFolderPath("Desktop"))\install.ps1")
- [ ]  Change to the directory where you saved the file (Desktop).
- [ ] Run: Unblock-File .\install.ps1
- [ ] Run: Set-ExecutionPolicy Unrestricted
- [ ] Accept the prompt to set the ExecPol to unrestricted if one appears
- [ ] Run: .\install.ps1 -customConfig https://raw.githubusercontent.com/HuskyHacks/PMAT-labs/main/config.xml

Expected behavior:

Application installs successfully

Actual behavior:

Invoke-Expression : The term 'cinst' is not recognized as the name of a cmdlet, function, script file, or operable
program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:55 char:9
+         Invoke-Expression $command
+         ~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (cinst:String) [Invoke-Expression], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException,Microsoft.PowerShell.Commands.InvokeExpressionCommand

Environment

Additional Information

image1

uncle-iroh commented 1 year ago

Ditto

aviborse commented 1 year ago

Any solution on this? Me too facing the same issue

jakop311 commented 1 year ago

I'm facing the same problem too. For mine, I think it's just because the Windows version isn't compatible to the tested versions.

mr-tz commented 1 year ago

Can you verify that chocolatey installed and your path is setup correctly?

SuperSchramm commented 1 year ago

I tried installing chocolatey separately and just letting FVM do the install and the result was the same.

I have tried on multiple versions of windows with the same result. Granted none were the exact versions listed by installers tested version. However, all were fresh installs with no updates run and all necessary security settings disabled.

mr-tz commented 1 year ago

So running choco commands manually works?

When does the cinst error occur? During install of Boxstarter?

SuperSchramm commented 1 year ago

I will have to reinstall Choco on this box this morning. This is a new install. It did not work on the last box using the FVM installer but I did not try after a manual install of choco. - - -KevinThere is no CloudIt’s just someone else’s computerOn Jun 1, 2023, at 3:12 AM, Moritz @.***> wrote: So running choco commands manually works? When does the cinst error occur? During install of Boxstarter?

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.***>

NotionalLabs commented 1 year ago

This is occurring because of yesterday's release of Chocolatey v2.0.0, which deprecated all of the shims like cinst, etc. I was able to work around this for now by pinning the version to v1.4.0 as per the installation docs: https://docs.chocolatey.org/en-us/choco/setup#installing-a-particular-version-of-chocolatey

Workaround TL;DR:

(I used the official Chocolately installer one-liner rather than the FlareVM install script one, but I wouldn't think it would matter too much. This is the one I used: Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iwr https://community.chocolatey.org/install.ps1 -UseBasicParsing | iex)

SuperSchramm commented 1 year ago

This is occurring because of yesterday's release of Chocolatey v2.0.0, which deprecated all of the shims like cinst, etc. I was able to work around this for now by pinning the version to v1.4.0 as per the installation docs: https://docs.chocolatey.org/en-us/choco/setup#installing-a-particular-version-of-chocolatey

Workaround TL;DR:

  • Make sure Chocolatey isn't installed or remove it
  • Set the following environment variable in PowerShell: $env:chocolateyVersion = '1.4.0'
  • Retry the install

(I used the official Chocolately installer one-liner rather than the FlareVM install script one, but I wouldn't think it would matter too much. This is the one I used: Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iwr https://community.chocolatey.org/install.ps1 -UseBasicParsing | iex)

This was the magic that got the ball rolling.

ryanoleary26 commented 1 year ago

This is occurring because of yesterday's release of Chocolatey v2.0.0, which deprecated all of the shims like cinst, etc. I was able to work around this for now by pinning the version to v1.4.0 as per the installation docs: https://docs.chocolatey.org/en-us/choco/setup#installing-a-particular-version-of-chocolatey Workaround TL;DR:

  • Make sure Chocolatey isn't installed or remove it
  • Set the following environment variable in PowerShell: $env:chocolateyVersion = '1.4.0'
  • Retry the install

(I used the official Chocolately installer one-liner rather than the FlareVM install script one, but I wouldn't think it would matter too much. This is the one I used: Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iwr https://community.chocolatey.org/install.ps1 -UseBasicParsing | iex)

This was the magic that got the ball rolling.

Want to echo this, huge thanks for spotting this!

mr-tz commented 1 year ago

Thanks for tracking this down!

aviborse commented 1 year ago

Awesome......it worked. thank you so much

uncle-iroh commented 1 year ago
  • $env:chocolateyVersion = '1.4.0'

This is occurring because of yesterday's release of Chocolatey v2.0.0, which deprecated all of the shims like cinst, etc. I was able to work around this for now by pinning the version to v1.4.0 as per the installation docs: https://docs.chocolatey.org/en-us/choco/setup#installing-a-particular-version-of-chocolatey

Workaround TL;DR:

  • Make sure Chocolatey isn't installed or remove it
  • Set the following environment variable in PowerShell: $env:chocolateyVersion = '1.4.0'
  • Retry the install

(I used the official Chocolately installer one-liner rather than the FlareVM install script one, but I wouldn't think it would matter too much. This is the one I used: Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iwr https://community.chocolatey.org/install.ps1 -UseBasicParsing | iex)

Yes, I deleted C:\ProgramData\chocolity and then set $env:chocolateyVersion = '1.4.0' and used the install script and it worked fine.

Thanks brother.