From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10d4db,ff591bdc7b7a903d,start X-Google-Attributes: gid10d4db,public From: "Alexander O. Yuriev" Subject: REPOST: Linux Security FAQ Update#3: rpc.ugidd Date: 1995/05/11 Message-ID: <3ost1u$hqt@freya.yggdrasil.com> X-Deja-AN: 102459107 original-date: 5 May 1995 17:33:57 +0300 followup-to: comp.os.linux.networking content-type: text/plain; charset=ISO-8859-1 organization: ? keywords: security, FAQ, rpc.ugidd, networking mime-version: 1.0 newsgroups: comp.os.linux.announce originator: wirzeniu@freya.yggdrasil.com NFS uid/gid Map Daemon LINUX SECURITY FAQ UPDATE April 6, 19:50 EST Copyright (C) 1995 Alexander O. Yuriev CIS Laboratories, TEMPLE UNIVERSITY This update is based on Olaf Kirch's post to linux-security ----------------------------------------------------------------------------- This is an update to Linux Security FAQ. The FAQ itself is not completely written yet and currently covers only Slackware Linux distribution. If you use a different Linux distribution and the location name of some files differ from the ones used in this update, please drop me a note at at . If you create your own Linux distributions that are being placed on FTP sites or CDs, please contact me! Linux FAQ WWW is http://bach.cis.temple.edu/linux/linux-security ----------------------------------------------------------------------------- rpc.ugidd DAEMON ALLOWS REMOTE SYSTEM TO "brute-force" NAMES OF ALL USERS AND ALL GROUPS. ******************************************************************** WARNING: THIS IS NOT A LINUX-SPECIFIC PROBLEM This Linux Security FAQ Update Provides Linux-Specific Solution ******************************************************************** Most of Linux distributions come with rpc.ugidd, the daemon that implements a protocol that allows a remote client to map UIDs and GIDs into user and group names. This protocol is not used by Universal NFS Server starting from version 2.0, though most of Linux distributions, including Slackware 2.2 come with this daemon. Neither Slackware 2.1.0 nor Slackware 2.2.0 enable this daemon by default, but /etc/rc.d/rc.inet2 contains commented out commands to start this daemon in the section of Sun RPC servers. The daemon itself is neither dangerous nor useful at the present time, but it provides a remote site with a simple way of gathering information about all users on your system simple by looping through the possible UIDs and GIDs. Some people claim that this is really hard to implement, but it looks really trivial to me: for (i = 0; i < 65535; i++) { gidtGID = (gid_t) i; uidtUID = (uid_t) i; vRPCgetTargetNames(gidtGID,uidT, pchLoginName, pchGroupName); } (Sorry, could not resist the temptation of typing a couple of C lines). The most important thing is that this code is so trivial that every 6th grader is capable to writing it! SOLUTION: The solution to this problem is simple: get the PID of the daemon by using the command: ps aux | grep ugidd and kill the running process: kill -9 Now find the file where rpc.ugidd is being started from. This file is usually /etc/rc.d/rc.inet2. Search for lines that start with rpc.ugidd and delete them. A lot of people feel that they should just comment it out, in case that something happens and they need to return back to the original version. Don't do that. If you have to have the original version of the file, restore it from a backup. Sometimes it happens that one forgets why did he or she comment out a program and removes the comment character. Bingo, the program now is running again. This is especially true in a case of systems with several administrators. SANITY CHECK: It is simple: shutdown your system to single user mode using /sbin/init s This will kill all running processes and take down network interfaces. Now bring the system back up by typing mount -a /sbin/init This brings the network interface up and runs /etc/rc.d/* programs. Some systems also require swap to be reactivated. Do ps aux | grep ugidd There should be no processes listed. If that is not the case then probably your system starts rpc.ugidd from another file and you will have to hunt it down. The good way to start is by typing grep ugidd /etc/rc.d/* This will go trough all files in the /etc/rc.d directory where most Linux systems keep startup strips and check for commands that start ugidd. As usually, just remove it from there. -- Send submissions for comp.os.linux.announce to: linux-announce@news.ornl.gov PLEASE remember Keywords: and a short description of the software.