mandiant / commando-vm

Complete Mandiant Offensive VM (Commando VM), a fully customizable Windows-based pentesting virtual machine distribution. commandovm@mandiant.com
https://www.mandiant.com/resources/blog/commando-vm-windows-offensive-distribution
Apache License 2.0
6.88k stars 1.28k forks source link

Multiple packages failing install: No error output #132

Closed dwizel closed 4 years ago

dwizel commented 4 years ago

New install of CommandoVM after the resolution to Metapsloit updating failing consistently. New install is showing a lot of apps not being installed. image

Version

Additional context Add any other context about the problem here.

cherkie commented 4 years ago

I have the same issue, a bit less apps, though: image

And they all come back with similar errors - packages not found at the destination.

2020-04-27 13_03_23-Cmder

mrpogden commented 4 years ago

Such a shame this isnt properly maintained, as It has such potential. Come on Mandiant, update the links in the chocolatey repo to the correct/newest versions and these bugs disappear. Its not that difficult. Otherwise, you're going to loose a lot of interest very quickly.

day1player commented 4 years ago

@mrpogden this recurring issue is specific to only one package, Metasploit. Unfortunately Metasploit removes their old .msi files as soon as a new one is available, and they constantly change the name. This makes it very hard to automate the creation/updating of this package.

We also need to make sure we download the file and calculate the correct checksum before updating the package for install. As it is now, it is a manual effort from us to keep everything updated and we do so as time permits. We have, admittedly, dropped the ball on this one particular package, but we are working on a better solution for self notifying and fixing when the package breaks.

Users can always manually download and execute the Metasploit installer on their own if the package fails to install.

(Edit) We are open to suggestions đź‘Ť

mrpogden commented 4 years ago

@day1player actually, there are at least 4 packages that come back with 404 errors. It’s not just metasploit. Mimikatz tried to download a binary version that doesn’t even exist. Someone raised that weeks ago and there was a reply saying it would be fixed but wasn’t.

martialhax commented 4 years ago

I am in the process of installing right now and using the exact recommended stats - Windows 10 1903 etc. Fresh OS install with all MS Updates. Multiple packages have failed for me too including apimonitor and GoogleChrome. I tried manually as well while the rest continues per install Notes - "...You can check what packages failed install by listing the C:\ProgramData\chocolatey\lib-bad directory. Failed packages are stored by folder name. You can attempt manual install with the following command: cinst -y ..." and per https://github.com/fireeye/commando-vm/issues/123

day1player commented 4 years ago

@martialhax do they continue to fail upon manual install? If so could you post some error output?

martialhax commented 4 years ago

Well Google Chrome succeeded manually today but the others did not (yet). I'm running the install script again after it finished sometime late last night. It finished but the readme was not placed on Desktop and the background didn't change etc. I'll see after it finishes again. Screenshots of other manual runs for stuff in the C:\ProgramData\chocolatey\lib-bad directory here: Screen Shot 2020-05-21 at 11 29 44 AM Screen Shot 2020-05-21 at 11 31 04 AM

day1player commented 4 years ago

@martialhax the API Monitor failling looks like a new issue so I have created an issue for us to update it. As for Spiderfoot and AMASS. Do you have docker installed?

Before you continue trying to install docker images, are you on a Windows host machine?

day1player commented 4 years ago

@martialhax as for the Readme and Desktop image, after you finish with the install script (if that doesnt fix it) you will need to manually install the config package (make sure you are in an admin prompt):

cinst -y commandovm.win10.config.fireeye
martialhax commented 4 years ago

@martialhax the API Monitor failling looks like a new issue so I have created an issue for us to update it. As for Spiderfoot and AMASS. Do you have docker installed?

Before you continue trying to install docker images, are you on a Windows host machine?

The Win 10 1903 is running in Fusion on a Mac OS 10.15.4 host box and the script did install Docker Desktop but when it runs auto at startup or manually it gives the attached screenshot error. Personally I'm not keen on running the Kali or Docker in this VM anyway. I see no benefit vs running either in the host (maybe make them optional installs?) I had thought Virtualization Support in the VM was optional anyway (just needed by these if used).

Screen Shot 2020-05-21 at 11 39 55 AM

martialhax commented 4 years ago

@martialhax as for the Readme and Desktop image, after you finish with the install script (if that doesnt fix it) you will need to manually install the config package (make sure you are in an admin prompt):

cinst -y commandovm.win10.config.fireeye

OK will do.

day1player commented 4 years ago

@martialhax thats good, Fusion should have no issues.. Can you make sure you have set the 'Enable hypervisor' setting for the VM? It will be under Settings -> Processors & Memory -> Advanced Options

image

Personally I'm not keen on running the Kali or Docker in this VM anyway. I see no benefit

I have found that my workflow on Commando is much better with these options. For example text file processing in bash is much easier than cmd or powershell, and some programs are much easier to install with Docker such as Covenant. A lot of times on internal pentests or when using a VPN you can only connect one machine to the network, so having the capabilities of everything on one VM can be really clutch. If you can get it working, give it a try, if you decide you would rather run multiple VMs then I can also help you set up a custom profile so that Docker/Kali WSL are not installed :-)

martialhax commented 4 years ago

Ahh good catch....no its not set. I'll have to wait until I can power it down however. AFA Docker and Kali in the VM I'll just try to get everything installed/working and then will give it a try. I won't knock it completely until I try it :-) Thanks.

day1player commented 4 years ago

Thanks for posting đź‘Ť let me know if you have further issues.

I will be changing the default install profile in a few weeks to remove Docker and Kali (I will also be creating other optional profiles which will include them). My hope is to speed up the default install by removing some more problematic packages and having less stuff to download unless the user wants it.. the build will then be much easier to install and will take less space.

martialhax commented 4 years ago

Only things left in lib-bad now are - libraries.python2.fireeye and wfuzz.fireeye now. (they have related dependencies looks like). I had to run "cinst -y commandovm.win10.config.fireeye" manually cause it error out in the script run. Only noticed one Warning (red):

Screen Shot 2020-05-21 at 9 00 17 PM

day1player commented 4 years ago

fixed in #147 added logging capabilities to the installer