-----BEGIN PGP SIGNED MESSAGE----- __________________________________________________________ The U.S. Department of Energy Computer Incident Advisory Capability ___ __ __ _ ___ / | /_\ / \___ __|__ / \ \___ __________________________________________________________ INFORMATION BULLETIN Solaris NIS+ Configuration Vulnerability May 21, 1996 19:00 GMT Number G-23 ______________________________________________________________________________ PROBLEM: A vulnerability exists in some configurations of NIS+ PLATFORM: Sun Solaris 2.5 servers, possibly earlier versions DAMAGE: Under some installations of NIS+, the permissions on the NIS+ passwd table are left in an unsecure state SOLUTION: Apply the appropriate workarounds described below ______________________________________________________________________________ VULNERABILITY Any user with login access to a client that uses NIS+ for ASSESSMENT: authentication may gain root privileges ______________________________________________________________________________ [Begin AUSCERT Bulletin] 1. Description NIS+ provides distributed network access to information sources such as password, group and host information. It maintains this information in the form of NIS+ tables. NIS+ tables contain the administrative information normally supplied by local files (such as /etc/passwd). As with the standard Unix administration files, setting secure permissions on the NIS+ tables is of utmost importance in maintaining system security. NIS+ provides a comprehensive set of access rights for NIS+ tables. This includes permissions not only on NIS+ tables but also individual columns and entries in those tables. Due to the added complexity, sites need to be particularly diligent in ensuring that permissions on NIS+ tables (and associated entries and columns) are secure. AUSCERT encourages sites running NIS+ to gain a good understanding of the permission model used by NIS+. A complete description may be found in the NIS+ documentation set. The rest of this advisory assumes a good understanding of NIS+ permission controls. AUSCERT has received information that under some installations of NIS+ the permissions on the NIS+ passwd table are left in an unsecure state. This vulnerability is known to exist in NIS+ installations initially created on Solaris 2.5 servers. Similar vulnerabilities in NIS+ configurations may also exist in previous versions of Solaris 2. 2. Impact Any user with login access to a client or server that uses NIS+ for authentication may gain root privileges. 3. Workarounds NIS+ uses an access control mechanism for granting access to NIS+ tables which is similar (but not identical) to that used by the standard Unix file system. NIS+ tables are assigned permissions for the NIS+ user categories nobody, owner, group and world. NIS+ also has permissions associated with columns and individual entries in NIS+ tables. Under some installations of NIS+ the permissions of the NIS+ passwd table and its columns are left in an unsecure state. These permissions can be viewed using niscat(1). To check the permissions on the NIS+ passwd table, sites can use: # niscat -o passwd.org_dir This should produce output similar to: Object Name : passwd Owner : myhost.mydomain.org. Group : admin.mydomain.org. Domain : org_dir.mydomain.org. Access Rights : ----rmcdrmcd---- Time to Live : 12:0:0 Object Type : TABLE Table Type : passwd_tbl Number of Columns : 8 Character Separator : : Search Path : Columns : [0] Name : name Attributes : (SEARCHABLE, TEXTUAL DATA, CASE SENSITIVE) Access Rights : r--------------- [1] Name : passwd Attributes : (TEXTUAL DATA) Access Rights : -----m---------- [2] Name : uid Attributes : (SEARCHABLE, TEXTUAL DATA, CASE SENSITIVE) Access Rights : r--------------- [3] Name : gid Attributes : (TEXTUAL DATA) Access Rights : r--------------- [4] Name : gcos Attributes : (TEXTUAL DATA) Access Rights : r--------------- [5] Name : home Attributes : (TEXTUAL DATA) Access Rights : r--------------- [6] Name : shell Attributes : (TEXTUAL DATA) Access Rights : r--------------- [7] Name : shadow Attributes : (TEXTUAL DATA) Access Rights : ---------------- This output shows two types of access rights associated with the NIS+ passwd table. First, the default access rights for the table, which are given at the start of the output (----rmcdrmcd----). Second, the access rights associated with each column. In particular, sites should check the access rights on the columns of the NIS+ passwd table. It should be noted that it appears that individual entries of the passwd table are owned by individual users. The above access rights do not allow a user to modify any part of their passwd table entry besides their own passwd field. For many environments this is acceptable. For sites who wish users to be able to change their shells or gcos information those columns may have the (m)odify bit set for owner. Other than this, the access rights on columns should appear as above. Any additional access rights on the table or its columns besides those shown above may allow a user to gain additional privileges, including possibly root. Sites should completely understand the ramifications if they allow additional access rights. Sites may set the access rights on the NIS+ passwd table, as shown in the above output, by issuing the following commands as root on the master NIS+ server. To set the default access rights for the NIS+ passwd table: # nischmod na-rmcd,og+rmcd passwd.org_dir To set the column access rights on the NIS+ passwd table: # nistbladm -u name=na-rmcd,n=r passwd.org_dir # nistbladm -u passwd=na-rmcd,o=m passwd.org_dir # nistbladm -u uid=na-rmcd,n=r passwd.org_dir # nistbladm -u gid=na-rmcd,n=r passwd.org_dir # nistbladm -u gcos=na-rmcd,n=r passwd.org_dir # nistbladm -u home=na-rmcd,n=r passwd.org_dir # nistbladm -u shell=na-rmcd,n=r passwd.org_dir # nistbladm -u shadow=na-rmcd passwd.org_dir After making any changes in access rights, AUSCERT recommends that sites verify the changes they have made using niscat(1), as shown previously. Sites that have replica NIS+ servers may use nisping(1m) to propagate the changes to the replica servers in a timely manner. 4. Additional measures AUSCERT recommends that sites take this opportunity to ensure that all NIS+ tables have access rights in accordance with the local site security policy. This also includes checking access rights on all the columns and entries of the NIS+ tables in addition to the default access rights of the tables themselves. - ----------------------------------------------------------------------------- AUSCERT wishes to thank Ivan Angus and David Clarke of ANU for reporting this vulnerability and for their advice in the preparation of this advisory. AUSCERT also acknowledges Marek Krawus of UQ, Reinhard Uebel and Mark McPherson of QTAC for their assistance. - ----------------------------------------------------------------------------- [End AUSCERT Bulletin] _______________________________________________________________________________ CIAC wishes to acknowledge the contributions of AUSCERT, ANU, UQ, and QTAC for the information contained in this bulletin. _______________________________________________________________________________ CIAC, the Computer Incident Advisory Capability, is the computer security incident response team for the U.S. Department of Energy (DOE) and the emergency backup response team for the National Institutes of Health (NIH). CIAC is located at the Lawrence Livermore National Laboratory in Livermore, California. CIAC is also a founding member of FIRST, the Forum of Incident Response and Security Teams, a global organization established to foster cooperation and coordination among computer security teams worldwide. CIAC services are available to DOE, DOE contractors, and the NIH. CIAC can be contacted at: Voice: +1 510-422-8193 FAX: +1 510-423-8002 STU-III: +1 510-423-2604 E-mail: ciac@llnl.gov For emergencies and off-hour assistance, DOE, DOE contractor sites, and the NIH may contact CIAC 24-hours a day. During off hours (5PM - 8AM PST), call the CIAC voice number 510-422-8193 and leave a message, or call 800-759-7243 (800-SKY-PAGE) to send a Sky Page. CIAC has two Sky Page PIN numbers, the primary PIN number, 8550070, is for the CIAC duty person, and the secondary PIN number, 8550074 is for the CIAC Project Leader. Previous CIAC notices, anti-virus software, and other information are available from the CIAC Computer Security Archive. World Wide Web: http://ciac.llnl.gov/ Anonymous FTP: ciac.llnl.gov (128.115.19.53) Modem access: +1 (510) 423-4753 (28.8K baud) +1 (510) 423-3331 (28.8K baud) CIAC has several self-subscribing mailing lists for electronic publications: 1. CIAC-BULLETIN for Advisories, highest priority - time critical information and Bulletins, important computer security information; 2. CIAC-NOTES for Notes, a collection of computer security articles; 3. SPI-ANNOUNCE for official news about Security Profile Inspector (SPI) software updates, new features, distribution and availability; 4. SPI-NOTES, for discussion of problems and solutions regarding the use of SPI products. Our mailing lists are managed by a public domain software package called ListProcessor, which ignores E-mail header subject lines. To subscribe (add yourself) to one of our mailing lists, send the following request as the E-mail message body, substituting CIAC-BULLETIN, CIAC-NOTES, SPI-ANNOUNCE or SPI-NOTES for list-name and valid information for LastName FirstName and PhoneNumber when sending E-mail to ciac-listproc@llnl.gov: subscribe list-name LastName, FirstName PhoneNumber e.g., subscribe ciac-notes OHara, Scarlett W. 404-555-1212 x36 You will receive an acknowledgment containing address, initial PIN, and information on how to change either of them, cancel your subscription, or get help. PLEASE NOTE: Many users outside of the DOE, ESnet, and NIH computing communities receive CIAC bulletins. If you are not part of these communities, please contact your agency's response team to report incidents. Your agency's team will coordinate with CIAC. The Forum of Incident Response and Security Teams (FIRST) is a world-wide organization. A list of FIRST member organizations and their constituencies can be obtained by sending email to docserver@first.org with an empty subject line and a message body containing the line: send first-contacts. This document was prepared as an account of work sponsored by an agency of the United States Government. Neither the United States Government nor the University of California nor any of their employees, makes any warranty, express or implied, or assumes any legal liability or responsibility for the accuracy, completeness, or usefulness of any information, apparatus, product, or process disclosed, or represents that its use would not infringe privately owned rights. Reference herein to any specific commercial products, process, or service by trade name, trademark, manufacturer, or otherwise, does not necessarily constitute or imply its endorsement, recommendation or favoring by the United States Government or the University of California. The views and opinions of authors expressed herein do not necessarily state or reflect those of the United States Government or the University of California, and shall not be used for advertising or product endorsement purposes. LAST 10 CIAC BULLETINS ISSUED (Previous bulletins available from CIAC) G-13: Kerberos 4 Key Server Vulnerability G-14: Domain Name Service Vulnerabilites G-15: Sunsoft Demo CD Vulnerability G-16: SGI rpc.statd Program Security Vulnerabilities G-17: Vulnerabilities in Sample HTTPD CGIs G-18: Digital OSF/1 dxconsole Security Vulnerability G-19: IBM AIX rmail Vulnerability G-20: Vulnerability in NCSA and Apache httpd Servers G-21: Vulnerabilities in PCNFSD Program G-22: rpc.statd Vulnerability RECENT CIAC NOTES ISSUED (Previous Notes available from CIAC) Notes 07 - 3/29/95 A comprehensive review of SATAN Notes 08 - 4/4/95 A Courtney update Notes 09 - 4/24/95 More on the "Good Times" virus urban legend Notes 10 - 6/16/95 PKZ300B Trojan, Logdaemon/FreeBSD, vulnerability in S/Key, EBOLA Virus Hoax, and Caibua Virus Notes 11 - 7/31/95 Virus Update, Hats Off to Administrators, America On-Line Virus Scare, SPI 3.2.2 Released, The Die_Hard Virus Notes 12 - 9/12/95 Securely configuring Public Telnet Services, X Windows, beta release of Merlin, Microsoft Word Macro Viruses, Allegations of Inappropriate Data Collection in Win95 Notes 96-01 - 3/18/96 Java and JavaScript Vulnerabilities, FIRST Conference Announcement, Security and Web Search Engines, Microsoft Word Macro Virus Update -----BEGIN PGP SIGNATURE----- Version: 2.6.2 Comment: Processed by Mailcrypt 3.3, an Emacs/PGP interface iQCVAwUBMaIkvbnzJzdsy3QZAQHY/QP+KgRnWVVCJVE4R+Uf5q76LUuVQ3wkwMya RQWVlSpdYSSWe26LjIZ9RearoHnVDz1G8B/8T7Nj9wv7S6IRFhEHFzv8WhOXaCj3 Z6JfF484Nsowz94VOcYHVygU79ZTQ9MMvWN7wdb3DmwSkpcQ/GnzXZVZxoXJHubm DwFj20aujW4= =FnRD -----END PGP SIGNATURE-----