home *** CD-ROM | disk | FTP | other *** search
/ For Beginners & Professional Hackers / cd.iso / hackers / exploits / linux / linux-mh < prev    next >
Encoding:
Text File  |  1997-02-23  |  2.0 KB  |  38 lines

  1.    There is a security hole in Red Hat 2.1, which installs /usr/bin/mh/inc
  2.  
  3. and /usr/bin/mh/msgchk suid root.  These programs are configured suid root
  4.  
  5. in order to bind to a privileged port for rpop authentication.  However,
  6.  
  7. there is a non-security conflict between mh and the default Red Hat 2.1
  8.  
  9. configuration in that the /etc/services lists pop-2 and pop-3 services, but
  10.  
  11. the mh utilities do lookups for a pop service, which doesn't exist, resulting
  12.  
  13. in an inability to use any of the pop functionality.  This may be a fortunate
  14.  
  15. bug, since there may be more serious security holes within the pop functions
  16.  
  17. of these two program.
  18.  
  19.    The security hole present in these two programs is that when opening
  20.  
  21. up the configuration files in the user's home directory, root privileges
  22.  
  23. are maintained, and symbolic links are followed.  This allows an arbitrary
  24.  
  25. file to to be opened.  Fortunately, the program does not simply dump the
  26.  
  27. contents of this file anywhere, and only certain formatting is allowed in
  28.  
  29. the file to be processed by the program in order to see any output.  In
  30.  
  31. the cases where it will be processed, only the first line of the file will
  32.  
  33. actually be output to the user.
  34.  
  35.  
  36.  
  37.                    Program: /usr/bin/mh/inc, /usr/bin/mh/msgchk
  38.  
  39. Affected Operating Systems: RedHat 2.1 linux distribution
  40.  
  41.               Requirements: account on system
  42.  
  43.                      Patch: chmod -s /usr/bin/mh/inc /usr/bin/mh/msgchk
  44.  
  45.        Security Compromise: read 1st line of some arbitrary files
  46.  
  47.                     Author: Dave M. (davem@cmu.edu)
  48.  
  49.                   Synopsis: inc & msgchk fail to check file permissions 
  50.  
  51.                             before opening user configuration files 
  52.  
  53.                             in the user's home directory, allowing a user
  54.  
  55.                             on the system to read the first line of any
  56.  
  57.                             file on the system with some limitations.
  58.  
  59.  
  60.  
  61. Exploit:
  62.  
  63. $ ln -s FILE_TO_READ ~/.mh_profile
  64.  
  65. $ /usr/bin/mh/msgchk
  66.  
  67.  
  68.  
  69.  
  70.  
  71.  
  72.  
  73.  
  74.  
  75.