Secure Telnet
Total Page:16
File Type:pdf, Size:1020Kb
The following paper was originally published in the Proceedings of the Fifth USENIX UNIX Security Symposium Salt Lake City, Utah, June 1995. STEL: Secure TELnet David Vincenzetti, Stefano Taino, and Fabio Bolognesi Computer Emergency Resource Team Italy Department of Computer Science University of Milan, Italy For more information about USENIX Association contact: 1. Phone: 510 528-8649 2. FAX: 510 548-5738 3. Email: [email protected] 4. WWW URL: http://www.usenix.org STEL Secure TELnet David Vincenzetti Stefano Taino Fabio Bolognesi fvince k taino k b ologdsiunimiit CERTIT Computer Emergency Response Team ITaly Department of Computer Science University of Milan ITALY June Abstract Eavesdropping is b ecoming rampant on the Internet We as CERTIT have recorded a great numb er of sning attacks in the Italian community In fact sning is the most p opular hackers attack technique all over the Internet This pap er presents a secure telnet implementation whichhas b een designed by the Italian CERT to makeeavesdropping ineective to remote terminal sessions It is not to b e considered as a denitive solution but rather as a bandaid solution to deal with one of the most serious security threats of the moment Intro duction STEL stands for Secure TELnet We started developing STEL at the University of Milan when we realized that eavesdropping was a very serious problem and we did not like the freeware solutions that were available at that time It was ab out three years ago Still as far as we know e tapping problem and there are no really satisfying packages able to solve the line active and passiv to b e simple enough to use and to maintain by the average system administrator In fact in our honest opinion we b elieve that the actual securitypackages available on the Internet suer from at least one of the following drawbacks Not secure enough The SRA package is an example It is based on Suns Secure RPC and makes use of the Die Hellman key exchange algorithm to negotiate session keys However the mo dulus used with DH is to o small it is only bits and the session key is only used to encrypt users login and password The remainder of the session is left unencrypted To o large and complicated to install Ie Kerb eros Several version of kerb erized telnet exist But Kerb eros is large and you have you set up a whole Kerb eros environment in order to make use of kerb erized telnet The p oint is that Kerb eross paradigm is very dierent from STELs STEL in fact is intended as a plug and play solution You just need stel and steld in order to p erform p ointtopoint authenticated encryption To o complex to use and maintain STELs conguration system is very scalable STEL can p erform extensivechecks and supp ort dierent authentication metho ds But suchchecks are not mandatory and the basic installation is accomplished by just compiling the executables and running steld Unable to cop e with a distributed environment STEL is not a distributed system But is supp orts distributed SKey management so SKey keys can b e centralized in a single p ointandnetwork accessed in a secure fashion Sub ject to exp ort regulations so not suitable for users outside the USA STEL has b een develop ed in Italy Italy is not sub ject to crypto regulations and exp ort restric tions STEL uses encryption algorithms and functions that have b een develop ed or reinvented outside the United States It uses in fact a lib des package develop ed in Australia an imple mentation of the Swiss IDEA cipher an implementation of the Die Hellman key exchange system whichwas develop ed in Italy and a collection of some other minor crypto routines develop ed in Italy by the authors Description STEL is a simple package and it is intended to act as a secure surrogate replacement for telnetd rlogind rcmd or rshd However STEL is not compatible with standard telnet system STEL is able to provide secure communications b etween the client and the server and supp orts dierent authentication metho ds in order to b e as simple exible and convenient as p ossibile STEL has several advantages in resp ect to other systems It is very simple to install use and maintain There are very few conguration les and two executables only All data transmissions any kind are sent encrypted with a random session key There are three encryption algorithms available DES Triple DES and IDEA The metho d uses the Die Hellman algorithm to exchange session keys and the DH mo dulus is reasonably sized Since Die Hellman is vulnerable to Man In The Middle attacks the system has b een strenghtened with the Interlo ck proto col in order to makesuchanattack infeasible The metho d is able to provide mutual authentication The metho d is reasonably fast it adds ab out a couple of seconds to a connection on a Sparc station I I class machine Up on establishing a secure channel a variety of authentication metho ds are available standard Unix passwords SKey and SecurID Even standard Unix passwords b eing the communication channel encrypted provide a reason able level of security in resp ect to telnet and rlogin An optional SKey daemon is included in the package skeyd makes it p ossible to centralize SKey passwords in order to administer passwords in a single p oint It is p ossible to control logins bychecking IP address authentication typ e terminal name user name as describ ed in Optional automatic killing of IPOPTIONS A builtin SKey calculator is included in the escap e b menu As a feature SKey can makeuseofakeypad le to make dictionary attacks infeasible Sources are freely available Practical examples STEL is client server based The client is named stel and it is intended to b e directly run by users the server is named steld and can b e run as a standalone daemon by the sup eruser or b e invoked by inetd The purp ose of STEL is to provide the user a remote terminal session very similar to a telnet or rlogin remote terminal session The dierence is of course that all the trac b etween client and server is encrypted and that the resulting authentication is much stronger in resp ect to telnet or rlogin First let us have a lo ok at the usage stel dsiunimiit STEL Secure TELnet BETA bugs to stelauthorsideasec stelcv vince Exp vince Usage stel hostname l logname p portnum rimentvD commands hostname the system you want to connect to l logname the username on the remote system p portnumber set port number default port is r enter a random string to enhance randomness use triple DES encryption default is single DES i use IDEA encryption default is DES m use bits modulus default is bits e disable escape features b is enabled by default n do not use data encryptionatall t do not use pseudo terminals v be verbose D be extra verbose In the following example the user connects with STEL to ideasecdsiunimiit as ro ot The authen tication is p erformed using the SecurID system b eing ro ot a registered SecurID user on idea stel ideasecdsiunimiit l root Connected to ideasecdsiunimiit This session is using DES encryption for all data transmissions Escape character is b SECURID authentication required Enter PASSCODE for root Passcode accepted Welcome to idea idea hostname idea idea date Fri Feb MET idea exit Connection with ideasecdsiunimiit closed So the user has STEL connected to ideasecdsiunimiit and heshe has authenticated hisherself using SecurID All data transmission are DES optionally DES or IDEA encrypted with a session key that is generated with the DH algorithm When the user is authenticated heshe is provided with a very comprehensive set of environment variables that are inherited from the client and all the terminal settings are inherited from the clientaswell For instance since the DISPLAY LINES and COLUMNS environmentvariables are inherited in the remote session it is p ossible to remotely execute commands like stel bar xterm fn x bg black fg white stel foo l root vi etcrc stel somesite l joe ps aux tmpxx vi tmpxx In the following example the user verb osely connects to ghost as vince and sp ecies bincsh as the command to b e executed The authentication is p erformed using SKey stel ghost l vince v bincsh Connected to ghost on port DiffieHellman modulo is bits secret exponent is bits Exchanging keys with DH scheme can be a lengthy process D Shared encryptionkey CAAACEA This session is using DES encryption for all data transmissions Escape character is b SKEY authentication required skey cr Response DRUB BARB NOD RET COCO OUTS SunOS Release U GENERIC Wed Oct PDT ghost e hostname ghost ghost e exit Connection with ghost closed In the last example the user STEL connects to idea again and makes use of some features of the escap e menu In particular heshe takes advantage of the builtin SKey calculator to lo cally and thus safely generate the required SKey resp onse stel idea Connected to idea This session is using DES encryption for all data transmissions Escape character is b SKEY authentication required skey cr Response stel Commands may be abbreviated Commands are close close current connection skey generate skey response status display operating parameters escape set escape character shell escape z suspend telnet print help information stel stat Connected to idea Connection time Fri Feb Elapsed time hours minutes seconds User keystrokes Session output is bytes Escape character is b DES data encryption is on stel skey Reminder Do not use this while logged in via telnet or dialin Enter seed cr enter sequence number enter secret password use mjr DES