rapid7 / metasploitable3

Metasploitable3 is a VM that is built from the ground up with a large amount of security vulnerabilities.
Other
4.59k stars 1.11k forks source link

building issue powershell downloading file #449

Open Samega7Cattac opened 4 years ago

Samega7Cattac commented 4 years ago

Issue Description

I always getting this error while building the windows version. Already tried again and same issue.

Host System

Command Output

...
virtualbox-iso: C:\Users\vagrant>powershell -Command "[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.SecurityProtocolType]::Tls12; (New-Object System.Net.WebClient).DownloadFile('https://github.com/downloads/alexkasko/openjdk-unofficial-builds/openjdk-1.6.0-unofficial-b27-windows-amd64.zip', 'C:\Windows\Temp\openjdk-1.6.0-unofficial-b27-windows-amd64.zip')"  0<NUL
==> virtualbox-iso: Exception calling "DownloadFile" with "2" argument(s): "An exception occurred
==> virtualbox-iso: during a WebClient request."
==> virtualbox-iso: At line:1 char:96
==> virtualbox-iso: + ... pe]::Tls12; (New-Object System.Net.WebClient).DownloadFile('https://g ...
==> virtualbox-iso: +                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
==> virtualbox-iso:     + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
==> virtualbox-iso:     + FullyQualifiedErrorId : WebException
==> virtualbox-iso:
Aadinath1234 commented 2 years ago

Me too facing this issue

Aadinath1234 commented 2 years ago

Have you got solution???

Samega7Cattac commented 2 years ago

nop, gave up

sachinjung commented 2 years ago

I have done these following steps to make it work for me. I hope you can do the same with PowerShell too.

  1. Install Vagrant and Vagrant VMware Plugins
  2. Install Packer
  3. Install VMware Workstation Pro
  4. Download the Metasploitable3 github repository as zip
  5. Extract the Metasploitable-Master zip where you want to put your machine
  6. Run administrative command prompt and go to metasploitable3-master
  7. Run the following commands

Microsoft Windows [Version 10.0.19042.1466] (c) Microsoft Corporation. All rights reserved.

C:\Windows\system32>cd \Users\mustb\Documents\Virtual Machines\Mabl3

C:\Users\mustb\Documents\Virtual Machines\Mabl3>dir Volume in drive C has no label. Volume Serial Number is CE73-3024

Directory of C:\Users\mustb\Documents\Virtual Machines\Mabl3

01/19/2022 09:07 PM

. 01/19/2022 09:07 PM .. 01/10/2022 10:21 AM .github 01/10/2022 10:21 AM 105 .gitignore 01/19/2022 09:07 PM .vagrant 01/10/2022 10:21 AM 6,640 build.ps1 01/10/2022 10:21 AM 7,486 build.sh 01/10/2022 10:21 AM chef 01/10/2022 10:21 AM 1,783 COPYING 01/10/2022 10:21 AM iso 01/10/2022 10:21 AM 3,601 LICENSE 01/10/2022 10:21 AM packer 01/10/2022 10:21 AM 6,006 README.md 01/10/2022 10:21 AM resources 01/10/2022 10:21 AM scripts 01/10/2022 10:21 AM 2,297 Vagrantfile 01/10/2022 10:21 AM versions 7 File(s) 27,918 bytes 10 Dir(s) 114,240,036,864 bytes free

C:\Users\mustb\Documents\Virtual Machines\Mabl3>vagrant up --provider vmware_desktop This process will pull the vmware image from internet box repository If both box are downloaded successfully move to next step

C:\Users\mustb\Documents\Virtual Machines\Mabl3>vagrant up This will start the vagrant box

C:\Users\mustb\Documents\Virtual Machines\Mabl3>vagrant provision This will provision the virtual machine

Now, Open VMware Workstation Open virtual machine inside the metasploitable3-master.vagrant\machines\win2k8 or ub1404\vmware_desktop\45a3b355-f450-4e0d-83f2-18f5bea2ad60 (some random folder)\metasploitable3-win2k8.vmx

Export the virtual machine as OVA if you like or make a copy

Do same for Ubuntu 14.04 virtual machine as well