rapid7/metasploitable3

vagrant-ssh execution script errors

DevelopMan opened this issue · 1 comments

Issue Description

Please check the General Issues section in the wiki before you submit the issue.
If you didn't find your issue mentioned, please give a thorough description of the issue you're seeing.
Also, please be sure to include any troubleshooting steps that you've already attempted.

Host System

  • OS: Kali Linux (Debian 5.19.11-1kali2 (2022-10-10) x86_64)
  • Packer Version: 1.6.6
  • Vagrant Version: 2.2.19
  • VirtualBox Version: 6.1.38

Command Output

Copy the relevant command output here.
If it's long, either post to a gist and add the link here, or isolate the error lines.

I've tried to use ./build.sh windows2008 and got the error:

Exception setting "SecurityProtocol": "Cannot convert null to type "System.Net.SecurityProtocolType" due to invalid enumeration values. Specify one of the following enumeration values and try again. The possible enumeration values are "Ssl3, Tls"."
At line:2 char:35
+        [Net.ServicePointManager]:: <<<< SecurityProtocol = [Net.SecurityProtocolType]::Tls12; (New-Object System.Net.WebClient).DownloadFile('https://raw.githubusercontent.com/mitchellh/vagrant/master/keys/vagrant.pub', 'C:\Users\vagrant\.ssh\authorized_keys')
+ CategoryInfo          : InvalidOperation: (:) [], RuntimeException
+ FullyQualifiedErrorId : PropertyAssignmentException

Exception calling "DownloadFile" with "2" argument(s): "An exception occurred during a WebClient request."
At line:2 char:135
+        [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; (New-Object System.Net.WebClient).DownloadFile <<<< ('https://raw.githubusercontent.com/mitchellh/vagrant/master/keys/vagrant.pub', 'C:\Users\vagrant\.ssh\authorized_keys')
+ CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
+ FullyQualifiedErrorId : DotNetMethodException

It means that dotnet 4.5 wasn't installed (because this package supposes to do this). I investigated it a bit and found the error:

2022-11-02T22:59:41 System.Management.Automation.MethodInvocationException: Exception calling "DownloadFile" with "2" argument(s): "The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel." ---> System.Net.WebException: The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel. ---> System.Security.Authentication.AuthenticationException: The remote certificate is invalid according to the validation procedure.

The entire log file: https://gist.github.com/DevelopMan/fdd9e5356452598c7a691f08615847b0

The script can't download the dotnet package because of the certificate.

This looks to be a duplicate of #575, a fix just landed please update the retest this.

If the issue persists please reopen here.