| [ Home ] [ Kermit 95 ] [ C-kermit ] [ Scripts ] [ Current ] [ New ] [ FAQ ] [ Support ] |
[ Kermit Home ] [ C-Kermit ] [ Kermit 95 ]
1. INTRODUCTION
2. DISCLAIMERS
3. KERMIT SECURITY USER GUIDE
4. INSTALLATION AND CONFIGURATION
5. SCRIPTING AND AUTOMATION
I. WHERE TO FIND SECURE TELNET AND FTP SERVERS
II. MULTIHOMED HOSTS, FIREWALLS, NATS
III. INTRODUCTION TO CERTIFICATES
IV. USING OTHER SECURITY METHODS WITH KERMIT
GLOSSARY
REFERENCES
TRADEMARKS
CHAPTER CONTENTS
1.1. Secure Connections 1.2. Internet Protocols 1.3. Authentication 1.4. Encryption 1.5. IntegritySECURITY is the hot topic on the Internet. Security systems and protocols abound. But it was not always so. In the early days, the mere act of putting two computers in touch with each other was quite amazing. To connect multiple diverse computers to a common network, allowing any pair of them to communicate, was almost inconceivable. When the ARPANET (precursor of the Internet) was first operational on October 1, 1969, the eager task for many years afterwards was to open up more and more sites to it. The architecture of the network and its protocols were developed in research laboratories in an atmosphere of trust.
Only later, when the ARPANET became the world-wide Internet and was opened up to limitless numbers of people, did security become an issue: hackers, crackers, script kiddies, terrorists, spies, hucksters, swindlers, pornographers, saboteurs, blackmailers, pranksters, and pests of every sort inundate the network and every computer on it with a constant barrage of probes and attacks. It is increasingly necessary to secure connections from eavesdropping and malicious tampering (not to mention spam, worms, viruses, and denial-of-service attacks, but that's another story).
The network itself is not secure. By its very nature and
fundamental design, it is entirely open
Meanwhile, insecure connections remain the norm, in which passwords, credit-card information, private correspondence, and so on can be captured and/or altered in transit by malicious persons. Security remains elusive because we have a 30+ year history of open networks, clients, and servers, and because of the many competing security methods, the shifting definitions of each one, various legal entanglements, and the overall complexity of the entire topic.
Why should I care about security? The reasons are obvious: to prevent fraud on your person, theft of your money or identity, hijacking of your computer accounts, tampering with your research results; any number of malicious acts aimed at you or performed by someone masquerading as you. Perhaps an even more compelling reason to care is that more and more sites are requiring secure clients for access: plain old dialup or insecure Telnet or FTP simply can't be used any more.
Kermit software has offered secure connections since 1998. This document presents the security methods embodied in C-Kermit 8.0 and Kermit 95 2.0, which include:
What is a secure connection? A connection is secure if it provides:
A secure connection requires two applications, one on each end, that support (and can negotiate) a common security method; for example, a Telnet client on your desktop and a Telnet server at the remote site, both equipped with protocols such as Kerberos V.
Kermit software supports a variety of connection methods, including serial ports, modems, and TCP/IP. Presently, secure connections are supported only over TCP/IP connections. Since there are many security protocols to consider (Kerberos, SRP, TLS, ...) and several TCP/IP application protocols where they can be used (Telnet, SSH, FTP, HTTP, ...), and different platforms for the clients and servers (Unix, VMS, Windows, OS/2, ...), the possibilities are many.
To complicate matters, every Kermit program can come with or without security. Non-secure versions can be sent and used anywhere. Deployment of secure versions, however, is restricted USA export law. Secure versions can be built with any combination of the security methods listed above: Kerberos IV but not Kerberos V, SRP and SSL/TLS but not Kerberos, etc. Kermit 95 has either no security methods built in or else all of them. C-Kermit on Unix can have any combination, depending on the libraries available on each platform and which ones were selected by the builder.
Let's begin by looking at the Internet protocols that Kermit supports to see which security options are available for each:
Protocol Krb4 Krb5 SSL/TLS SRP SSH NTLM Telnet Yes Yes Yes Yes Yes K95 Rlogin Yes Yes No No No No SSL/TLS No Yes n/a No No No K5 User-User No Yes No No No No FTP Yes Yes Yes Yes No No HTTP No No Yes No No No Kermit Yes Yes Yes Yes No1 K95 SSH No Yes No Yes n/a No
SECTION CONTENTS
1.3.1. Kerberos 1.3.2. SRP 1.3.3. NTLM 1.3.4. X.509 Certificates 1.3.5 Public Keys 1.3.6 Host based 1.3.7 Password based
AUTHENTICATION is the means by which one party proves its identity to to another. The most common authentication method is the familiar process of logging in with a username and password. When you do this on an insecure network connection, your identity and password are transmitted in clear text and can be "sniffed" by anybody who has access to any of the components of the network path; for example, by anybody who has a PC on a (non-switched) Ethernet network over which your information passes.
Furthermore, when you make (say) a Telnet connection to a network, you accept the fact that you must authenticate yourself to it, but how do you know that the host itself is genuine? In the normal course of events, there is no requirement that it authenticate itself to you.
Enter secure authentication. Any secure authentication scheme requires central management of identities, as in the Kerberos authentication system (Section 1.3.1), X.509 certificates (Appendix III), or Secure Remote Password (Section 1.3.2). This type of security is best suited for large organizations -- universities, government agencies, corporations, hospitals -- that have a full-time professional network / security administration staff. The learning curve and startup time are significant, but worth the effort. Any security method can be breached, so the true measure of its effectiveness is its manageability: can breaches be repaired, can compromised identities be reclaimed? It is for these reasons that Microsoft, Sun, Apple, HP, IBM, and many Linux or BSD vendors are increasingly distributing Kerberos 5 as a core part of their operating systems.
Unfortunately, the startup costs of a secure authentication system are sometimes so daunting that some organizations simply don't bother, and instead let users fend for themselves with unsigned public/private key pair schemes, such as SSH public key authentication (Section 1.3.5) and PGP. The only administrative tasks required up front are the installation and/or distribution of the required client and server software. This is not a secure authentication system; quite the opposite: it bypasses any secure authentication / authorization system that might be in place. And keys, once compromised, can not be revoked by those responsible for the security of the host: a serious consideration since so many security keys are stored on insecure disks (e.g. in Windows 9x/ME) ripe for picking.
Kerberos is a method, developed at Massachusetts Institute of Technology (MIT), by which two parties communicating over a TCP/IP connection can authenticate each other through a trusted, centrally managed third party without sending passwords across the network. The Kerberos protocols are defined in Internet RFCs 1510, 1964, and others. You can read more about Kerberos at the following websites:
There are, in fact, two Kerberos protocols: Kerberos IV (4) and Kerberos V (5), the latter being the more flexible and secure protocol. The two are totally separate and incompatible. Any given site might support neither, either one, or both. One of the unique benefits associated with the use of Kerberos 5 authentication is its Single Sign-On (SSO) capability. This allows a user to enter their password once on the local machine, establish a secure connection to a second machine and from there establish additional connections without requiring the user to enter their password a second time.
When both the client and server support the same version of Kerberos (4 or 5), Kerberos authentication with or without encryption can be negotiated. A "Kerberized" version of Kermit can make a connection to a non-Kerberized host, and a non-Kerberized host can accept a connection from a Kerberized version of Kermit, as long as neither side is configured to require Kerberos authentication.
Kerberos authentication has been integrated into Telnet, Rlogin, FTP, and SSL/TLS as well as many other protocols not supported by Kermit. As part of the authentication process a session key is shared by the client and server that can be used to encrypt the current session.
Stanford University's Secure Remote Password (SRP) protocol is a method by which two parties can mutually authenticate each other in a secure manner through a Zero Knowledge Identification system. SRP is defined in Internet RFC 2945. You can read more about SRP at the following website:
http://www-cs-students.stanford.edu/~tjw/srp/
SRP authentication has been integrated into the Telnet and FTP protocol definitions (if not yet into all Telnet and FTP clients and servers). As a result of the authentication, a shared secret is produced that can be used to encrypt the authenticated session.
Microsoft NT Lan Manager (NTLM) authentication is implemented in Kermit 95 only. Its only use is to authenticate Kermit 95 to Microsoft Windows based Telnet services distributed as part of Windows 2000, Windows XP Professional, and the NT Services for Unix products. Kermit 95 can also use NTLM to authenticate incoming Telnet sessions when it is running under Windows NT/2000/XP. When running under Windows 95/98/98SE/ME, Kermit 95 can only be an authenticating client.
NTLM does not negotiate a shared secret and cannot be used to establish encrypted sessions. Therefore, connections made with NTLM are not considered secure although it is definitely better to use NTLM authentication than it is to transmit a password in clear text. NTLM is a proprietary protocol considered to be a trade secret by Microsoft. When establishing connections with another Kermit 95 configured to accept incoming connections, Kermit 95 can negotiate NTLM over a SSL/TLS session. Security is then provided by SSL/TLS while authentication is performed with NTLM.
When SSL/TLS is used to provide security, authentication of the server and optionally the client can be performed using X.509 Public Key Certificates. Certificates are used to exchange a public key for use in establishing an encrypted connection and can be verified against a known trusted Root Certificate and a Certificate Revocation List (CRL) to indicate its authenticity and validity. The contents of the certificate can then be used to determine the identity of the remote service or the client.
C-Kermit and Kermit 95 provide mechanisms for the customization of the certificate to userid mapping.
Several distrbuted security protocols including SSH rely on a loosely managed form of authentication based on the same asymmetic cryptography used within X.509 Public Key Certificates. The technique is to generate a public and private key pair and give the public key away as a means of authenticating the holder of the private key. The prime difference between this and an X.509 certificate is that the public key is not bound to any information providing the identity of the holder nor does it contain any information that can be used to limit the lifetime of the public key or sources of information that can be used to determine if the public key has been compromised or revoked for some other reason.
Several application protocols such as Rlogin and SSH support some form of host-based authentication. In these protocols the identity of the host (not the user) is used to determine whether the connection is to be trusted. In Rlogin the host-based authenticator is the IP address or DNS host name, both of which are insecure indicators of identity. SSH uses the host-assigned Public Key pair as the host-based authenticator.
Host-based authentication is almost always used to allow system processes which are not associated with a specific user to establish connections. This is often done to allow the secure distribution of system configuration files to clusters of related systems.
Passwords, Passphrases, and so called Keyboard Interactive authentication methods are the old-fashioned traditional means of proving end-user identity. These methods are still in use with secure connections whether they be Telnet, FTP, or even SSH. They become safer to use when the connection is protected by some form of encrypting cipher suite. However, it should never be assumed that the transmission of a password to a host is safe. The host daemon process could have been replaced by one that collects and transmits passwords to an attacker. There have even been passive attacks that observe the timings of transmissions between the client and the host that have enabled the attacker to determine the password based upon the time it takes to type keys on a QWERTY keyboard.
Export of software incorporating strong encryption is regulated by United States law.
SECTION CONTENTS
1.4.1. Telnet 1.4.2. FTP 1.4.3. SSL/TLS 1.4.4. SSH 1.4.5. HTTP 1.4.6. Rlogin
ENCRYPTION is the process by which data is encoded to prevent anybody from deciphering it except those for whom it is intended. Encryption is an essential component of Internet security because of the Internet's open architecture; since (in principal) everybody can watch your sessions, you have to scramble them to keep them private.
A variety of encryption methods, or algorithms, exists ranging from easy to crack to next-to-impossible (but not truly impossible: if the data can be decrypted legitimately, it can also be decrypted illegitimately given adequate resources). Most modern encryption/decryption algorithms use keys as part of the process, either provided by the user or obtained automatically from a shared secret. For any given algorithm, the longer the key the more secure the encryption.
Each application protocol such as Telnet, FTP and HTTP defines its own set of protocols for encrypting a session based on the authentication method.
The following encryption algorithms can be negotiated for a Telnet session with the Telnet Encryption Option (RFC 2946) when used with Kerberos IV, Kerberos V, or Secure Remote Password authentication:
When the Telnet START_TLS option is negotiated, SSL/TLS provides encryption services for the Telnet session.
Encryption for FTP sessions depends on the authentication method:
Netscape's Secure Sockets Layer (SSL) and its IETF-approved successor, Transport Layer Security (TLS), provide for authentication and encryption of TCP/IP communications using a combination of public key and symmetric cryptographic algorithms. TLS is defined in Internet RFC 2246. Traditional authentication of the server (and optionally the client) is performed by exchanging ITU-T X.509 certificate chains (see Appendix 3), that are verified by the receiver. Unlike raw public keys, X.509 certificates may be revoked by issuing a certificate revocation list (CRL) that is to be checked by the receiver during verification of the certificate chain.
Kerberos 5 credentials can be used as an alternative method for performing mutual authentication within SSL/TLS sessions (RFC 2712).
The encryption provided by SSL/TLS is more secure than the encryption negotiatied by the Telnet Encryption Option. This additional security is provided by a combination of the use of longer encryption keys, the availability of stronger symmetric cryptographic algorithms, and the signing of each transmitted block with a message-digest algorithm.
A sample list of cipher suites from OpenSSL 0.9.7 as shipped with Kermit 95 includes:
ADH-AES256-SHA DHE-RSA-AES256-SHA DHE-DSS-AES256-SHA AES256-SHA ADH-AES128-SHA DHE-RSA-AES128-SHA DHE-DSS-AES128-SHA AES128-SHA DHE-DSS-RC4-SHA EXP1024-DHE-DSS-RC4-SHA EXP1024-RC4-SHA EXP1024-DHE-DSS-DES-CBC-SHA EXP1024-DES-CBC-SHA EXP1024-RC2-CBC-MD5 EXP1024-RC4-MD5 KRB5-DES-CBC3-MD5 KRB5-DES-CBC3-SHA KRB5-DES-CBC-MD5 KRB5-DES-CBC-SHA EXP-KRB5-DES-CBC-MD5 EXP-KRB5-DES-CBC-SHA EDH-RSA-DES-CBC3-SHA EDH-RSA-DES-CBC-SHA EXP-EDH-RSA-DES-CBC-SHA EDH-DSS-DES-CBC3-SHA EDH-DSS-DES-CBC-SHA EXP-EDH-DSS-DES-CBC-SHA DES-CBC3-SHA DES-CBC-SHA EXP-DES-CBC-SHA IDEA-CBC-SHA EXP-RC2-CBC-MD5 RC4-SHA RC4-MD5 EXP-RC4-MD5 ADH-DES-CBC3-SHA ADH-DES-CBC-SHA EXP-ADH-DES-CBC-SHA ADH-RC4-MD5 EXP-ADH-RC4-MD5 RC4-64-MD5 DES-CBC3-MD5 DES-CBC-MD5 IDEA-CBC-MD5 RC2-CBC-MD5 EXP-RC2-CBC-MD5 RC4-MD5 EXP-RC4-MD5
TLS can be used with Telnet Authentication methods such as Kerberos, Secure Remote Password, and NTLM to provide the highest level of data privacy with the strongest forms of mutual authentication when TLS in-band authentication is not performed.
There are two different versions of the SSH protocol: version 1 and version 2. The cryptographic strengths of the protocols are very different. Whenever possible SSH version 2 should be used.
SSH version 1 implements an encryption scheme that may be open to advanced theoretical attacks. The encryption algorithms supported for this protocol by Kermit include DES, BLOWFISH, and 3DES.
SSH version 2 implements the most advanced techniques known to the cryptographic community. Of all the security protocols in use on the Internet, SSH version 2 is the youngest and therefore has had the most flexibility in implementing changes as new cryptographic attacks have been discovered. The SSH version 2 ciphers supported by Kermit include 3DES, AES, BLOWFISH, RC4, and CAST-128.
Secure HTTP connections use SSL/TLS for encryption.
Secure Login connections are established by using a modified version of the Rlogin protocol which replaces host-based authentication with a Kerberos 4 or Kerberos 5 authentication handshake. This authentication results in the sharing of a session key for use in encrypting the transmitted data. Kerberos 4 is limited to the exchange of DES keys whereas Kerberos 5 can exchange keys for 3DES, RC4, and DES.
The statements made with regard to US export law reflect our understanding of the situation at this writing, which might change subsequently. We expect to update this document, and our website in general, in light of any new developments.
Current US law forbids export of strong encryption software in binary form from the USA to all countries except Canada without a license or license exception. Thus the Kermit Project does not distribute pre-compiled secure versions of C-Kermit on the Internet.
Security within Kermit is provided using the underlying services of third-party libraries, such as Kerberos or OpenSSL. These libraries are not necessarily included with Kermit (they are with the secure version of Kermit 95, but not with C-Kermit). If not, they must be obtained separately from the sources listed below, in compliance with the terms and conditions given at those sites and with United States and international law. For an overview of this issue, see (for example):
http://www.mozilla.org/crypto-faq.html
Kermit software, when combined with the security libraries listed in this document, has been verified to negotiate and conduct authenticated and encrypted sessions with Kerberos, SRP, and/or SSL/TLS services on Internet hosts at Columbia University and other test sites, with Kermit features such as interactive terminal access, file transfer, and scripting operating successfully over secure connections, with any exceptions noted below.
The Kermit Project does not and can not claim or warrant the external Kerberos, SRP, OpenSSL or other third-party modules to be free of loopholes or bugs. Authentication via Kerberos, SRP, or X.509 certificates is not unbreakable. Any encryption method can be broken. Any software that is used for authentication or encryption should be analyzed for weaknesses, backdoors, bugs, and loopholes by the site and/or end user before use.
The Kermit Project and Columbia University make no claim or warranty as to any particular level of security achievable by Kermit software with any third party security protocol, and may on no account be held liable for any damage resulting from its use (a more complete statement to this effect is found in the C-Kermit 8.0 license).
Functional limitations:
[ Kermit Home ] [ C-Kermit ] [ Kermit 95 ]
CHAPTER CONTENTS
3.1. Overview of Security Protocols 3.2. Security Command List 3.3. Making Secure Connections 3.4. Using Secure ConnectionsSuppose you work at a company (or are a student or faculty member at a university, or otherwised engaged in an organization of some sort) that has secure services of the kind you can access with Kermit, such as terminal sessions, file transfer, or website management. Before you can access the services securely, you have to "tell" Kermit which authentication method to use, along with any site-specific parameters, and you might also want to say what should happen if the desired type of security can't be negotiated.
Bear in mind that you can use only those security methods that are offered with the services you will be connecting to. You can't just pick any old security method and expect it to work: it takes two to tango.
Kermit has all the commands you need to set up secure connections, and they are the topic of this rather lengthy chapter. But don't worry: in most cases, you'll have to deal with these commands only once, and possibly not at all:
3.1.1. Kerberos 3.1.2. SRP 3.1.3. NTLM 3.1.4. SSL/TLS 3.1.5. SSH
When making a Kerberized connection, you must first know which Kerberos version, 4 or 5, is supported by the host or service you want to connect to, and you must be registered in the Kerberos database at the host's site. If you're unsure about any of this, contact your site administrator.
Before authentication to a specific service (such as Telnet) can succeed, you must login to the site's Kerberos Ticket Granting Server. Depending on the Kerberos implementation and installation options this might be done automatically when you log in to your operating system. Otherwise you can do it with external utilities from MIT (such as Leash, KRB5, or kinit), or with Kermit's built-in functionality, explained in this chapter.
Once a Ticket Granting Ticket (TGT) is acquired, Kermit can use it to request additional tickets for each host (service) you wish to connect to. These service tickets can be used to authenticate you with the host automatically during a specified time interval, after which the tickets expire. When authentication is successful, you are logged in to the host without having to supply a user ID or password.
Besides providing credentials for use during authentication, the service ticket also contains a session key to be used for encrypting the session. After the connection is authenticated, Kermit (if the necessary encryption capabilities are available) attempts to negotiate bidirectional encryption. If encryption is negotiated, it is used in one or both directions, depending on what the server agrees to.
When Kerberos V authentication is used, Kermit supports credential forwarding by transferring your Ticket Granting Tickets to the host that you are connecting to, so you can make additional authenticated connections from that host to any others that accept those tickets. This provides a single sign-on capability to all the hosts and services within the Kerberos realm.
Kerberos 5 authentication is one of the few authentication methods that can be used to provide verification of anonymous TLS connections. This is taken advantage of in Telnet by negotiating AUTH KRB5 after establishing a private connection with the START_TLS option.
Successful operation of Kerberos requires that all machines have their dates and times synchronized. Be aware that PC clocks can drift, and this can cause authentication failures. Kerberos requires that all clocks be synchronized within 5 minutes.
SRP requires no special configuration of the client. When Kermit is used to connect to a host that supports SRP, the user name is transmitted automatically to the host and then a Password prompt is displayed in the Kermit command screen. This indicates that the password will not be sent to the host over the communication channel. Instead the password is used as part of a negotiation in which authentication is either mutual or none at all.
The result of a mutual authentication is a shared secret used to generate two different keys for encrypting the incoming and outgoing data.
SRP authentication is one of the few authentication methods that can be used to provide verification of anonymous TLS connections. The Kermit Telnet client takes advantage of this fact by by negotiating AUTH SRP after establishing a private connection with the START_TLS option.
Microsoft's native authentication method is called (Windows) NT LAN Manager, or NTLM. It is implemented in Windows 9x/ME and NT/2000/XP and requires no configuration on the part of the user. When K95 is used on any Microsoft Windows version, it can be used as an NTLM Telnet client to authenticate to Microsoft's NT Services for Unix Telnet Server or to a K95 configured to accept incoming connections.
When K95 is used on Windows NT/2000/XP it can be configured to accept incoming connections and authenticate NTLM Telnet clients.
NTLM is a weak form of authentication. It provides no shared secret and cannot be used as a means of securing a connection with encryption.
(Also see Appendix III for an introduction to the concept of certificates.)
Secure Sockets Layer Version 3 (SSLv3) and its successor Transport Layer Security Version 1 (TLSv1) (RFC 2246) were originally developed for Web browsing. They provide a framework for using public-key certificates or Kerberos 5 to negotiate server and (optionally) client authentication and bidirectional encryption. The encryption provided by SSLv3 and TLSv1 is stronger than that provided by the Telnet Encryption option.
SSLv3 and TLSv1 connections may be negotiated in two different ways. First, the connection may be SSL/TLS-only, which is used when connecting to HTTPS services or SSL/TLS tunnels. SSL/TLS can also be negotiatied after the connection is established via negotiations performed in some other protocol (such as Telnet START_TLS.) Kermit supports both methods:
In their most common use, SSL and TLS negotations provide the client with authentication of the host computer when the host's X.509 certificate is verified or when Kerberos 5 is used. The client can be authenticated with an X.509 certificate issued to the end user, or with Kerberos 5, or with one of the supported Telnet authentication methods. Even though the data channel is encrypted, the transmission of passwords to the host should still be avoided to prevent theft by a compromised host.
If certificates are to be verified, the root certificates of the certificate authorities (CAs) must be available. If you are not acting as your own CA you need a file containing the root certificates that were used to sign the certificates belonging to the servers you want to authenticate. A compilation of most of the commercial Certificate Authority root certificates as extracted from Microsoft Windows XP's certificate database is available at:
ftp://kermit.columbia.edu/kermit/c-kermit/ca_certs.pem
Once the file is downloaded, you can tell Kermit where it is with the following command (Section 3.2.2.3):
SET AUTH SSL VERIFY-FILE path/ca_certs.pem
When Kermit is acting as an Internet Kermit Service daemon (IKSD), client certificates can be used for automatic login. If a certificate-to-userid mapping function is provided, the IKSD logs the user in automatically if the certificate is verified and the specified userid exists. Kermit also supports the use of a ".tlslogin" file that allows a certificate to be used to login automatically to an account without a certificate-to-userid mapping function. When Kermit receives a username via the Telnet New-Environment variable after it has received and verified a client certificate, it looks in the home directory corresponding to the username for a file called ".tlslogin". If the file contains the certificate presented by the client, the client is logged in as the requested user without a password. See Appendix III for information on certificate to user mapping.
The method for negotiating Tim Hudson's Telnet AUTH SSL option is open to a "man-in-the-middle" attack which is capable of disabling the use of SSL before the negotiation is begun. It should be used only with:
SET TELNET AUTHENTICATION TYPE SSL SET TELOPT AUTHENTICATION REQUIRED
When using IKSD with START_TLS you should create an /etc/iksd.conf including Kermit commands that point to the certificate and key files:
set auth tls rsa-cert-file /usr/local/ssl/certs/telnetd-rsa.pem set auth tls rsa-key-file /usr/local/ssl/certs/telnetd-rsa-key.pem set auth tls dsa-cert-file /usr/local/ssl/certs/telnetd-dsa.pem set auth tls dsa-key-file /usr/local/ssl/certs/telnetd-dsa-key.pem
as well as the list of acceptable ciphers:
set auth tls cipher 3DES:DSS
If your server certificate was signed by an intermediary certificate authority instead of a root, you must provide the full chain of intermediary certificates for the client to be able to authenticate your server. These certificates can be specified with:
set auth tls rsa-cert-chain-file /usr/local/ssl/certs/telnetd-rsa-chain.pem set auth tls dsa-cert-chain-file /usr/local/ssl/certs/telnetd-dsa-chain.pem
The SSL and TLS handshake can be very time-consuming, and therefore Kermit can cache your your SSL/TLS sessions. When Kermit is used with a peer that supports cached sessions, subsequent connections to the same host can be securely established in a fraction of the time necessary for the initial connection. This is especially important for FTP and HTTP, which can make many connections to the same host during during a typical session.
For a list of Telnet servers that support START_TLS see Section I.1 of Appendix I. For a list of FTP servers that support AUTH SSL and AUTH TLS see Section I.2.
This section applies only to Kermit 95.
SSH provides security (or the illusion of it) by encrypting the session. SSH can work in the absence of authentication, but it also offers several options for authentication, none of them particularly secure except for Kerberos 5 GSSAPI and SRP.
In its simplest form, SSH lets the user make encrypted connections without setting up any kind of keys or other special authentication procedures or files, and all the host administrator has to do is install the ssh server and generate host keys. No alteration of the host login system is required. This is why SSH is so popular compared to authentication methods that are more secure and manageable: it's easy to get started. However, this kind of SSH connection does not authenticate the host to the client and it authenticates the client to the host only through the password file, just like an ordinary insecure login. The only difference is that the session (including the password) is encrypted, which makes hackers do a little extra work to decode their sniffer logs and get your password. The assumption is that hackers won't bother to do this since unencrypted passwords are easier to steal (like cars without steering-wheel locks), but of course this is wishful thinking.
The most important command to know about before you try to make an SSH connection is SET SSH STRICT-HOST-KEY-CHECK. The values are ON, OFF, and ASK.
There are two known-hosts files for each protocol version. A user file is stored in the \v(appdata)ssh directory and is automatically updated based upon the connections you make. The system-wide known-host file is (optionally) stored in the \v(common)ssh directory for the operating system and is never updated by Kermit 95. It is there to be maintained by the system administrator.
Your global known-hosts files are kept in a directory common to all users:
SSH v1: \v(common)ssh\known_hosts SSH v2: \v(common)ssh\known_hosts2
and your user-specific (and K95-specific) known-hosts files are:
SSH v1: \v(appdata)ssh\known_hosts SSH v2: \v(appdata)ssh\known_hosts2
(\v(appdata) is Kermit's User Application Data Directory variable. The user's application data directory is located in a system dependent manner. Windows 95/98/98SE/ME/NT store the application data with the user's profile. Windows 2000/XP store the application data in the Documents and Settings directory. Tell K95 to "show var appdata" to see its definition.) Thus, on Windows XP these files are in the SSH subdirectory of your Windows APPDATA directory, e.g.:
SSH v1: c:\Documents and Settings\username\Application Data\Kermit 95\ssh\known_hosts SSH v2: c:\Documents and Settings\username\Application Data\Kermit 95\ssh\known_hosts2
On Windows 98 with multi-user support, this would be:
SSH v1: c:\WINDOWS\Profiles\username\Application Data\Kermit 95\ssh\known_hosts SSH v2: c:\WINDOWS\Profiles\username\Application Data\Kermit 95\ssh\known_hosts2
On Windows 98 without multi-user support, this would be:
SSH v1: c:\WINDOWS\Application Data\Kermit 95\ssh\known_hosts SSH v2: c:\WINDOWS\Application Data\Kermit 95\ssh\known_hosts2
(\v(common) is Kermit's Common Data Directory variable. The common data directory is located in a system dependent manner. Windows 95/98/98SE/ME/NT store the common application data in the WINDOWS directory. Windows 2000/XP stores the application data in the Documents and Settings\All Users directory. Tell K95 to "show var common" to see its definition.)
Each file contains a series of (long) "lines", one per host, each line containing the hostname and aliases and then the key in Base 64; this is the host's public key. Adding a host key means appending such a line to the appropriate file.
SSH STRICT-HOST-KEY-CHECK ON gives you some assurrance that the host you have connected to is the one you meant to connect to. But it also means your first connection to a particular host is likely to be refused. It's the classic chicken-and-egg situation. You're supposed to get host keys from a trusted source such as a disk or CDROM from your host administrators, but if you didn't, how do you get a key when it's on the very host you can't connect to because you don't have its key? The possibilities include:
SET SSH STRICT-HOST-KEY-CHECK OFF (or ASK)
and then make an SSH connection to the host, authenticate with your password, and then the host key is automatically retrieved and added to your known-hosts file, and then future connections to that host can be made with SSH STRICT-HOST-KEY-CHECK ON. But of course since you have bypassed the host authentication process to obtain the key, future authentication using this key is worthless and you might as well not have have bothered.
You might wonder if keeping host keys is a good idea. The advantage is the protection they offer against man-in-the-middle attacks and DNS spoofing (but not compromised hosts). The disadvantage is that anybody who can access your host keys (legitimately or not) knows which hosts you access, which in itself might be information you'd rather not reveal, but also tells hackers which hosts to attack in your name. As noted, Kermit 95 (like all other SSH clients) appends new host keys to your user host-key file(s). You can delete these files if you wish; for example, in your K95 ON_EXIT macro definition.
The default method of client authentication (that is, the method that is used unless you have configured K95 to use any of the other methods described below) is by prompting you locally for a password and then sending it (encrypted) to the server. This method requires you to type your password every time you log in (unlike, say, Kerberos 5, which gives you a "single network login").
If you must use SSH to contact a particular host, we recommend simple password authentication. If this is OK with you, skip the rest of this section; otherwise keep reading.
You can also use public/private key pairs, whose purpose is to allow you to log in to the host without typing your password. THIS IS DANGEROUS because your keys are stored on your Windows disk, where they can be stolen (especially easy on Windows 9x/ME PCs that are attached to the network, yet lack any form of file-system security). If your key files are encrypted, they can be decrypted offline. (The longer the passphrase for key-file encryption, the longer it takes to perform dictionary attacks against it; a 40-character character passphrase should be considered a minimum but most people don't use such a long passphrase, so most key files are ripe for plucking.)
To use public/private key pairs you must have each host's public key in your PC's \v(APPDATA)\ssh\known_hosts (SSH v1) and/or \v(APPDATA)\ssh\known_hosts2 files (SSH v2), and you must also upload your own public key to each host and put it in the appropriate place, such as ~/.ssh/authorized_keys (SSH v1) and/or ~/.ssh/authorized_keys2 (SSH v2) when OpenSSH is the daemon. When all the right files and keys are in the right places in the appropriate formats, you can log in without a password. In order to determine the correct type of key to use you must know the configuration of the SSH daemon. If you are not the host administrator, contact the appropriate administrator for assistance. (A common error is to leave the permissions on the ~/.ssh/ directory and the files it contains world or group accessible. SSH daemons refuse to use identity files that are accessible to anyone other than the account owner.
Here's an example. I have a guest ID on a Linux machine at a remote site. If I make an SSH connection to it (logging in with a password), K95's status line shows me the SSH server's level is 2.0. If I want to be able to connect without typing a password, then (1) my end is already done, since K95 added the host's public key to my known_hosts2 file the first time I made an SSH connection to it; but (2) I must add my PC's public key to my:
~/.ssh/authorized_keys2
file on the host. In this case there happened to be no such file. So all I had to do was upload my public key to the host as ~/.ssh/authorized_keys2. But which public key? I have three of them (see the SSH KEY CREATE command description below):
SSH V1 RSA key: identity.pub SSH V2 DSA key: id_dsa.pub SSH V2 RSA key: id_rsa.pub
Well, since the server uses SSH v2, I can ignore the identity.pub file, which is only for SSH v1. So I began by uploading my id_dsa.pub file to my ~/.ssh directory, renaming it to authorized_keys2, logging out, and making a new ssh connection to the same host. It let me in without password, so I guessed right the first time. Maybe the id_rsa.pub key would have worked too, who knows -- it probably depends on the server.
But now, of course, anybody who can obtain a copy of the id_dsa private key file from my Windows disk can log in to that host as me, without a password. And it's easy for them to locate the host because it's listed in my known_hosts2 file, along with all the other hosts I connect to with SSH v2. So what have I accomplished? I have pretty much left the keys to all my houses in the street, each key neatly labeled with the address of the house it unlocks.
So having satisfied myself that the key-exchange mechanism works as designed (by the SSH designers, not us), I deleted the authorized_keys2 file from the host and I deleted all the private keys from my Windows disk. Unlike Kerberos identities or X.509 certificates, compromised private keys can't be revoked or even tracked down. And unlike encrypted password authentication, which must be captured in its brief moment of transit, your key files are always available to hackers, and for that matter, to a potentially infinite number of them at once.
Note, by the way, that some SSH hosts do not support public/private key pair authentication at all, so every combination you try will fail. There's no way to know this without the host administrator telling you, or by exhausting all the combinations.
Since public/private key-pair authentication is unsafe, K95 also supports two secure authentication methods for SSH v2 that do do not require public/private key pairs:
Of course, secure authentication for SSH clients requires modified SSH servers, which are available. GSSAPI does not require host keys at all since Kerberos authentication is mutual.
The complete list of K95's SSH v2 authentication methods is:
3.2.1. Connection Establishment 3.2.2. The SET AUTHENTICATION Command 3.2.3. The AUTHENTICATE Command 3.2.4. Other Security-Related Commands
The following notation is used in Kermit command syntax descriptions:
Some of Kermit's Kerberos-related commands are rather complex, but remember that you don't have to memorize them, or any other Kermit commands. Use "?" at any point to feel your way through the command, or type HELP for the desired command to see a brief explanation. If you would like to have a tutorial in Kermit basics before proceeding, please visit:
Before you try to make any secure connections, you should check whether your version of Kermit has the required capabilities. The SHOW FEATURES command lists the security methods that are and are not included. In addition the following commands can be used (typically in scripts) to check for specific security features:
check kerberos
if success {
Commands to execute if Kerberos is built in.
} else {
Commands to execute if Kerberos is not built in.
}
if available encryption set telnet encryption type cast128_cfb64
SUBSECTION CONTENTS
3.2.1.1. Secure Telnet Connections 3.2.1.2. SSH Connections 3.2.1.3. Secure FTP Connections 3.2.1.4. Secure HTTP Connections
The Telnet protocol is one of the most flexible protocols ever used on computer networks, and therefore can be somewhat complicated when its advanced options come into play. Kermit has commands to manage every aspect of the Telnet connection. Kermit's Telnet engine and related commands are thoroughly described in the Kermit Telnet Reference:
http://www.columbia.edu/kermit/telnet.html
(which you should read if you're not familiar with Kermit's Telnet client). This section focuses on Telnet-related commands for making secure connections.
Four Telnet Options can be negotiated between a Telnet client and server that affect secure connections: AUTH, ENCRYPT, START_TLS, and FORWARD_X. When people talk about Telnet not being secure they are referring to Telnet clients and servers that can't negotiate any of these four options (because they have not been coded to do so). That does not mean that secure Telnet clients (such as Kermit) and servers (Appendix I) are not readily available.
Telnet sessions always begin in an insecure state. Only after the initial negotiations are complete can the session be secured. Security in Telnet can be established using many combinations of Telnet Options and authentication and encryption methods.
The AUTH option negotiates whether authentication is to be used for the current session, and if so, which type of authentication. The authentication type is determined by the server offering an ordered list of types and the client choosing the most preferred type that it supports. Most forms of authentication generate a shared secret that can be used with the ENCRYPT option for privacy. The How and Encrypt flags specify an authentication mode and whether encryption is required for this connection. The AUTH option can be negotiated with either the START_TLS or the ENCRYPT option, but not both.
The following commands control Kermit's Telnet security negotiation policies and procedures:
NONE results in no authentication methods being offered to the Telnet server when the authentication option is negotiated. The preferred method of disabling authentication is with SET TELOPT /SERVER AUTHENTICATION REFUSE.
A list of one or more authentication methods specifies the order those methods are to be offered to the telnet client.
If you wish to allow NTLM authentication to be used with the Microsoft Windows 2000 or Services for Unix Telnet client you must specify a list with NTLM as the first item in the list. By default, NTLM is the last item in the list because it does not provide any form of data encryption.
The Telnet protocol ENCRYPT option is used to negotiate whether streaming ciphers are to be used to protect the privacy of the connection, and if so, which encryption type to use in each direction. The encryption type is determined by each side offering the list of types it can use to receive data. Then the sender chooses the first type that it supports from the list. The ENCRYPT option cannot be negotiated without the AUTH option. Whenever both START_TLS and ENCRYPT are both available, START_TLS is used since TLS provides both privacy and integrity to the data stream.
The START_TLS option negotiates whether the current session is to be protected by Transport Layer Security (TLS), the same protocol used to secure all of the HTTP Web sites on the Internet. TLS uses X.509 certificates or Kerberos 5 credentials to authenticate the server and optionally authenticate the client.
START_TLS can be used with AUTH to allow Kerberos, Secure Remote Password, or other authentication methods to be used to authenticate the client. START_TLS can not be used with the ENCRYPT option. Nor is there any need to since the protection provided by TLS is stronger than all of the streaming ciphers supported by the ENCRYPT option.
After the Telnet session is established and protected, it is possible to use it to protect the data associated with X Windows System clients started on the remote host via the Telnet session. The FORWARD_X option is used to negotiate and implement the protection of X Windows Systems data.
After a Telnet session is authenticated and protected it is possible to forward the credentials used to authenticate the session to the host. When credentials are forwarded to the host you do not need to enter your password when making additional connections from it. This is referred to as Single Sign-On. Credentials forwarding is currently only supported when the authentication method is Kerberos 5.
When establishing a secure connection there are potentially three usernames associated with the connection: the name of the user on the local machine; the name under which the user authenticates (the Kerberos principal name or X.509 certificate name); and the name the user wants to login as. The login name can be set with either of the following commands:
All forms of authentication rely on some secret information that only the user (or service) being authenticated knows or has in their possession. Before Kermit can authenticate as the user it must acquire this secret information. This is usually done by prompting the user for the necessary information at the time of authentication. But what if you need to automate the process? The SET LOGIN PASSWORD command can be used to specify the password to Kermit prior to establishing the connection. However, we strongly advise that this command be used in a script that prompts for the password and then establishes the automated connection later. Storing a password in a script file defeats all of the hard work you have done to secure your connections.
An NTLM user ID consists of both a DOMAIN and a username. This is set in Kermit as SET LOGIN USER DOMAIN\\username due to the use of backslash (\) as the command quote character in Kermit's command lanaguage.
If things go wrong when establishing a secure connection it is useful to be able to watch the telnet negotiations. Even when things go smoothly it can be fun to watch all of the action.
V1 RSA: \v(appdata)ssh/identity V2 RSA: \v(appdata)ssh/id_rsa V2 DSA: \v(appdata)ssh/id_dsa
Windows 95/98/98SE/ME: %windir%\ssh_known_hosts Windows NT/2000/XP: \v(common)ssh\ssh_known_hosts
\v(appdata)ssh/known_hosts
external-keyx gssapi hostbased publickey srp-gex-sha1 keyboard-interactive password none
aes128-cbc 3des-cbc blowfish-cbc cast128-cbc arcfour aes192-cbc aes256-cbc
Windows 95/98/98SE/ME: %windir%\ssh_known_hostss Windows NT/2000/XP: \v(common)ssh\ssh_known_hosts2
ssh-rsa ssh-dsa
hmac-md5 hmac-sha1 hmac-ripemd160 hmac-sha1-96 hmac-md5-96
\v(appdata)ssh/known_hosts2
C-Kermit 8.0 and Kermit 95 2.00 provide support for authenticated and encrypted file transfers using Kerberos 4, GSSAPI-Kerberos 5, Secure Remote Password (SRP), Secure Sockets Layer (SSL), and Transport Layer Security (TLS).
Complete details on how to use the FTP support can be found at the Kermit website. Here we explain how to make secure FTP connections (server willing) with the FTP OPEN command:
The following commands configure the use of FTP Security when establishing connections:
Reference: Kermit HTTP Client Documentation
C-Kermit 8.0 and Kermit 95 2.00 provide support for secure HTTP requests via the use of SSL or TLS. Secure connections are established automatically when the destination service name is "https" or the port number is 443. Alternatively, SSL or TLS may be utilized with arbitrary port numbers if you include the appropriate switch in the HTTP OPEN command:
The SET AUTHENTICATION command lets you configure Kermit's authentication methods and set defaults for the AUTHENTICATE command so you don't always have to include all the switches if you give more than one AUTHENTICATE command in a Kermit session.
If you always use the same setup, you can put the appropropriate SET AUTHENTICATION commands in your Kermit customization file: K95CUSTOM.INI (Windows) or ~/.mykermrc (UNIX).
SET AUTH K4 PRINCIPAL {}
SET AUTH K5 PRINCIPAL {}
in the Kermit initialization file or connection script.
SET AUTHENTICATION { KERBEROS4, KERBEROS5 } PRINCIPAL {}
has been issued.
Each item in the list may include a prefix modifier:
If no modifier is specified the entry is added to the list at the current position. "+" may also be used to combine tags to specify entries such as "RSA+RC4" describes all ciphers that use both RSA and RC4.
For example, all available ciphers not including ADH key exchange:
ALL:!ADH:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP
All algorithms including ADH and export but excluding patented or trade secreted algorithms:
HIGH:MEDIUM:LOW:EXPORT56:EXP:ADH:!RC4:!RC2:!IDEA
The OpenSSL command:
openssl ciphers -v list-of-ciphers
may be used to list all of the ciphers and the order described by a specific list-of-ciphers.
ln -s crl.pem `openssl crl -hash -noout -in crl.pem`.r0
Since all file systems do not have symlinks you can use the following command in Kermit to copy the crl.pem file to the hash file name:
copy crl.pem {\fcommand(openssl crl -hash -noout -in crl.pem).r0}
This produces a hash based on the issuer field in the CRL such that the issuer field of a Cert may be quickly mapped to the correct CRL.
In Kermit 95, the default directory is \v(exedir)crls
In Kermit 95, the default file is \v(exedir)ca_crls.pem
Note: When executing a script in the background or when it is running as an Internet Kermit Service Daemon, Kermit cannot support encrypted private keys. When attempting to load a private key that is encrypted, a prompt will be generated requesting the passphrase necessary to decrypt the keyfile. To automate access to the private key you must decrypt the encrypted keyfile and create an unencrypted keyfile for use by Kermit. This can be accomplished by using the following command and the passphrase:
openssl dsa -in encrypted-key-file -out unencrypted-key-file
Note: When executing a script in the background or when it is running as an Internet Kermit Service Daemon, Kermit cannot support encrypted private keys. When attempting to load a private key that is encrypted, a prompt will be generated requesting the passphrase necessary to decrypt the keyfile. To automate access to the private key you must decrypt the encrypted keyfile and create an unencrypted keyfile for use by Kermit. This can be accomplished by using the following command and the passphrase:
openssl rsa -in encrypted-key-file -out unencrypted-key-file
If an anonymous cipher (i.e., ADH) is desired the NO setting must be used; otherwise the receipt of the peer certificate request is interpreted as a protocol error and the negotiation fails.
If you wish to allow the peer to authenticate using either an X.509 certificate to userid mapping function or via use of a ~/.tlslogin file, you must use either PEER-CERT or FAIL-IF-NO-PEER-CERT. Otherwise, any certificates that are presented are ignored. In other words, use NO if you want to disable the ability to use certificates to authenticate a peer.
OpenSSL expects the hash symlinks to be made like this:
ln -s cert.pem `openssl x509 -hash -noout -in cert.pem`.0
Since all file systems do not have symlinks you can use the following command in Kermit to copy the cert.pem file to the hash file name:
copy cert.pem {\fcommand(openssl x509 -hash -noout -in cert.pem).0}
This produces a hash based on the subject field in the cert such that the certificate may be quickly found.
In Kermit 95, the default directory is \v(exedir)certs
In Kermit 95, the default file is \v(exedir)ca_certs.pem
The AUTHENTICATE command obtains or destroys Kerberos tickets and lists information about them. The general format is:
The AUTHENTICATE command's INITIALIZE option is the most complex of Kermit's security commands, and its format is different for Kerberos 4 and Kerberos 5:
The Kerberos 4 principal format is:
userid[.instance[.instance]]@[realm]
but can be omitted if it is the same as your username or SET LOGIN USERID value on the client system.
The Kerberos 5 principal format is:
userid[/instance][@realm]
and can be omitted if it is the same principal as stored in the current ticket cache at the time Kermit started; or the current username if a ticket cache did not exist.
Note: Kerberos 5 always attempts to retrieve a Ticket Granting Ticket (TGT) using the preauthenticated TGT request.
For mutual authentication to succeed, the client and the server must agree on the name to be used for the server. It is common for servers to have more than one name. This is especially true for clusters of servers that provide the same function and are referenced by an alias. For example, www.foo.com might be an alias for three machines www-1.foo.com, www-2.foo.com, and www-3.foo.com. If the hosts are configured to use separate credentials for authentication it would be necessary to know which host is actually in use since "www.foo.com" is not equal to "www-1.foo.com".
On the other hand, since DNS is not a secure service, using an additional lookup to verify the name associated with a particular IP address increases the susceptibility that the authentication may be forged by an attacker.
For the highest level of security, Reverse DNS Lookups should be turned OFF.
[ Kermit Home ] [ C-Kermit ] [ Kermit 95 ]
SECTION CONTENTS
3.3.1. The SET HOST Command 3.3.2. The TELNET Command 3.3.3. The SSH Command 3.3.4. The RLOGIN Command 3.3.5. Making Secure FTP Connections 3.3.6. Making Secure HTTP Connections 3.3.7. Using Only SSL or TLS 3.3.8. Using Kerberos 5 User-to-User Protocol
TCP/IP connections established by Kermit are initiated either with the SET HOST command; a protocol-specific command such as TELNET or RLOGIN; or in the case of FTP and HTTP an OPEN command.
When using the SET HOST command to establish a secure connection, several switches are available between SET HOST and the hostname, plus a protocol switch at the end:
The following SET HOST switches are useful with secure connections:
- /CONNECT
- Tells Kermit to enter CONNECT (terminal) mode automatically if the connection is successful.
- /SERVER
- Tells Kermit to enter server mode automatically if the connection is successful.
- /USERID:[name]
- This switch is equivale