13128fa34SMatthew Dillon.\" Copyright (c) 1998, Matthew Dillon. Terms and conditions are those of 23128fa34SMatthew Dillon.\" the BSD Copyright as specified in the file "/usr/src/COPYRIGHT" in 33128fa34SMatthew Dillon.\" the source tree. 4f063d76aSMatthew Dillon.\" 57f3dea24SPeter Wemm.\" $FreeBSD$ 6f063d76aSMatthew Dillon.\" 7d93b26d6SMatthew Dillon.Dd September 18, 1999 8f063d76aSMatthew Dillon.Dt SECURITY 7 93d45e180SRuslan Ermilov.Os 10f063d76aSMatthew Dillon.Sh NAME 11f063d76aSMatthew Dillon.Nm security 12f063d76aSMatthew Dillon.Nd introduction to security under FreeBSD 13f063d76aSMatthew Dillon.Sh DESCRIPTION 14f063d76aSMatthew DillonSecurity is a function that begins and ends with the system administrator. 15f063d76aSMatthew DillonWhile all 16f063d76aSMatthew Dillon.Bx 17d93b26d6SMatthew Dillonmulti-user systems have some inherent security, the job of building and 18992e4638SRobert Watsonmaintaining additional security mechanisms to keep users 19568e4cbbSGuy Helmer.Sq honest 20568e4cbbSGuy Helmeris probably 216ac7e896SDavid E. O'Brienone of the single largest undertakings of the sysadmin. Machines are 22f063d76aSMatthew Dillononly as secure as you make them, and security concerns are ever competing 23568e4cbbSGuy Helmerwith the human necessity for convenience. 24568e4cbbSGuy Helmer.Ux 25568e4cbbSGuy Helmersystems, 266ac7e896SDavid E. O'Brienin general, are capable of running a huge number of simultaneous processes 27f063d76aSMatthew Dillonand many of these processes operate as servers - meaning that external entities 28f063d76aSMatthew Dilloncan connect and talk to them. As yesterday's mini-computers and mainframes 29f063d76aSMatthew Dillonbecome today's desktops, and as computers become networked and internetworked, 30f063d76aSMatthew Dillonsecurity becomes an ever bigger issue. 31f063d76aSMatthew Dillon.Pp 32d93b26d6SMatthew DillonSecurity is best implemented through a layered onion approach. In a nutshell, 33d93b26d6SMatthew Dillonwhat you want to do is to create as many layers of security as are convenient 34d93b26d6SMatthew Dillonand then carefully monitor the system for intrusions. You do not want to 357c86a74bSMike Pritchardoverbuild your security or you will interfere with the detection side, and 36d93b26d6SMatthew Dillondetection is one of the single most important aspects of any security 37d93b26d6SMatthew Dillonmechanism. For example, it makes little sense to set the 38d93b26d6SMatthew Dillon.Pa schg 39d93b26d6SMatthew Dillonflags 40c4d9468eSRuslan Ermilov(see 41c4d9468eSRuslan Ermilov.Xr chflags 1 ) 42d93b26d6SMatthew Dillonon every system binary because while this may temporarily protect the 43d93b26d6SMatthew Dillonbinaries, it prevents a hacker who has broken in from making an 44d93b26d6SMatthew Dilloneasily detectable change that may result in your security mechanisms not 45d93b26d6SMatthew Dillondetecting the hacker at all. 46d93b26d6SMatthew Dillon.Pp 47d93b26d6SMatthew DillonSystem security also pertains to dealing with various forms of attack, 48d93b26d6SMatthew Dillonincluding attacks that attempt to crash or otherwise make a system unusable 49d93b26d6SMatthew Dillonbut do not attempt to break root. Security concerns can be split up into 50d93b26d6SMatthew Dillonseveral categories: 51f063d76aSMatthew Dillon.Bl -enum -offset indent 52f063d76aSMatthew Dillon.It 53f063d76aSMatthew DillonDenial of service attacks 54f063d76aSMatthew Dillon.It 55f063d76aSMatthew DillonUser account compromises 56f063d76aSMatthew Dillon.It 576ac7e896SDavid E. O'BrienRoot compromise through accessible servers 58f063d76aSMatthew Dillon.It 596ac7e896SDavid E. O'BrienRoot compromise via user accounts 60d93b26d6SMatthew Dillon.It 61d93b26d6SMatthew DillonBackdoor creation 62f063d76aSMatthew Dillon.El 63f063d76aSMatthew Dillon.Pp 64f063d76aSMatthew DillonA denial of service attack is an action that deprives the machine of needed 65f063d76aSMatthew Dillonresources. Typically, D.O.S. attacks are brute-force mechanisms that attempt 66f063d76aSMatthew Dillonto crash or otherwise make a machine unusable by overwhelming its servers or 67f063d76aSMatthew Dillonnetwork stack. Some D.O.S. attacks try to take advantages of bugs in the 68f063d76aSMatthew Dillonnetworking stack to crash a machine with a single packet. The latter can 69f063d76aSMatthew Dillononly be fixed by applying a bug fix to the kernel. Attacks on servers can 70d93b26d6SMatthew Dillonoften be fixed by properly specifying options to limit the load the servers 71d93b26d6SMatthew Dillonincur on the system under adverse conditions. Brute-force network 72f063d76aSMatthew Dillonattacks are harder to deal with. A spoofed-packet attack, for example, is 737c86a74bSMike Pritchardnearly impossible to stop short of cutting your system off from the Internet. 747c86a74bSMike PritchardIt may not be able to take your machine down, but it can fill up Internet 75d93b26d6SMatthew Dillonpipe. 76f063d76aSMatthew Dillon.Pp 77074ad115SRuslan ErmilovA user account compromise is even more common than a D.O.S. attack. Many 786ac7e896SDavid E. O'Briensysadmins still run standard telnetd, rlogind, rshd, and ftpd servers on their 79f063d76aSMatthew Dillonmachines. These servers, by default, do not operate over encrypted 80f063d76aSMatthew Dillonconnections. The result is that if you have any moderate-sized user base, 81f063d76aSMatthew Dillonone or more of your users logging into your system from a remote location 82c4d9468eSRuslan Ermilov(which is the most common and convenient way to login to a system) 83568e4cbbSGuy Helmerwill 84f063d76aSMatthew Dillonhave his or her password sniffed. The attentive system admin will analyze 85d93b26d6SMatthew Dillonhis remote access logs looking for suspicious source addresses 86f063d76aSMatthew Dilloneven for successful logins. 87f063d76aSMatthew Dillon.Pp 88f063d76aSMatthew DillonOne must always assume that once an attacker has access to a user account, 89f063d76aSMatthew Dillonthe attacker can break root. However, the reality is that in a well secured 90f063d76aSMatthew Dillonand maintained system, access to a user account does not necessarily give the 91f063d76aSMatthew Dillonattacker access to root. The distinction is important because without access 92f063d76aSMatthew Dillonto root the attacker cannot generally hide his tracks and may, at best, be 93b94231daSDima Dorfmanable to do nothing more than mess with the user's files or crash the machine. 94d93b26d6SMatthew DillonUser account compromises are very common because users tend not to take the 957c86a74bSMike Pritchardprecautions that sysadmins take. 96f063d76aSMatthew Dillon.Pp 97d93b26d6SMatthew DillonSystem administrators must keep in mind that there are potentially many ways 98d93b26d6SMatthew Dillonto break root on a machine. The attacker may know the root password, 99d93b26d6SMatthew Dillonthe attacker 100f063d76aSMatthew Dillonmay find a bug in a root-run server and be able to break root over a network 101f063d76aSMatthew Dillonconnection to that server, or the attacker may know of a bug in an suid-root 102f063d76aSMatthew Dillonprogram that allows the attacker to break root once he has broken into a 103d93b26d6SMatthew Dillonuser's account. If an attacker has found a way to break root on a machine, 104f167d7fbSSheldon Hearnthe attacker may not have a need to install a backdoor. 105d93b26d6SMatthew DillonMany of the root holes found and closed to date involve a considerable amount 106d93b26d6SMatthew Dillonof work by the hacker to cleanup after himself, so most hackers do install 1077c86a74bSMike Pritchardbackdoors. This gives you a convenient way to detect the hacker. Making 108d93b26d6SMatthew Dillonit impossible for a hacker to install a backdoor may actually be detrimental 109d93b26d6SMatthew Dillonto your security because it will not close off the hole the hacker found to 110a910f192SDima Dorfmanbreak in the first place. 111f063d76aSMatthew Dillon.Pp 112d93b26d6SMatthew DillonSecurity remedies should always be implemented with a multi-layered 113568e4cbbSGuy Helmer.Sq onion peel 114f063d76aSMatthew Dillonapproach and can be categorized as follows: 115f063d76aSMatthew Dillon.Bl -enum -offset indent 116f063d76aSMatthew Dillon.It 117f063d76aSMatthew DillonSecuring root and staff accounts 118f063d76aSMatthew Dillon.It 119f063d76aSMatthew DillonSecuring root - root-run servers and suid/sgid binaries 120f063d76aSMatthew Dillon.It 121f063d76aSMatthew DillonSecuring user accounts 122f063d76aSMatthew Dillon.It 123f063d76aSMatthew DillonSecuring the password file 124f063d76aSMatthew Dillon.It 125f063d76aSMatthew DillonSecuring the kernel core, raw devices, and file systems 126f063d76aSMatthew Dillon.It 127d93b26d6SMatthew DillonQuick detection of inappropriate changes made to the system 128f063d76aSMatthew Dillon.It 129f063d76aSMatthew DillonParanoia 130f063d76aSMatthew Dillon.El 131f063d76aSMatthew Dillon.Sh SECURING THE ROOT ACCOUNT AND SECURING STAFF ACCOUNTS 132f063d76aSMatthew DillonDon't bother securing staff accounts if you haven't secured the root 133f063d76aSMatthew Dillonaccount. Most systems have a password assigned to the root account. The 134568e4cbbSGuy Helmerfirst thing you do is assume that the password is 135568e4cbbSGuy Helmer.Sq always 136d93b26d6SMatthew Dilloncompromised. This does not mean that you should remove the password. The 137d93b26d6SMatthew Dillonpassword is almost always necessary for console access to the machine. 138d93b26d6SMatthew DillonWhat it does mean is that you should not make it possible to use the password 139d93b26d6SMatthew Dillonoutside of the console or possibly even with a 140d93b26d6SMatthew Dillon.Xr su 1 141d93b26d6SMatthew Dilloncommand. 142d93b26d6SMatthew DillonFor example, make sure that your pty's are specified as being unsecure 143d93b26d6SMatthew Dillonin the 144568e4cbbSGuy Helmer.Sq Pa /etc/ttys 145d93b26d6SMatthew Dillonfile 146d93b26d6SMatthew Dillonso that direct root logins via telnet or rlogin are disallowed. If using 147d93b26d6SMatthew Dillonother login services such as sshd, make sure that direct root logins are 148d93b26d6SMatthew Dillondisabled there as well. Consider every access method - services such as 149d93b26d6SMatthew Dillonftp often fall through the cracks. Direct root logins should only be allowed 150d93b26d6SMatthew Dillonvia the system console. 151f063d76aSMatthew Dillon.Pp 1527626ae52SMatthew DillonOf course, as a sysadmin you have to be able to get to root, so we open up 153f063d76aSMatthew Dillona few holes. But we make sure these holes require additional password 154f063d76aSMatthew Dillonverification to operate. One way to make root accessible is to add appropriate 155568e4cbbSGuy Helmerstaff accounts to the wheel group 156c4d9468eSRuslan Ermilov(in 157c4d9468eSRuslan Ermilov.Pa /etc/group ) . 158568e4cbbSGuy HelmerThe staff members placed 159568e4cbbSGuy Helmerin the wheel group are allowed to 160568e4cbbSGuy Helmer.Sq su 161568e4cbbSGuy Helmerto root. You should never give staff 162d93b26d6SMatthew Dillonmembers native wheel access by putting them in the wheel group in their 163d93b26d6SMatthew Dillonpassword entry. Staff accounts should be placed in a 164568e4cbbSGuy Helmer.Sq staff 165d93b26d6SMatthew Dillongroup, and then added to the wheel group via the 166d93b26d6SMatthew Dillon.Sq Pa /etc/group 167d93b26d6SMatthew Dillonfile. Only those staff members who actually need to have root access 168d93b26d6SMatthew Dillonshould be placed in the wheel group. It is also possible, when using an 169d93b26d6SMatthew Dillonauthentication method such as kerberos, to use kerberos's 170d93b26d6SMatthew Dillon.Sq Pa .k5login 171d93b26d6SMatthew Dillonfile in the root account to allow a 172d93b26d6SMatthew Dillon.Xr ksu 1 173d93b26d6SMatthew Dillonto root without having to place anyone at all in the wheel group. This 174d93b26d6SMatthew Dillonmay be the better solution since the wheel mechanism still allows an 175d93b26d6SMatthew Dillonintruder to break root if the intruder has gotten hold of your password 176d93b26d6SMatthew Dillonfile and can break into a staff account. While having the wheel mechanism 177074ad115SRuslan Ermilovis better than having nothing at all, it isn't necessarily the safest 178d93b26d6SMatthew Dillonoption. 179f063d76aSMatthew Dillon.Pp 180f063d76aSMatthew DillonAn indirect way to secure the root account is to secure your staff accounts 181f063d76aSMatthew Dillonby using an alternative login access method and *'ing out the crypted password 1826ac7e896SDavid E. O'Brienfor the staff accounts. This way an intruder may be able to steal the password 183f063d76aSMatthew Dillonfile but will not be able to break into any staff accounts (or, indirectly, 184f063d76aSMatthew Dillonroot, even if root has a crypted password associated with it). Staff members 185f063d76aSMatthew Dillonget into their staff accounts through a secure login mechanism such as 186568e4cbbSGuy Helmer.Xr kerberos 1 187568e4cbbSGuy Helmeror 188568e4cbbSGuy Helmer.Xr ssh 1 189568e4cbbSGuy Helmerusing a private/public 190f063d76aSMatthew Dillonkey pair. When you use something like kerberos you generally must secure 191f063d76aSMatthew Dillonthe machines which run the kerberos servers and your desktop workstation. 192f063d76aSMatthew DillonWhen you use a public/private key pair with ssh, you must generally secure 193568e4cbbSGuy Helmerthe machine you are logging in FROM 194c4d9468eSRuslan Ermilov(typically your workstation), 195568e4cbbSGuy Helmerbut you can 196f063d76aSMatthew Dillonalso add an additional layer of protection to the key pair by password 197568e4cbbSGuy Helmerprotecting the keypair when you create it with 198568e4cbbSGuy Helmer.Xr ssh-keygen 1 . 199568e4cbbSGuy HelmerBeing able 2006ac7e896SDavid E. O'Briento *-out the passwords for staff accounts also guarantees that staff members 201f063d76aSMatthew Dilloncan only login through secure access methods that you have setup. You can 202f063d76aSMatthew Dillonthus force all staff members to use secure, encrypted connections for 2036ac7e896SDavid E. O'Brienall their sessions which closes an important hole used by many intruders: That 204f063d76aSMatthew Dillonof sniffing the network from an unrelated, less secure machine. 205f063d76aSMatthew Dillon.Pp 206f063d76aSMatthew DillonThe more indirect security mechanisms also assume that you are logging in 207f063d76aSMatthew Dillonfrom a more restrictive server to a less restrictive server. For example, 208f063d76aSMatthew Dillonif your main box is running all sorts of servers, your workstation shouldn't 209f063d76aSMatthew Dillonbe running any. In order for your workstation to be reasonably secure 210f063d76aSMatthew Dillonyou should run as few servers as possible, up to and including no servers 211f063d76aSMatthew Dillonat all, and you should run a password-protected screen blanker. 212f063d76aSMatthew DillonOf course, given physical access to 213f063d76aSMatthew Dillona workstation an attacker can break any sort of security you put on it. 214f063d76aSMatthew DillonThis is definitely a problem that you should consider but you should also 2156ac7e896SDavid E. O'Brienconsider the fact that the vast majority of break-ins occur remotely, over 2167626ae52SMatthew Dillona network, from people who do not have physical access to your workstation or 217f063d76aSMatthew Dillonservers. 218f063d76aSMatthew Dillon.Pp 219f063d76aSMatthew DillonUsing something like kerberos also gives you the ability to disable or 220f063d76aSMatthew Dillonchange the password for a staff account in one place and have it immediately 221f063d76aSMatthew Dilloneffect all the machine the staff member may have an account on. If a staff 222f063d76aSMatthew Dillonmember's account gets compromised, the ability to instantly change his 223f063d76aSMatthew Dillonpassword on all machines should not be underrated. With discrete passwords, 224f063d76aSMatthew Dillonchanging a password on N machines can be a mess. You can also impose 225f063d76aSMatthew Dillonre-passwording restrictions with kerberos: not only can a kerberos ticket 226f063d76aSMatthew Dillonbe made to timeout after a while, but the kerberos system can require that 227568e4cbbSGuy Helmerthe user choose a new password after a certain period of time 228c4d9468eSRuslan Ermilov(say, once a month). 229f063d76aSMatthew Dillon.Sh SECURING ROOT - ROOT-RUN SERVERS AND SUID/SGID BINARIES 2307626ae52SMatthew DillonThe prudent sysadmin only runs the servers he needs to, no more, no less. Be 231f063d76aSMatthew Dillonaware that third party servers are often the most bug-prone. For example, 232f063d76aSMatthew Dillonrunning an old version of imapd or popper is like giving a universal root 233f063d76aSMatthew Dillonticket out to the entire world. Never run a server that you have not checked 234f063d76aSMatthew Dillonout carefully. Many servers do not need to be run as root. For example, 235568e4cbbSGuy Helmerthe ntalk, comsat, and finger daemons can be run in special user 236568e4cbbSGuy Helmer.Sq sandboxes . 2376ac7e896SDavid E. O'BrienA sandbox isn't perfect unless you go to a large amount of trouble, but the 238f063d76aSMatthew Dillononion approach to security still stands: If someone is able to break in 239f063d76aSMatthew Dillonthrough a server running in a sandbox, they still have to break out of the 240f063d76aSMatthew Dillonsandbox. The more layers the attacker must break through, the lower the 241f063d76aSMatthew Dillonlikelihood of his success. Root holes have historically been found in 242f063d76aSMatthew Dillonvirtually every server ever run as root, including basic system servers. 243f063d76aSMatthew DillonIf you are running a machine through which people only login via sshd and 244f063d76aSMatthew Dillonnever login via telnetd or rshd or rlogind, then turn off those services! 245f063d76aSMatthew Dillon.Pp 246f6f8f44dSAlexey Zelkin.Fx 247568e4cbbSGuy Helmernow defaults to running ntalkd, comsat, and finger in a sandbox. 248f063d76aSMatthew DillonAnother program which may be a candidate for running in a sandbox is 249568e4cbbSGuy Helmer.Xr named 8 . 250568e4cbbSGuy HelmerThe default rc.conf includes the arguments necessary to run 251f063d76aSMatthew Dillonnamed in a sandbox in a commented-out form. Depending on whether you 252f063d76aSMatthew Dillonare installing a new system or upgrading an existing system, the special 253f063d76aSMatthew Dillonuser accounts used by these sandboxes may not be installed. The prudent 2547626ae52SMatthew Dillonsysadmin would research and implement sandboxes for servers whenever possible. 255f063d76aSMatthew Dillon.Pp 256f063d76aSMatthew DillonThere are a number of other servers that typically do not run in sandboxes: 257f063d76aSMatthew Dillonsendmail, popper, imapd, ftpd, and others. There are alternatives to 258f063d76aSMatthew Dillonsome of these, but installing them may require more work then you are willing 259568e4cbbSGuy Helmerto put 260c4d9468eSRuslan Ermilov(the convenience factor strikes again). 261568e4cbbSGuy HelmerYou may have to run these 2626ac7e896SDavid E. O'Brienservers as root and rely on other mechanisms to detect break-ins that might 263f063d76aSMatthew Dillonoccur through them. 264f063d76aSMatthew Dillon.Pp 265f063d76aSMatthew DillonThe other big potential root hole in a system are the suid-root and sgid 266f063d76aSMatthew Dillonbinaries installed on the system. Most of these binaries, such as rlogin, 267568e4cbbSGuy Helmerreside in 268568e4cbbSGuy Helmer.Pa /bin , 269568e4cbbSGuy Helmer.Pa /sbin , 270568e4cbbSGuy Helmer.Pa /usr/bin , 271568e4cbbSGuy Helmeror 272568e4cbbSGuy Helmer.Pa /usr/sbin . 273568e4cbbSGuy HelmerWhile nothing is 100% safe, 274f063d76aSMatthew Dillonthe system-default suid and sgid binaries can be considered reasonably safe. 2756ac7e896SDavid E. O'BrienStill, root holes are occasionally found in these binaries. A root hole 276568e4cbbSGuy Helmerwas found in Xlib in 1998 that made xterm 277c4d9468eSRuslan Ermilov(which is typically suid) 278568e4cbbSGuy Helmervulnerable. 279074ad115SRuslan ErmilovIt is better to be safe than sorry and the prudent sysadmin will restrict suid 280f063d76aSMatthew Dillonbinaries that only staff should run to a special group that only staff can 281568e4cbbSGuy Helmeraccess, and get rid of 282c4d9468eSRuslan Ermilov.Pq Li "chmod 000" 283568e4cbbSGuy Helmerany suid binaries that nobody uses. A 284f063d76aSMatthew Dillonserver with no display generally does not need an xterm binary. Sgid binaries 2856ac7e896SDavid E. O'Briencan be almost as dangerous. If an intruder can break an sgid-kmem binary the 286568e4cbbSGuy Helmerintruder might be able to read 287568e4cbbSGuy Helmer.Pa /dev/kmem 288568e4cbbSGuy Helmerand thus read the crypted password 289d93b26d6SMatthew Dillonfile, potentially compromising any passworded account. Alternatively an 290d93b26d6SMatthew Dillonintruder who breaks group kmem can monitor keystrokes sent through pty's, 291d93b26d6SMatthew Dillonincluding pty's used by users who login through secure methods. An intruder 292d93b26d6SMatthew Dillonthat breaks the tty group can write to almost any user's tty. If a user 293d93b26d6SMatthew Dillonis running a terminal 294d93b26d6SMatthew Dillonprogram or emulator with a keyboard-simulation feature, the intruder can 295d93b26d6SMatthew Dillonpotentially 296f063d76aSMatthew Dillongenerate a data stream that causes the user's terminal to echo a command, which 297f063d76aSMatthew Dillonis then run as that user. 298f063d76aSMatthew Dillon.Sh SECURING USER ACCOUNTS 299f063d76aSMatthew DillonUser accounts are usually the most difficult to secure. While you can impose 3006ac7e896SDavid E. O'BrienDraconian access restrictions on your staff and *-out their passwords, you 301f063d76aSMatthew Dillonmay not be able to do so with any general user accounts you might have. If 302f063d76aSMatthew Dillonyou do have sufficient control then you may win out and be able to secure the 303f063d76aSMatthew Dillonuser accounts properly. If not, you simply have to be more vigilant in your 304f063d76aSMatthew Dillonmonitoring of those accounts. Use of ssh and kerberos for user accounts is 305d93b26d6SMatthew Dillonmore problematic due to the extra administration and technical support 306d93b26d6SMatthew Dillonrequired, but still a very good solution compared to a crypted password 307d93b26d6SMatthew Dillonfile. 308f063d76aSMatthew Dillon.Sh SECURING THE PASSWORD FILE 309f063d76aSMatthew DillonThe only sure fire way is to *-out as many passwords as you can and 310f063d76aSMatthew Dillonuse ssh or kerberos for access to those accounts. Even though the 311568e4cbbSGuy Helmercrypted password file 312568e4cbbSGuy Helmer.Pq Pa /etc/spwd.db 313568e4cbbSGuy Helmercan only be read by root, it may 314568e4cbbSGuy Helmerbe possible for an intruder to obtain read access to that file even if the 315f063d76aSMatthew Dillonattacker cannot obtain root-write access. 316f063d76aSMatthew Dillon.Pp 317f063d76aSMatthew DillonYour security scripts should always check for and report changes to 318568e4cbbSGuy Helmerthe password file 319c4d9468eSRuslan Ermilov(see 320568e4cbbSGuy Helmer.Sq Checking file integrity 321c4d9468eSRuslan Ermilovbelow). 322f063d76aSMatthew Dillon.Sh SECURING THE KERNEL CORE, RAW DEVICES, AND FILE SYSTEMS 323f063d76aSMatthew DillonIf an attacker breaks root he can do just about anything, but there 324f063d76aSMatthew Dillonare certain conveniences. For example, most modern kernels have a 325568e4cbbSGuy Helmerpacket sniffing device driver built in. Under 326f6f8f44dSAlexey Zelkin.Fx 327568e4cbbSGuy Helmerit is called 328568e4cbbSGuy Helmerthe 329568e4cbbSGuy Helmer.Sq bpf 330568e4cbbSGuy Helmerdevice. An intruder will commonly attempt to run a packet sniffer 3316ac7e896SDavid E. O'Brienon a compromised machine. You do not need to give the intruder the 332f063d76aSMatthew Dilloncapability and most systems should not have the bpf device compiled in. 333f063d76aSMatthew Dillon.Pp 334568e4cbbSGuy HelmerBut even if you turn off the bpf device, 335568e4cbbSGuy Helmeryou still have 336568e4cbbSGuy Helmer.Pa /dev/mem 337568e4cbbSGuy Helmerand 338568e4cbbSGuy Helmer.Pa /dev/kmem 339568e4cbbSGuy Helmerto worry about. For that matter, 340d93b26d6SMatthew Dillonthe intruder can still write to raw disk devices. 341d93b26d6SMatthew DillonAlso, there is another kernel feature called the module loader, 342568e4cbbSGuy Helmer.Xr kldload 8 . 343568e4cbbSGuy HelmerAn enterprising intruder can use a KLD module to install 344568e4cbbSGuy Helmerhis own bpf device or other sniffing device on a running kernel. 345568e4cbbSGuy HelmerTo avoid these problems you have to run 346568e4cbbSGuy Helmerthe kernel at a higher secure level, at least securelevel 1. The securelevel 347f063d76aSMatthew Dilloncan be set with a sysctl on the kern.securelevel variable. Once you have 348f063d76aSMatthew Dillonset the securelevel to 1, write access to raw devices will be denied and 349568e4cbbSGuy Helmerspecial chflags flags, such as 350568e4cbbSGuy Helmer.Sq schg , 351568e4cbbSGuy Helmerwill be enforced. You must also ensure 352568e4cbbSGuy Helmerthat the 353568e4cbbSGuy Helmer.Sq schg 354568e4cbbSGuy Helmerflag is set on critical startup binaries, directories, and 355f063d76aSMatthew Dillonscript files - everything that gets run up to the point where the securelevel 356f063d76aSMatthew Dillonis set. This might be overdoing it, and upgrading the system is much more 357f063d76aSMatthew Dillondifficult when you operate at a higher secure level. You may compromise and 358f063d76aSMatthew Dillonrun the system at a higher secure level but not set the schg flag for every 359d93b26d6SMatthew Dillonsystem file and directory under the sun. Another possibility is to simply 360d93b26d6SMatthew Dillonmount / and /usr read-only. It should be noted that being too draconian in 361d93b26d6SMatthew Dillonwhat you attempt to protect may prevent the all-important detection of an 362d93b26d6SMatthew Dillonintrusion. 363f063d76aSMatthew Dillon.Sh CHECKING FILE INTEGRITY: BINARIES, CONFIG FILES, ETC 364f063d76aSMatthew DillonWhen it comes right down to it, you can only protect your core system 365f063d76aSMatthew Dillonconfiguration and control files so much before the convenience factor 366d93b26d6SMatthew Dillonrears its ugly head. For example, using chflags to set the schg bit 367d93b26d6SMatthew Dillonon most of the files in / and /usr is probably counterproductive because 368d93b26d6SMatthew Dillonwhile it may protect the files, it also closes a detection window. The 369d93b26d6SMatthew Dillonlast layer of your security onion is perhaps the most important - detection. 370d93b26d6SMatthew DillonThe rest of your security is pretty much useless (or, worse, presents you with 371d93b26d6SMatthew Dillona false sense of safety) if you cannot detect potential incursions. Half 372074ad115SRuslan Ermilovthe job of the onion is to slow down the attacker rather than stop him 373d93b26d6SMatthew Dillonin order to give the detection side of the equation a chance to catch him in 374d93b26d6SMatthew Dillonthe act. 375f063d76aSMatthew Dillon.Pp 376d93b26d6SMatthew DillonThe best way to detect an incursion is to look for modified, missing, or 377d93b26d6SMatthew Dillonunexpected files. The best 378d93b26d6SMatthew Dillonway to look for modified files is from another (often centralized) 379d93b26d6SMatthew Dillonlimited-access system. 380d93b26d6SMatthew DillonWriting your security scripts on the extra-secure limited-access system 381d93b26d6SMatthew Dillonmakes them mostly invisible to potential hackers, and this is important. 382d93b26d6SMatthew DillonIn order to take maximum advantage you generally have to give the 383d93b26d6SMatthew Dillonlimited-access box significant access to the other machines in the business, 384d93b26d6SMatthew Dillonusually either by doing a read-only NFS export of the other machines to the 385d93b26d6SMatthew Dillonlimited-access box, or by setting up ssh keypairs to allow the limit-access 386d93b26d6SMatthew Dillonbox to ssh to the other machines. Except for its network traffic, NFS is 387d93b26d6SMatthew Dillonthe least visible method - allowing you to monitor the file systems on each 388d93b26d6SMatthew Dillonclient box virtually undetected. If your 389d93b26d6SMatthew Dillonlimited-access server is connected to the client boxes through a switch, 390d93b26d6SMatthew Dillonthe NFS method is often the better choice. If your limited-access server 391d93b26d6SMatthew Dillonis connected to the client boxes through a hub or through several layers 392d93b26d6SMatthew Dillonof routing, the NFS method may be too insecure (network-wise) and using ssh 393d93b26d6SMatthew Dillonmay be the better choice even with the audit-trail tracks that ssh lays. 394d93b26d6SMatthew Dillon.Pp 395d93b26d6SMatthew DillonOnce you give a limit-access box at least read access to the client systems 396d93b26d6SMatthew Dillonit is supposed to monitor, you must write scripts to do the actual 397d93b26d6SMatthew Dillonmonitoring. Given an NFS mount, you can write scripts out of simple system 398d93b26d6SMatthew Dillonutilities such as 399d93b26d6SMatthew Dillon.Xr find 1 400d93b26d6SMatthew Dillonand 401d93b26d6SMatthew Dillon.Xr md5 1 402d93b26d6SMatthew DillonIt is best to physically md5 the client-box files boxes at least once a 403ad27d066SMatthew Dillonday, and to test control files such as those found in 404ad27d066SMatthew Dillon.Pa /etc 405ad27d066SMatthew Dillonand 406ad27d066SMatthew Dillon.Pa /usr/local/etc 407d93b26d6SMatthew Dilloneven more often. When mismatches are found relative to the base md5 408d93b26d6SMatthew Dilloninformation the limited-access machine knows is valid, it should scream at 409d93b26d6SMatthew Dillona sysadmin to go check it out. A good security script will also check for 410d93b26d6SMatthew Dilloninappropriate suid binaries and for new or deleted files on system partitions 411d93b26d6SMatthew Dillonsuch as 412d93b26d6SMatthew Dillon.Pa / 413568e4cbbSGuy Helmerand 414568e4cbbSGuy Helmer.Pa /usr 415f063d76aSMatthew Dillon.Pp 416074ad115SRuslan ErmilovWhen using ssh rather than NFS, writing the security script is much more 417d93b26d6SMatthew Dillondifficult. You essentially have to 418d93b26d6SMatthew Dillon.Pa scp 419d93b26d6SMatthew Dillonthe scripts to the client box in order to run them, making them visible, and 420d93b26d6SMatthew Dillonfor safety you also need to scp the binaries (such as find) that those scripts 421d93b26d6SMatthew Dillonuse. The ssh daemon on the client box may already be compromised. All in all, 422d93b26d6SMatthew Dillonusing ssh may be necessary when running over unsecure links, but it's also a 423d93b26d6SMatthew Dillonlot harder to deal with. 424f063d76aSMatthew Dillon.Pp 425f063d76aSMatthew DillonA good security script will also check for changes to user and staff members 426ad27d066SMatthew Dillonaccess configuration files: 427ad27d066SMatthew Dillon.Pa .rhosts , 428ad27d066SMatthew Dillon.Pa .shosts , 429ad27d066SMatthew Dillon.Pa .ssh/authorized_keys 430ad27d066SMatthew Dillonand so forth... files that might fall outside the purview of the MD5 check. 431f063d76aSMatthew Dillon.Pp 432d93b26d6SMatthew DillonIf you have a huge amount of user disk space it may take too long to run 433d93b26d6SMatthew Dillonthrough every file on those partitions. In this case, setting mount 434d93b26d6SMatthew Dillonflags to disallow suid binaries and devices on those partitions is a good 435d93b26d6SMatthew Dillonidea. The 436568e4cbbSGuy Helmer.Sq nodev 437d93b26d6SMatthew Dillonand 438d93b26d6SMatthew Dillon.Sq nosuid 439d93b26d6SMatthew Dillonoptions 440c4d9468eSRuslan Ermilov(see 441c4d9468eSRuslan Ermilov.Xr mount 8 ) 442d93b26d6SMatthew Dillonare what you want to look into. I would scan them anyway at least once a 443d93b26d6SMatthew Dillonweek, since the object of this layer is to detect a break-in whether or 444d93b26d6SMatthew Dillonnot the breakin is effective. 445f063d76aSMatthew Dillon.Pp 446568e4cbbSGuy HelmerProcess accounting 447c4d9468eSRuslan Ermilov(see 448c4d9468eSRuslan Ermilov.Xr accton 8 ) 449568e4cbbSGuy Helmeris a relatively low-overhead feature of 4506ac7e896SDavid E. O'Brienthe operating system which I recommend using as a post-break-in evaluation 4516ac7e896SDavid E. O'Brienmechanism. It is especially useful in tracking down how an intruder has 452d93b26d6SMatthew Dillonactually broken into a system, assuming the file is still intact after 4536ac7e896SDavid E. O'Brienthe break-in occurs. 454f063d76aSMatthew Dillon.Pp 455f063d76aSMatthew DillonFinally, security scripts should process the log files and the logs themselves 456d93b26d6SMatthew Dillonshould be generated in as secure a manner as possible - remote syslog can be 4576ac7e896SDavid E. O'Brienvery useful. An intruder tries to cover his tracks, and log files are critical 458d93b26d6SMatthew Dillonto the sysadmin trying to track down the time and method of the initial 459d93b26d6SMatthew Dillonbreak-in. One way to keep a permanent record of the log files is to run 460d93b26d6SMatthew Dillonthe system console to a serial port and collect the information on a 461d93b26d6SMatthew Dilloncontinuing basis through a secure machine monitoring the consoles. 462f063d76aSMatthew Dillon.Sh PARANOIA 4637626ae52SMatthew DillonA little paranoia never hurts. As a rule, a sysadmin can add any number 464f063d76aSMatthew Dillonof security features as long as they do not effect convenience, and 465f063d76aSMatthew Dilloncan add security features that do effect convenience with some added 466d93b26d6SMatthew Dillonthought. Even more importantly, a security administrator should mix it up 467d93b26d6SMatthew Dillona bit - if you use recommendations such as those given by this manual 468d93b26d6SMatthew Dillonpage verbatim, you give away your methodologies to the prospective 469d93b26d6SMatthew Dillonhacker who also has access to this manual page. 470f063d76aSMatthew Dillon.Sh SPECIAL SECTION ON D.O.S. ATTACKS 4716ac7e896SDavid E. O'BrienThis section covers Denial of Service attacks. A DOS attack is typically 472f063d76aSMatthew Dillona packet attack. While there isn't much you can do about modern spoofed 473f063d76aSMatthew Dillonpacket attacks that saturate your network, you can generally limit the damage 474f063d76aSMatthew Dillonby ensuring that the attacks cannot take down your servers. 475f063d76aSMatthew Dillon.Bl -enum -offset indent 476f063d76aSMatthew Dillon.It 477f063d76aSMatthew DillonLimiting server forks 478f063d76aSMatthew Dillon.It 479f063d76aSMatthew DillonLimiting springboard attacks (ICMP response attacks, ping broadcast, etc...) 480f063d76aSMatthew Dillon.It 481f063d76aSMatthew DillonKernel Route Cache 482f063d76aSMatthew Dillon.El 483f063d76aSMatthew Dillon.Pp 484f063d76aSMatthew DillonA common DOS attack is against a forking server that attempts to cause the 4856ac7e896SDavid E. O'Brienserver to eat processes, file descriptors, and memory until the machine 486568e4cbbSGuy Helmerdies. Inetd 487c4d9468eSRuslan Ermilov(see 488c4d9468eSRuslan Ermilov.Xr inetd 8 ) 489568e4cbbSGuy Helmerhas several options to limit this sort of attack. 490f063d76aSMatthew DillonIt should be noted that while it is possible to prevent a machine from going 491f063d76aSMatthew Dillondown it is not generally possible to prevent a service from being disrupted 492f063d76aSMatthew Dillonby the attack. Read the inetd manual page carefully and pay specific attention 493568e4cbbSGuy Helmerto the 494568e4cbbSGuy Helmer.Fl c , 495568e4cbbSGuy Helmer.Fl C , 496568e4cbbSGuy Helmerand 497568e4cbbSGuy Helmer.Fl R 498568e4cbbSGuy Helmeroptions. Note that spoofed-IP attacks will circumvent 499568e4cbbSGuy Helmerthe 500568e4cbbSGuy Helmer.Fl C 501568e4cbbSGuy Helmeroption to inetd, so typically a combination of options must be used. 502f063d76aSMatthew DillonSome standalone servers have self-fork-limitation parameters. 503f063d76aSMatthew Dillon.Pp 504568e4cbbSGuy HelmerSendmail has its 505568e4cbbSGuy Helmer.Fl OMaxDaemonChildren 506568e4cbbSGuy Helmeroption which tends to work much 507f6c24291SGuy Helmerbetter than trying to use sendmail's load limiting options due to the 508568e4cbbSGuy Helmerload lag. You should specify a 509568e4cbbSGuy Helmer.Cm MaxDaemonChildren 510568e4cbbSGuy Helmerparameter when you start 511f063d76aSMatthew Dillonsendmail high enough to handle your expected load but no so high that the 512f063d76aSMatthew Dilloncomputer cannot handle that number of sendmails without falling on its face. 513568e4cbbSGuy HelmerIt is also prudent to run sendmail in queued mode 514568e4cbbSGuy Helmer.Pq Fl ODeliveryMode=queued 515568e4cbbSGuy Helmerand to run the daemon 516568e4cbbSGuy Helmer.Pq Cm sendmail -bd 517568e4cbbSGuy Helmerseparate from the queue-runs 518568e4cbbSGuy Helmer.Pq Cm sendmail -q15m . 519568e4cbbSGuy HelmerIf you still want realtime delivery you can run the queue 520568e4cbbSGuy Helmerat a much lower interval, such as 521568e4cbbSGuy Helmer.Fl q1m , 522568e4cbbSGuy Helmerbut be sure to specify a reasonable 523568e4cbbSGuy Helmer.Cm MaxDaemonChildren 524568e4cbbSGuy Helmeroption for that sendmail to prevent cascade failures. 525f063d76aSMatthew Dillon.Pp 526f063d76aSMatthew DillonSyslogd can be attacked directly and it is strongly recommended that you use 527568e4cbbSGuy Helmerthe 528568e4cbbSGuy Helmer.Fl s 529568e4cbbSGuy Helmeroption whenever possible, and the 530568e4cbbSGuy Helmer.Fl a 531568e4cbbSGuy Helmeroption otherwise. 532f063d76aSMatthew Dillon.Pp 533f063d76aSMatthew DillonYou should also be fairly careful 534f063d76aSMatthew Dillonwith connect-back services such as tcpwrapper's reverse-identd, which can 535f063d76aSMatthew Dillonbe attacked directly. You generally do not want to use the reverse-ident 536f063d76aSMatthew Dillonfeature of tcpwrappers for this reason. 537f063d76aSMatthew Dillon.Pp 538f063d76aSMatthew DillonIt is a very good idea to protect internal services from external access 539f063d76aSMatthew Dillonby firewalling them off at your border routers. The idea here is to prevent 540f063d76aSMatthew Dillonsaturation attacks from outside your LAN, not so much to protect internal 54185752545SGuy Helmerservices from network-based root compromise. Always configure an exclusive 54257e4378bSRuslan Ermilovfirewall, i.e.\& 543568e4cbbSGuy Helmer.So 544568e4cbbSGuy Helmerfirewall everything *except* ports A, B, C, D, and M-Z 545568e4cbbSGuy Helmer.Sc . 546568e4cbbSGuy HelmerThis 547f063d76aSMatthew Dillonway you can firewall off all of your low ports except for certain specific 548568e4cbbSGuy Helmerservices such as named 549c4d9468eSRuslan Ermilov(if you are primary for a zone), 550568e4cbbSGuy Helmerntalkd, sendmail, 551f063d76aSMatthew Dillonand other internet-accessible services. 552f063d76aSMatthew DillonIf you try to configure the firewall the other 553f063d76aSMatthew Dillonway - as an inclusive or permissive firewall, there is a good chance that you 554568e4cbbSGuy Helmerwill forget to 555568e4cbbSGuy Helmer.Sq close 556568e4cbbSGuy Helmera couple of services or that you will add a new internal 557f063d76aSMatthew Dillonservice and forget to update the firewall. You can still open up the 558f063d76aSMatthew Dillonhigh-numbered port range on the firewall to allow permissive-like operation 559568e4cbbSGuy Helmerwithout compromising your low ports. Also take note that 560f6f8f44dSAlexey Zelkin.Fx 561568e4cbbSGuy Helmerallows you to 562f063d76aSMatthew Dilloncontrol the range of port numbers used for dynamic binding via the various 563568e4cbbSGuy Helmernet.inet.ip.portrange sysctl's 564c4d9468eSRuslan Ermilov.Pq Li "sysctl -a | fgrep portrange" , 565568e4cbbSGuy Helmerwhich can also 566f063d76aSMatthew Dillonease the complexity of your firewall's configuration. I usually use a normal 567f063d76aSMatthew Dillonfirst/last range of 4000 to 5000, and a hiport range of 49152 to 65535, then 568568e4cbbSGuy Helmerblock everything under 4000 off in my firewall 569c4d9468eSRuslan Ermilov(except for certain specific 570c4d9468eSRuslan Ermilovinternet-accessible ports, of course). 571f063d76aSMatthew Dillon.Pp 572f063d76aSMatthew DillonAnother common DOS attack is called a springboard attack - to attack a server 573f063d76aSMatthew Dillonin a manner that causes the server to generate responses which then overload 574f063d76aSMatthew Dillonthe server, the local network, or some other machine. The most common attack 575568e4cbbSGuy Helmerof this nature is the ICMP PING BROADCAST attack. The attacker spoofs ping 576f063d76aSMatthew Dillonpackets sent to your LAN's broadcast address with the source IP address set 577f063d76aSMatthew Dillonto the actual machine they wish to attack. If your border routers are not 578f063d76aSMatthew Dillonconfigured to stomp on ping's to broadcast addresses, your LAN winds up 579f063d76aSMatthew Dillongenerating sufficient responses to the spoofed source address to saturate the 580f063d76aSMatthew Dillonvictim, especially when the attacker uses the same trick on several dozen 581f063d76aSMatthew Dillonbroadcast addresses over several dozen different networks at once. Broadcast 582f063d76aSMatthew Dillonattacks of over a hundred and twenty megabits have been measured. A second 583f063d76aSMatthew Dilloncommon springboard attack is against the ICMP error reporting system. By 584f063d76aSMatthew Dillonconstructing packets that generate ICMP error responses, an attacker can 585f063d76aSMatthew Dillonsaturate a server's incoming network and cause the server to saturate its 586f063d76aSMatthew Dillonoutgoing network with ICMP responses. This type of attack can also crash the 587f063d76aSMatthew Dillonserver by running it out of mbuf's, especially if the server cannot drain the 588568e4cbbSGuy HelmerICMP responses it generates fast enough. The 589f6f8f44dSAlexey Zelkin.Fx 590568e4cbbSGuy Helmerkernel has a new kernel 591f063d76aSMatthew Dilloncompile option called ICMP_BANDLIM which limits the effectiveness of these 592f063d76aSMatthew Dillonsorts of attacks. The last major class of springboard attacks is related to 593f063d76aSMatthew Dilloncertain internal inetd services such as the udp echo service. An attacker 594f063d76aSMatthew Dillonsimply spoofs a UDP packet with the source address being server A's echo port, 595f063d76aSMatthew Dillonand the destination address being server B's echo port, where server A and B 596f063d76aSMatthew Dillonare both on your LAN. The two servers then bounce this one packet back and 597f063d76aSMatthew Dillonforth between each other. The attacker can overload both servers and their 598f063d76aSMatthew DillonLANs simply by injecting a few packets in this manner. Similar problems 5997626ae52SMatthew Dillonexist with the internal chargen port. A competent sysadmin will turn off all 600f063d76aSMatthew Dillonof these inetd-internal test services. 601f063d76aSMatthew Dillon.Pp 602f063d76aSMatthew DillonSpoofed packet attacks may also be used to overload the kernel route cache. 603f063d76aSMatthew DillonRefer to the net.inet.ip.rtexpire, rtminexpire, and rtmaxcache sysctl 604f063d76aSMatthew Dillonparameters. A spoofed packet attack that uses a random source IP will cause 605f063d76aSMatthew Dillonthe kernel to generate a temporary cached route in the route table, viewable 606568e4cbbSGuy Helmerwith 607568e4cbbSGuy Helmer.Sq netstat -rna \&| fgrep W3 . 608568e4cbbSGuy HelmerThese routes typically timeout in 1600 609f063d76aSMatthew Dillonseconds or so. If the kernel detects that the cached route table has gotten 610f063d76aSMatthew Dillontoo big it will dynamically reduce the rtexpire but will never decrease it to 611074ad115SRuslan Ermilovless than rtminexpire. There are two problems: (1) The kernel does not react 612f063d76aSMatthew Dillonquickly enough when a lightly loaded server is suddenly attacked, and (2) The 613f063d76aSMatthew Dillonrtminexpire is not low enough for the kernel to survive a sustained attack. 614f063d76aSMatthew DillonIf your servers are connected to the internet via a T3 or better it may be 61585752545SGuy Helmerprudent to manually override both rtexpire and rtminexpire via 61685752545SGuy Helmer.Xr sysctl 8 . 617568e4cbbSGuy HelmerNever set either parameter to zero 618c4d9468eSRuslan Ermilov(unless you want to crash the machine :-)). 619f063d76aSMatthew DillonSetting both parameters to 2 seconds should be sufficient to protect the route 620f063d76aSMatthew Dillontable from attack. 621d93b26d6SMatthew Dillon.Sh ACCESS ISSUES WITH KERBEROS AND SSH 622d93b26d6SMatthew DillonThere are a few issues with both kerberos and ssh that need to be addressed 623d93b26d6SMatthew Dillonif you intend to use them. Kerberos V is an excellent authentication 624d93b26d6SMatthew Dillonprotocol but the kerberized telnet and rlogin suck rocks. There are bugs that 625d93b26d6SMatthew Dillonmake them unsuitable for dealing with binary streams. Also, by default 626d93b26d6SMatthew Dillonkerberos does not encrypt a session unless you use the 627d93b26d6SMatthew Dillon.Fl x 628d93b26d6SMatthew Dillonoption. Ssh encrypts everything by default. 629d93b26d6SMatthew Dillon.Pp 6309baaab27SDima DorfmanSsh works quite well in every respect except when it is set up to 6319baaab27SDima Dorfmanforward encryption keys. 6329baaab27SDima DorfmanWhat this means is that if you have a secure workstation holding 633d93b26d6SMatthew Dillonkeys that give you access to the rest of the system, and you ssh to an 634d93b26d6SMatthew Dillonunsecure machine, your keys becomes exposed. The actual keys themselves are 635d93b26d6SMatthew Dillonnot exposed, but ssh installs a forwarding port for the duration of your 636d93b26d6SMatthew Dillonlogin and if a hacker has broken root on the unsecure machine he can utilize 637d93b26d6SMatthew Dillonthat port to use your keys to gain access to any other machine that your 638d93b26d6SMatthew Dillonkeys unlock. 639d93b26d6SMatthew Dillon.Pp 640d93b26d6SMatthew DillonWe recommend that you use ssh in combination with kerberos whenever possible 641d93b26d6SMatthew Dillonfor staff logins. Ssh can be compiled with kerberos support. This reduces 642d93b26d6SMatthew Dillonyour reliance on potentially exposable ssh keys while at the same time 643d93b26d6SMatthew Dillonprotecting passwords via kerberos. Ssh keys 644d93b26d6SMatthew Dillonshould only be used for automated tasks from secure machines (something 645d93b26d6SMatthew Dillonthat kerberos is unsuited to). We also recommend that you either turn off 646d93b26d6SMatthew Dillonkey-forwarding in the ssh configuration, or that you make use of the 647d93b26d6SMatthew Dillon.Pa "from=IP/DOMAIN" 648d93b26d6SMatthew Dillonoption that ssh allows in its 649d93b26d6SMatthew Dillon.Pa authorized_keys 6507c86a74bSMike Pritchardfile to make the key only usable to entities logging in from specific 651d93b26d6SMatthew Dillonmachines. 652f063d76aSMatthew Dillon.Sh SEE ALSO 653f063d76aSMatthew Dillon.Xr chflags 1 , 654f063d76aSMatthew Dillon.Xr find 1 , 6556ac7e896SDavid E. O'Brien.Xr kerberos 1 , 656f063d76aSMatthew Dillon.Xr md5 1 , 657f6f8f44dSAlexey Zelkin.Xr netstat 1 , 6588596de53SNik Clayton.Xr openssl 1 , 6595521ff5aSRuslan Ermilov.Xr ssh 1 , 6606ac7e896SDavid E. O'Brien.Xr xdm 1 , 661d93b26d6SMatthew Dillon.Xr group 5 , 662ad27d066SMatthew Dillon.Xr ttys 5 , 6638596de53SNik Clayton.Xr accton 8 , 664d93b26d6SMatthew Dillon.Xr init 8 , 6658596de53SNik Clayton.Xr sshd 8 , 666ad27d066SMatthew Dillon.Xr sysctl 8 , 6678596de53SNik Clayton.Xr syslogd 8 , 668ad27d066SMatthew Dillon.Xr vipw 8 669f063d76aSMatthew Dillon.Sh HISTORY 670f063d76aSMatthew DillonThe 671f063d76aSMatthew Dillon.Nm 672568e4cbbSGuy Helmermanual page was originally written by 673568e4cbbSGuy Helmer.An Matthew Dillon 674568e4cbbSGuy Helmerand first appeared 675568e4cbbSGuy Helmerin 67685752545SGuy Helmer.Fx 3.1 , 677568e4cbbSGuy HelmerDecember 1998. 678