Configuring Smart Card | Common Access Card (CAC) | Personal Identity Verification (PIV) in VMware vSphere and VMware Horizon

Overview

I use a YubiKey 5Ci (by Yubico) in my lab. This allows me to log in with a smart card interface. If you are looking for information on how to configure smart card access in your lab, please reference the following post: MyLab: Smart Card Authentication

Continue reading “Configuring Smart Card | Common Access Card (CAC) | Personal Identity Verification (PIV) in VMware vSphere and VMware Horizon”

VMware Aria Operations to Monitor VMware vSphere 7.0 STIG

Important!

Alert Symptoms and Definitions can be set up in Aria Operations, but they will not truly monitor the the virtual machine accurately unless the virtual machines have already been secured!

A lot of the settings in the STIG do not exist by default and therefore cannot be monitored with confidence. It is very important to use a hardened template to save a lot of work. If virtual machines already exist, but have not been secured, you can use the following script (PowerCLI: Multiple Virtual Machines Script) to cut down on the level of effort by tackling more than one virtual machine at a time.

Overview

VMware Aria Operations (formerly vRealize Operations) can be used to monitor and alert on VMware vSphere 7.0 STIG compliance. This is helpful for when the environment has already been secured, but during troubleshooting, or other maintenance, the security standards were relaxed and never re-applied. Compliance drifts from the baseline are common and hard to detect without some sort of monitoring system. VMware Aria Operations can alert staff and remind them to button up the security compliance.

Continue reading “VMware Aria Operations to Monitor VMware vSphere 7.0 STIG”

MyLab: The Certificates

Overview

I am a strong proponent to securing an infrastructure with customer-signed Transport Layer Security (TLS) certificates internally and only using third party certificates where absolutely necessary for external services.

For this service, I am going to build a two-tier Microsoft certificate authority (CA) using Windows Server 2022. One virtual machine will be a root authority and the other will be an intermediate CA where the certificates will actually be provisioned from. It is recommended to shut down and remove the Root CA, but I am only going to shut down (and not remove) the Root CA virtual machine in my lab.

Continue reading “MyLab: The Certificates”

OpenSSL Commands

Prerequisites

Access a Computer with OpenSSL

Copy the file(s) to a system that has OpenSSL. If you are on a Windows machine, the easiest way to do this is to use Git for Windows (https://git-scm.com/download/win). Once installed, you can run Git Bash and will have access to OpenSSL. Linux and macOS will likely already have OpenSSL support in Terminal. If you are in a VMware environment, the ESXi hosts also have OpenSSL support.

Obtain the Certificate Password

It is highly likely the .pfx file will contain a password to protect the file. This password is required for the conversion process.

Convert PKCS12 (P12) to Privacy Enhanced Mail (PEM)

PEM files may have either a cer, crt, or pem file extension. These should be interchangeable, but some vendors are very particular about the file extension. Like anything, check the applicable documentation for recommendations.

Most vendors will require three files. Commonly I see the folllowing:

  • Machine certificate
  • Signing chain (Look at the vendor documentation for the chaining order! Some vendors require root + intermediates at the bottom and other will require the intermediates + the root at the bottom)
  • Private key

To get the machine certificate and signing certificates, run the following command:

openssl pkcs12 -in certificate-name.pfx -out machine.pem -nodes -nokeys

To get the encrypted private key, run the following command:

openssl pkcs12 -in certificate-name.pfx -out machine.key -nocerts

If you view the file, you will see that it is encrypted. Most systems will not take an encrypted key and will require an RSA Private Key.

openssl rsa -in machine.key -out machine-rsa.key

Now if you view the new file, you will see it is an RSA Private Key.

Ports, Protocols, and Services (PPS)

Introduction

This is my attempt to keep track of various ports, protocols, and services for successful deployments of solutions.

Active Directory

Port NumberTCP/UDPIANA Service NameIANA DescriptionCommon Use
135TCPepmapDCE endpoint resolutionRPC Endpoint Mapper
389TCP/UDPldapLightweight Directory Access ProtocolLDAP
636TCPldapsldap protocol over TLS/SSL (was sldap)LDAP SSL
3268TCPmsft-gcMicrosoft Global CatalogLDAP GC
3269TCPmsft-gc-sslMicrosoft Global Catalog with LDAP/SSLLDAP GC SSL
53TCP/UDPdomainDomain Name ServerDNS
88TCP/UDPkerberosKerberosKerberos
445TCPmicrosoft-dsMicrosoft-DSSMB
464TCP/UDPkpasswdkpasswdKerberos Password V5

https://learn.microsoft.com/en-us/troubleshoot/windows-server/identity/config-firewall-for-ad-domains-and-trusts

https://learn.microsoft.com/en-US/troubleshoot/windows-server/networking/service-overview-and-network-port-requirements

Dynamic Host Configuration Protocol (DHCP)

Port NumberTCP/UDPIANA Service NameIANA DescriptionCommon Use
67UDPbootpsBootstrap Protocol ServerDHCP (Server)
68UDPbootpcBootstrap Protocol ClientDHCP (Client)

Domain Name System (DNS)

TCP/UDP: 53 domain Domain Name Server DNS

Port NumberTCP/UDPIANA Service NameIANA DescriptionCommon Use
53TCP/UDPdomainDomain Name ServerDNS

Network Time Protocol (NTP)

Port NumberTCP/UDPIANA Service NameIANA DescriptionCommon Use
123TCP/UDPntpNetwork Time ProtocolNTP

Server Message Block (SMB)

Port NumberTCP/UDPIANA Service NameIANA DescriptionCommon Use
139TCPnetbios-ssnNETBIOS Session ServiceSMB
445TCPmicrosoft-dsMicrosoft-DSSMB

Microsoft SQL Server

Port NumberTCP/UDPIANA Service NameIANA DecriptionCommon Use
1433TCPms-sql-sMicrosoft-SQL-ServerMicrosoft SQL

VMware Cloud Foundation

Port NumberTCP/UDPIANA Service NameIANA DescriptionCommon Use
443TCPhttpshttp protocol over TLS/SSLHTTP/S
22TCPsshThe Secure Shell (SSH) ProtocolSSH
5480TCPVMware Appliance Management Interface (VAMI)
9543TCP
902TCP
514TCPshellSyslog

VMware Horizon

Port NumberTCP/UDPIANA Service NameIANA DescriptionCommon Use
8443TCPpcsync-httpsPCsync HTTPSBlast Extreme traffic
443TCPhttpshttp protocol over TLS/SSLAuthentication
22443TCP/UDPBlast Extreme traffic
3389TCPms-wbt-serverMS WBT ServerRemote Desktop Protocol (RDP)

https://techzone.vmware.com/sites/default/files/Horizon-Network-Ports-with-All-Connection-Types-and-All-Display-Protocols.png

Helpful Links