⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 deslogind.1

📁 一个使用des加密传输的unix下的login程序的服务器端和客户端
💻 1
字号:
.\" @(#) $RCSfile$ $Revision: 1.5 $ $Date: 94/06/14 11:59:48 $.TH DESLOGIND 1  14-Jun-94.ds )H David A. Barrett.ds ]W Rev. 1.1 Jun 1994.SH NAMEdeslogind \- daemon for deslogin.SH SYNOPSIS.B deslogind.B \[\-dnc\].B \[\-f.I userFile\].B \[\-l.I logFile\].B \[\-w.I name\].B \[\-p.I port\].br.in 15.B \[\-k.I cipherKey\].B \[\-i.I inactiveSecs\].B \[\-t.I loginSecs\].SH DESCRIPTION.PP.I Deslogind\^is the daemon for the .I deslogin(1)program, a secure DES authenticated and encrypted login service.This deamon may be run from inetd, or in a standalone fashion.  Wheninvoked, it posts a listen(2) on the specified port.  When a connection request arrives, it authenticates the remote user and starts up a new login session for the user.  All subsequent data transmitted between the session and the remote host is encrypted using the United States Data Encryption Standand in cipher-feedback mode using a unique key for each session.  Authentication is performed using a challenge-response protocol that does not transmit passwords over the network.  Pass phrases are used for authentication rather than the eight-character passwords of.I login(1).User names and passphrases are looked up in a file which has been DESencrypted by the .I cipher(1)program.  A gateway service to allow access through a firewall is also available (see .I deslogingw(1))..SS Options.PP.TP 12.BI \-f\ userFileSpecifies the encrypted file containing user passphrases(Default: /usr/local/etc/netlogind.users).Eachline of the file is an 8-character username, a tab, then a passphrasecontaining any number of 7-bit characters.Lines beginning with a pound "#" character are comments.Use the.I cipher(1)program to create the encrypted userFile from your plaintext.  Use the-d option with.I cipher to view the encrypted userFile.  Make sure to destroy theplaintext once you've verified the encrypted copy is decipherable..TP.BI \-k Specify a phrase used as the key for decrypting the userFile.If the.BI \-k option is not used, .I netlogindrequests one when it is invoked.  Don't use the .I -koption except for debugging and testing: the command line is visable to any user with the .I ps(1)command..TP.BI \-cDon't prompt for a userFile cipher key. Use the compiled default.Use this option when you must invoke .I deslogindwithout human intervention (say from inetd).  Don't use this optionif the executable file for .I deslogindis readable by sufficiently determined hostile users..TP.BI \-nThe userFile is plaintext.  Don't prompt for a userFile cipher key.You shouldn't put userFile where it's readable by hostile users..TP.B  \-denable debug output (can't be used by attacker to compromise keys)Use more -d's to get more output.  Debug levels greater than 1 preventany forking of the process which allows use of a debugger..TP.BI \-l\ logFileSpecifies a file for recording connection, login, and logout statistics.(Default: /usr/adm/netlogind.log).TP.BI \-i\ inactiveSecsAn integer specifying the number of seconds of inactivity before thesession is terminated (default: 20 minutes).  This is a security featureto reduce the probability that an unattended remote session can be exploitedby an intruder at the remote site..TP.BI \-t\ loginSecsAn integer specifying the number of seconds to wait for a response afterissuing the challenge (default: 60 seconds).  The remote user must beable to type the passphrase correctly within this time period includingnetwork delays..TP.BI \-w\ nameRun as a wrapper to login.  A single system-wide passphrase mustbe in userFile under the name argument givin with the -w option.  Successful authentication invokes the login program instead of a user shell..TP.BI \-p\ portAn integer specifying the TCP port number used to listen for requests.If none is given, /etc/services is consulted.  If the deslogin serviceisn't present, 3005 is used..SH WARNINGS.PPThe method used to encrypt the userFile could be better.  It's only appropriatefor machines which don't have "sufficiently determined" hostile local users.A sufficiently determined hostile user is one who can examine the run-time data segment of another user's deslogind process.They could then look for the internal data structure holding thebinary form of the hashed userFile cipher key.  Armed with the binary key, they could obtain and modify the source code for.I cipher to accept the binary data as input and use it to read and decrypt theuserFile.  Some protection is given by statically linking and stripping.I deslogindand by ensuring.I deslogindand the userFile are owned by root, and not readable (or writable) by other users.  .PPChanging the passphrase requires decrypting the userFile using the.I cipher(1)program, editing the cleartext in a secure local directory from a securelocal session, re-enciphering, and overwriting the entire plaintext file..SH AUTHENTICATION PROTOCOL.PP.I Desloginduses a "challenge-response" protocol to authenticate users.  Upon connection, the remote host sends a line containing the remote username, then another giving the login name for the local user..I Deslogindlooks up local user name in the userFileand retrieves the corresponding passphrase which is hashed to produce theuser's DES authentication key. An "unpredictable" 64-bit nonce is generated by using the user's authentication key with DES in ECB mode to encrypt the (LSB zero-padded) output of time(2) and getpid(2)..I Deslogindthen encrypts this nonce with the user DES key and sends it as the challenge to the remote machine.The remote.I desloginprompts the user for a passphrase which is hashed into a DES keyused to decipher the challenge and send back the 64-bit "response".  .I Deslogind compares the response with the nonce; if they're equal, authentication succeeds and a unique session key is generated by encrypting the challenge with the user's DES key.  The authentication keys are destroyed by both hosts, and the session key is then used to encrypt all other data transferred..SH NOTE.PP.I Desloginddoes not require root permission to be useful.Regular users may create their ownuserFiles, encrypt them with cipher, and give appropriate options to.I deslogindto allow remote login to their account from remote mechines traversinguntrusted networks.  This is especially useful when you will be awayfrom work and want to be able to access your machine in a safe mannerfrom another trusted site (your home, say).  When used in this manner,you cannot became any user other than the owner of .I deslogind..PPFor example, the user "martha" on the host "uunet" could do the following:.PP.RS$ cipher >$HOME/deslogind.users.brInput Key:.brVerify Key:.brmartha		My simple passPhrase.br$ deslogind -l ~/deslogind.log -f ~/userFile -p 2010.brUserFile cipher key: .br.RE.PPShe can now login from a remote machine by the command:.PP.RS.br$ deslogin martha@uunet:2010.brPass Phrase:.bruunet $.br.ne 7.SH ENVIRONMENT.PPThe following environment variables are set by.I deslogind:.TP 10.B  LOGNAMEThe authenticated local user name.TP.B  USERSame value as LOGNAME (for BSD users).TP.B  HOMEThe home directory as taken from /etc/passwd.TP.B  SHELLThe login shell as taken from /etc/passwd.TP.B  PATHWhere to look for executables.  Set to ":/bin:/usr/bin"..TP.B  TZThe timezone of the host where deslogind is running..TP.B  MAILThe location of the user's maildrop (HP-UX only).  Set to "/usr/mail/$LOGNAME". .TP.B  TERMThe terminal type.  Set to "network" so login scripts cantest for this value and reset it appropriately..TP.B  RHOSTNAMEThe name of the remote host which connected to .I deslogind.  This information is reliable only to the extent that the domain name system (DNS) and TCP are trustworthy.  Use with caution..PPUnlike rlogin,.I desloginddoes not pass any environment variables, such as TERM, from theremote host.  This is both a liability and a security feature.   How muchtrust should the local host place in information derived from the remotehost?  Passing enviroment variables can be dangerous and complex..SH MISSING FEATURES.PPA program to change passphrases, add, and delete users..PPA better security method for the userFile should be designed..SH ACKNOWLEDGEMENTS.PPComments and improvements will be greatly appreciated and should be directed to the author:.PPDavid A. Barrett (barrett@asgard.cs.Colorado.EDU).PPCopyright 1994 by David. A. Barrett..PPThis program is not to be distributed for profit or included in suchsoftware without written permission from the author.No permission is required for non-profit use..SH FILES.ta 4i/usr/local/etc/deslogind.users	default userFile.ta 4i/usr/adm/deslogind.log		default log file.ta 4i/etc/services			to determine TCP port.ta 4i/etc/nologin			disabled login message.ta 4i/etc/passwd			for user id, gid, home, shell.ta 4i/etc/group			for supplementary group id's.ta 4i/etc/utmp			active user sessions.ta 4i/etc/wtmp			log of user sessions.ta 4i/dev/tty			to get userFile cipherKey.ta 4i/dev/pty*			session controlling terminal.ta 4i/bin/login			program invoked by -w option.DT.SH SEE ALSOcipher(1),inetd(1m),rlogind(1),telnetd(1),deslogin(1),deslogingw(1),login(1)..\" index	\fIdeslogind\fR \- DES authenticated encrypted login daemon\s-2DESLOGIN\s+1(1)\s+1.\".\" toc	\s-2DESLOGIND\s+1(1)\s+1:\0\0\fIdeslogind\fR 	 deslogin daemon

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -