How to generate SSL certificates for use with a KVM box & XViewer with XCA v0.9.3



Similar documents
How to setup and use XViewer & XImpcert

Generating and Installing SSL Certificates on the Cisco ISA500

Replacing vcenter Server 4.0 Certificates VMware vsphere 4.0

User Guide Supplement. S/MIME Support Package for BlackBerry Smartphones BlackBerry Pearl 8100 Series

X.509 and SSL. A look into the complex world of X.509 and SSL UUASC 07/05/07. Phil Dibowitz

Working with Certificate and Key Files in MatrixSSL

Unifying Information Security. Implementing TLS on the CLEARSWIFT SECURE Gateway

Junio SSL WebLogic Oracle. Guía de Instalación. Junio, SSL WebLogic Oracle Guía de Instalación CONFIDENCIAL Página 1 de 19

Encrypted Connections

X.509 Certificate Generator User Manual

Certificate Management. PAN-OS Administrator s Guide. Version 7.0

Document Classification: Public Document Name: SAPO Trust Centre - Generating a SSL CSR for IIS with SAN Document Reference:

Creation and Management of Certificates

Configuring Multiple ACE Management Servers VMware ACE 2.0

Virtual Private Network with OpenVPN

WebLogic Server 6.1: How to configure SSL for PeopleSoft Application

Securing Web Access with a Private Certificate Authority

Chapter 7 Managing Users, Authentication, and Certificates

Configuration Guide for RFMS 3.0 Initial Configuration. WiNG 5 How-To Guide. Digital Certificates. July 2011 Revision 1.0

TechNote. Contents. Overview. Using a Windows Enterprise Root CA with DPI-SSL. Network Security

Using etoken for SSL Web Authentication. SSL V3.0 Overview

Obtaining SSL Certificates for VMware View Servers

webmethods Certificate Toolkit

Adding Digital Signature and Encryption in Outlook

Installation Procedure SSL Certificates in IIS 7

SSL Peach Pit User Guide. Peach Fuzzer, LLC. Version

Domino Certification Authority and SSL Certificates

Secure IIS Web Server with SSL

White Paper. Installation and Configuration of Fabasoft Folio IMAP Service. Fabasoft Folio 2015 Update Rollup 3

Obtaining SSL Certificates for VMware Horizon View Servers

Scenarios for Setting Up SSL Certificates for View

Displaying SSL Certificate and Key Pair Information

Exchange 2010 PKI Configuration Guide

Using etoken for Securing s Using Outlook and Outlook Express

Pre-configured AS2 Host Quick-Start Guide

Displaying SSL Certificate and Key Pair Information

Managed Services PKI 60-day Trial Quick Start Guide

SolarWinds Technical Reference

User Guide May Using Certificates in Outlook Express

VPN with INSYS routers Creating X509.v3 Certificates for VPNs with XCA. Configuration Guide

Replacing VirtualCenter Server Certificates VMware Infrastructure 3

Apache, SSL and Digital Signatures Using FreeBSD

Apache Security with SSL Using Ubuntu

LoadMaster SSL Certificate Quickstart Guide

Use Enterprise SSO as the Credential Server for Protected Sites

WHITE PAPER Citrix Secure Gateway Startup Guide

SECURE USER GUIDE OUTLOOK 2000

Domino and Internet. Security. IBM Collaboration Solutions. Ask the Experts 12/16/2014

BEA Weblogic Guide to Installing Root Certificates, Generating CSR and Installing SSL Certificate

Using a custom certificate for SSL inspection

TCS-CA. Outlook Express Configuration [VERSION 1.0] U S E R G U I D E

Enabling SSL and Client Certificates on the SAP J2EE Engine

Using CertAgent to Obtain Domain Controller and Smart Card Logon Certificates for Active Directory Authentication

SSL Interception on Proxy SG

Djigzo S/MIME setup guide

TrustKey Tool User Manual

Microsoft OCS with IPC-R: SIP (M)TLS Trunking. directpacket Product Supplement

Personal Secure Certificate

Asymmetric cryptosystems fundamental problem: authentication of public keys

Certificates for computers, Web servers, and Web browser users

Configuring Secure Socket Layer (SSL)

Digital certificates and SSL

User Guide Using Certificate in Microsoft Outlook Express

Yealink Technical White Paper. Contents. About VPN Types of VPN Access VPN Technology... 3 Example Use of a VPN Tunnel...

ETSI TS V1.1.1 ( )

Certificate Management

ISY994 Series Network Security Configuration Guide Requires firmware version Requires Java 1.7+

Working with Portecle to update / create a Java Keystore.

Understanding SSL/TLS

Using IKEv2 on Juniper Networks Junos Pulse Secure Access Appliance

Quick Note 041. Digi TransPort to Digi TransPort VPN Tunnel using OpenSSL certificates.

Apache Security with SSL Using Linux

Exostar LDAP Proxy / Secure Setup Guide. This document provides information on the following topics:

Ciphermail S/MIME Setup Guide

Entrust Managed Services PKI

How to Configure Certificate Based Authentication for WorxMail and XenMobile 10

Enterprise Content Management System Monitor 5.1 Security Considerations Revision CENIT AG Brandner, Marc

Using Microsoft s CA Server with SonicWALL Devices

Integrated SSL Scanning

This works very well for situations where all computers are within the same LAN and can access both the SQL server and the network shares.

USER GUIDE WWPass Security for (Outlook) For WWPass Security Pack 2.4

HP Device Manager 4.7

Entrust Managed Services PKI. Configuring secure LDAP with Domain Controller digital certificates

Replacing Default vcenter Server 5.0 and ESXi Certificates

(n)code Solutions CA A DIVISION OF GUJARAT NARMADA VALLEY FERTILIZERS COMPANY LIMITED P ROCEDURE F OR D OWNLOADING

SBClient SSL. Ehab AbuShmais

Setting Up SSL on IIS6 for MEGA Advisor

This section includes troubleshooting topics about certificates.

Activating HTTPS using wildcard certificate in Horizon Application Manager 1.5

Laboratory Exercises VI: SSL/TLS - Configuring Apache Server

DIGIPASS KEY series and smart card series for Juniper SSL VPN Authentication

Blue Coat Security First Steps Solution for Controlling HTTPS

Key Management and Distribution

etoken Enterprise For: SSL SSL with etoken

Application Note AN1502

Dlink DFL 800/1600 series: Using the built-in MS L2TP/IPSEC VPN client with certificates

PKI Contacts PKI for Fraunhofer Contacts

Secure Part II Due Date: Sept 27 Points: 25 Points

Internet Encryption S/Mime Standard

Transcription:

How to generate SSL certificates for use with a KVM box & XViewer with XCA v0.9.3 Written by Michael Lackner aka Grand Admiral Thrawn http://wp.xin.at/the-xviewer-project irc://www.xin.at:6666 #guests irc+ssl:/www.xin.at:6697 #guests How to generate SSL certificates for use with a KVM box & XViewer with XCA v0.9.3 by Michael Lackner is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Austria License. Index: 1. Preface 2. XCAs initial configuration 3. Creating the root certificate and key 4. Creating the KVM server certificate and key 5. Creating the client certificate and key 6. Exporting the certificates and keys for use by the KVM-over-IP box and XViewer 1.) Preface This document describes how to create your own set of SSL certificates for the KVM-over-IP box and its client tool XViewer and its certificate import companion tool XImpcert. It is meant for people who would rather like to create their own set of certificates instead of relying on commercial Certificate Authorities. Note that the company or product that this is meant for cannot be named in this documentation, as required by the original manufacturer in exchange for the right to rerelease their software under the free GPLv3 license. To learn which product is compatible, visit the following URL: http://wp.xin.at/the-xviewer-project XCA - the free X certificate and key management tool is a graphical application that can run on nearly any operating system. It simplifies the creation of SSL certificates for end users. You can download XCA version 0.9.3 (which is what was used as a base for this guide) from XIN.at or get whichever version you like from the XCA project itself: http://wp.xin.at/wp-content/uploads/2014/07/setup_xca-0.9.3.exe_.zip (Windows) http://wp.xin.at/wp-content/uploads/2014/07/xca-0.9.3_x86.dmg_.zip (MacOS X) http://wp.xin.at/wp-content/uploads/2014/07/xca-0.9.3.tar.gz (Linux & UNIX) http://sourceforge.net/projects/xca/files/xca/ You do not need to read this document if you wish to rely on unencrypted communication with your KVM-over-IP box. This is highly discouraged though.

You should read it, if you want to use any of the two higher security levels of the KVM, to work with either of the two: Security level 2: Server authentication. Any client may connect. Security level 3: 2-way PKI authentication. Clients need to present a certificate. With XCA, you can create the following certificates for your KVM: Root certificate root.crt and key rootkey.pem. File names mandatory. Server certificate server.crt and key serverkey.pem. File names mandatory. Client certificate client.p12 and key client.pem. File names arbitrary. 2.) XCAs initial configuration Please open XCA and create a new certificates/keys database: Pick a database file, enter a password for your new certificates/keys database and you're set. The database will be encrypted using your password for key derivation.

3.) Creating the root certificate and key Click on the tab Private Keys and click on New Key, then enter the following information: Now your root key has been created. Please make sure it is really called rootkey as this name is mandatory! On to the next step, please click on the Certificates Tab and hit New Certificate. See the following screenshots on the next pages.

Use the serial number 1, Signature algorithm SHA 1 and pick the [default] CA template. Then continue to the tab Subject :

Please enter the following information with care: Internal name : root (Mandatory!) countryname : US (Abbreviation, country 2-letter code, arbitrary) stateorprovincename : California (Use your full state name here, arbitrary) localityname : San Jose (Use your town/city name here, arbitrary) organizationname : My Certificate Authority (Name of your internal Certificate Authority, arbitrary) organizationalunitname : Signing Division (Name of your internal Certificate Authorities subdivision, arbitrary) commonname : KVM CA (Could also use a real host name here like mycertificateauthority.com, arbitrary) emailaddress : service@mycertificateauthority.com (Your internal Certificate Authorities email address, arbitrary) Private key : rootkey (RSA) (Mandatory! Should be auto-selected!)

Now click on the tab Extensions : Pick the Basic constraint Certification Authority, this is very important! Also pick a validity / time range that suits your internal security policy. Note that this has to be a longer range than the validity of the Server and Client certificates we're going to create and sign with this root certificate later on! In the coming examples, I'm going to choose a 10 years validity for the other certificates, so the root certificate is given a validity time range of 11 years to cover that. Just enter the time range appropriate in respect of your local security policy in years and click Apply, then continue to the tab Key usage :

Please pick the following Key usage criteria as suggested by the original KVM manufacturer: Certificate Sign CRL Sign After that, click on the Netscape tab:

Here, pick the following Netscape key usage criteria as suggested by the original KVM manufacturer: SSL CA S/MIME CA Object Signing CA Then click on the Advanced Tab for final verification:

The Advanced Tab should show the following information: X509v3 Basic Constraints: CA:TRUE X509v3 Key Usage: Certificate Sign, CRL Sign Netscape Cert Type: SSL CA, S/MIME CA, Object Signing CA If all checks out please press OK. This completes the creation of the root key and certificate, please see the following screenshots to check what it should look like at this stage:

This is what the rootkey should look like in the tab Private Keys. And when looking at Certificates :

This is what the root certificate should look like. Please keep in mind, that the internal names can never be seen by any parties trying to access the KVM and its certificates later. They are however mandatory for the purpose of importing into the KVM and its client tools. Now, let's create the server certificate & key!

4.) Creating the KVM server certificate and key What we will do now is to create a key plus certificate signing request for the KVM-over-IP box itself. The certificate will then be signed by our home made certificate authority, or rather by the private key of its own certificate. To create the server key, go back to the Private Keys tab, and click New Key again. Enter the following information: Please make sure you called the key serverkey, as this is once again mandatory. Let's continue with the creation of the server certificate. Please click on the tab Certificate signing requests and then on New Request :

Pick the Signature algorithm SHA 1 and make sure you select the [default] HTTPS_server template. Then, continue to the Subject tab:

Please enter the following information with care: Internal name : server (Mandatory!) countryname : US (Abbreviation, country 2-letter code, arbitrary) stateorprovincename : Nevada (Use your full state name here, arbitrary) localityname : Ash Springs (Use your town/city name here, arbitrary) organizationname : My Organization (Name of your organization, arbitrary) organizationalunitname : My Division (Name of your subdivision, arbitrary) commonname : kvm.myserver.com (Mandatory! This must match your KVM-over-IP box's fully qualified domain name or host name for SSL authentication to work!) emailaddress : contact@myserver.com (Your email address, arbitrary) Private key : serverkey (RSA) (Mandatory! Should be auto-selected!)

Next, please click on the tab Extensions : Make sure the Type selected is Not defined. Nothing else to do here, continue to Key usage :

Please pick the following Key usage criteria as suggested by the original KVM manufacturer: Digital Signature Non Repudiation Key Encipherment Data Encipherment Also, pick the following Extended key usage criterion: TLS Web Server Authentication After that, click on the Netscape tab:

Here, please pick the following Netscape key criterion as suggested by the original KVM manufacturer: SSL Server Also, please enter your SSL server name, which should be the same as specified for the commonname field on the Subject tab. In our case, that's kvm.myserver.com. After that, please continue to the Advanced tab for verification:

You should see the following information (The Netscape SSL Server Name will of course differ for your specific case): X509v3 Key Usage: Digital Signature, Non Repudiation, Key Encipherment, Data Encipherment X509v3 Extended Key Usage: TLS Web Server Authentication Netscape Cert Type: SSL Server Netscape SSL Server Name: kvm.myserver.com If everything is in order, please press OK to store your certificate signing request. You can then find it in the tab Certificate Signing Requests :

The Certificate Signing Request is done, but it is not yet signed. To sign it, just right click on the server certificate and pick Sign :

After that, you'll see a screen you should be relatively familiar with by now:

This looks similar to the root certificate creation as well as to the certificate signing request creation. Make sure that the proper certificate server is picked for signing, that extensions are being copied out of the request directly (less work then). Most importantly, make sure not to create a self signed certificate, but ensure you pick the root certificate for signing, so we can create a proper trust chain! Select the SHA 1 Signature algorithm and the [default] HTTPS_Server template again, then continue to the Extensions tab:

Pick Type Not defined and make sure you adjust the validity time range. Since we are playing certificate authority here, we can choose for how long the server certificate will be valid. Keep in mind though, that the validity period may not exceed the validity time range of the root certificate itself! We picked 11 years for the root CA, so we can easily sign the server certificate for a validity time range of 10 years. Skip the Key usage and Netscape Tabs this time, as the configuration of the signing request will be copied over for those parts. You may verify that by clicking on the Advanced tab:

Again, we should see the exact same information that we already know from our certificate signing request: X509v3 Key Usage: Digital Signature, Non Repudiation, Key Encipherment, Data Encipherment X509v3 Extended Key Usage: TLS Web Server Authentication Netscape Cert Type: SSL Server Netscape SSL Server Name: kvm.myserver.com Click ok now, and the certificate will be signed. This will be indicated in the list of Certificate signing requests :

Our server certificate is now signed by our root certificate authority. Whoever trusts root, will automatically trust server. This is a very simple trust chain. Real certificate authorities are trusted by most software (like web browsers etc.) implicitly, and so will certificates signed by such authorities. Now that that's done, we may continue to the client certificate. Please note that you need the client certificate for KVM security level 3 only. If all you wish to achieve is server authentication, you may skip step 5 and continue directly to step 6. Should you require full 2-way PKI authentication with both XViewer authenticating the KVMover-IP box as well as the KVM-over-IP box authenticating the XViewer client, you will need to continue with step 5:

5.) Creating the client certificate and key The client certificate we are going to create will later be added to XViewers certificate store using XImpcert. By signing it with root s key, we will make our XViewer a trusted client. Again, please create a private key first: This time there are no mandatory names. You can call your client keys whatever you like, e.g. client1, client2, clientlosangeles, clientlhasa, clientrome, clientparis, client-kvm.offices.berlin etc. Now we need another certificate signing request. Please click on the Certificate signing requests tab again, and click on New Request :

On the first page, pick the [default] HTTPS_client template, then continue to the Subject tab:

Please enter the following information with care: Internal name : client (Arbitrary.) countryname : SE (Abbreviation, country 2-letter code, arbitrary) stateorprovincename : Västerbotten (Use a full state name here, arbitrary) localityname : Umeå (Use your town/city name here, arbitrary) organizationname : My Organization (Name of your Organization, arbitrary) organizationalunitname : Signing Division (Name of your Organizations subdivision, arbitrary.) commonname : client (Could also use a real host name here like clientsweden.myserver.com, arbitrary) emailaddress : sweden@myserver.com (The clients email address, arbitrary) Private key : client (RSA) (Presence is mandatory, name is arbitrary as stated before. Should be auto-selected!)

Now please click on the Extensions tab: Just make sure the Type Not defined is selected, then go on to the Key usage Tab:

Please pick the following Key usage criteria as suggested by the original KVM manufacturer: Digital Signature Key Encipherment Data Encipherment Also, pick the following Extended key usage criterion: TLS Web Client Authentication After that, click on the Netscape tab:

Here, pick the following Netscape key usage criteria as suggested by the original KVM manufacturer: SSL Client S/MIME Then click on the Advanced Tab for final verification:

The Advanced Tab should show the following information: X509v3 Key Usage: Digital Signature, Key Encipherment, Data Encipherment X509v3 Extended Key Usage: TLS Web Client Authentication Netscape Cert Type: SSL Client, S/MIME If all checks out please press OK. After that we have yet another certificate signing request done, waiting to be signed by root. Please click on the Certificate signing requests tab, and start signing your client certificate:

Right click on the unsigned client certificate and pick Sign to start the signing process:

Make sure the client certificate is selected for signing and that extensions are being copied out of the signing request. Also, make sure you won't create a self-signed certificate! Once more, use the root certificate for signing, choose the SHA 1 signature algorithm and select the [default] HTTPS_client template this time. When that's done, continue to the Extensions tab:

Not much to do here, but to pick the type Not defined and once more specify the validity time range. Again, choose a time frame that complies to your local security policy and ensure that the certificate will not be valid for a longer time than the root certificate you're signing it with. Like with the server certificate, we'll pick 10 years again here, knowing that our root CA's certificate is valid for 11 years. Key usage criteria will have been copied out of the request already, so you can hop to the Advanced tab directly to verify the certificate one last time before signing it:

The Advanced Tab should show the following information, identical to what we have specified when creating the client certificate signing request: X509v3 Key Usage: Digital Signature, Key Encipherment, Data Encipherment X509v3 Extended Key Usage: TLS Web Client Authentication Netscape Cert Type: SSL Client, S/MIME If all appears in order, please click OK. Now, we should have three private keys, two properly handled certificate signing requests and three signed certificates. See the following screenshots to check how it should look like, starting with the Private Keys tab:

Our three private keys, one for the root certificate authority, one for the server certificate and one for the client certificate. Now, to the Certificate signing requests tab:

We have two certificate signing requests here, one for the KVM server and one for a client, both already signed by root. Next, the Certificates tab:

Here we have our trust chain visualized. The root certificate is being implicitly trusted. Root has signed both the server and client certificates, both valid until July 2024. That completes the entire certificate creation process. You are now almost ready to use your KVM box with either just server authentication or even full 2-way PKI authentication for encrypted remote control connections. All that remains is to export the required certificates and key files for the KVM box and XViewer. On to chapter 6:

6.) Exporting the certificates and keys for use by the KVM-over-IP box and XViewer For the KVM-over-IP box and its web server as well as the VNC server for remote control, we will need the following three files: root certificate ( root.crt, PEM encoded) server certificate ( server.crt, PEM encoded) server private key ( serverkey.pem, PEM encoded) For the clients we need the following two files: root certificate ( root.crt, PEM encoded) client certificate ( client.p12, PKCS#12 encoded, in case of 2-way PKI auth.) Please note that the file names of the root certificate ( root.crt ), the server certificate ( server.crt ) and the server private key ( serverkey.pem ) are mandatory for importing into the KVM-over-IP box and the XImpcert client tool for XViewer. See the following screenshots showing how to export those files:

To export the root certificate, left click on it in the Certificates tab, and choose Export in the right menu. Make sure it's named root.crt and encoded in PEM format.

The procedure for the server certificate export is exactly the same as for the root certificate. You just need to make sure the file is called server.crt.

For the servers private key, please go back to the Private Keys tab, left click on the serverkey and then click Export in the menu. Make sure you call the file serverkey.pem and to pick PEM encoding. Also, please check the box Encrypt the Key with a password. This is important, should your KVM-over-IP box ever get compromised and the server key stolen. Make sure the private part of the key is exported too, then press OK to get to the password prompt:

Since you chose to encrypt the key, you're now prompted for the according password. You'd be well advised to choose a strong one here. While theft of the servers private key is not overly probable in most scenarios, it won't hurt to be cautious!

If you've also generated a client certificate for 2-way PKI authentication, you also need to export this one for import into XViewer by XImpcert. Go to the Certificates tab, left click on the client certificate and then click on Export in the menu to the right. Make sure you pick PKCS #12 encoding, as this is required by the original developers client software. For PKCS #12, encryption of the certificate file is mandatory, so you'll be prompted for an encryption password:

Client certificates are powerful security tools, but it is very easy to have client certificates stolen from you. All an attacker needs is physical access to any of your client machines. A compromised client certificate would mean, that an attacker can successfully connect to the KVM-over-IP box, defeating the first and most powerful wall of defense. All that stops him then is a rather not-so-ultimately-strong 8 character VNC password. While the VNC password might be enough to block out most attackers you should still not artificially weaken your client certificate after going through all the trouble of setting up 2-way PKI authentication! So CHOOSE AN EXTREMELY SECURE PASSWORD for the client certificate! Note that you can export the client certificate multiple times with different passwords, so that no single client user can necessarily access the server via another client users machine. This enables you to bind a certain path of access to a specific person! With a strong client certificate, an attacker never even reaches a user name & password prompt. If the certificate cannot be decrypted and properly presented to the server by XViewer, the connection will be dropped before any prompt even appears! That's the power of SSLs 2-way PKI authentication!

For information on how to import the created certificates and keys into your KVM-over-IP box and into XViewer by using XImpcert, please refer to the additional documentation on: http://wp.xin.at/the-xviewer-project The most important document to continue would then be How to setup and use XViewer & Ximpcert.