home *** CD-ROM | disk | FTP | other *** search
/ Hacks & Cracks / Hacks_and_Cracks.iso / hackersclub / km / library / hack / chapter4.txt < prev    next >
Text File  |  1998-03-25  |  4KB  |  89 lines

  1. Chapter 4: Hacking Webpages
  2.  
  3. Getting the Password File Through FTP
  4.  
  5. Ok well one of the easiest ways of getting superuser access is through
  6. anonymous ftp access into a webpage. First you need learn a little about
  7. the password file...
  8.  
  9. root:User:d7Bdg:1n2HG2:1127:20:Superuser
  10. TomJones:p5Y(h0tiC:1229:20:Tom Jones,:/usr/people/tomjones:/bin/csh
  11. BBob:EUyd5XAAtv2dA:1129:20:Billy Bob:/usr/people/bbob:/bin/csh
  12.  
  13. This is an example of a regular encrypted password file. The Superuser is
  14. the part that gives you root. That's the main part of the file.
  15.  
  16. root:x:0:1:Superuser:/:
  17. ftp:x:202:102:Anonymous ftp:/u1/ftp:
  18. ftpadmin:x:203:102:ftp Administrator:/u1/ftp
  19.  
  20. This is another example of a password file, only this one has one little
  21. difference, it's shadowed. Shadowed password files don't let you view or
  22. copy the actual encrypted password.  This causes problems for the password
  23. cracker and dictionary maker(both explained later in the text). Below is
  24. another example of a shadowed password file:
  25.  
  26. root:x:0:1:0000-Admin(0000):/:/usr/bin/csh
  27. daemon:x:1:1:0000-Admin(0000):/:
  28. bin:x:2:2:0000-Admin(0000):/usr/bin:
  29. sys:x:3:3:0000-Admin(0000):/:
  30. adm:x:4:4:0000-Admin(0000):/var/adm:
  31. lp:x:71:8:0000-lp(0000):/usr/spool/lp:
  32. smtp:x:0:0:mail daemon user:/:
  33. uucp:x:5:5:0000-uucp(0000):/usr/lib/uucp:
  34. nuucp:x:9:9:0000-uucp(0000):/var/spool/uucppublic:/usr/lib/uucp/uucico
  35. listen:x:37:4:Network Admin:/usr/net/nls:
  36. nobody:x:60001:60001:uid no body:/:
  37. noaccess:x:60002:60002:uid no access:/:
  38. webmastr:x:53:53:WWW Admin:/export/home/webmastr:/usr/bin/csh
  39. pin4geo:x:55:55:PinPaper Admin:/export/home/webmastr/new/gregY/test/pin4geo:/bin/false
  40. ftp:x:54:54:Anonymous FTP:/export/home/anon_ftp:/bin/false
  41.  
  42. Shadowed password files have an "x" in the place of a password or sometimes
  43. they are disguised as an * as well.
  44.  
  45. Now that you know a little more about what the actual password file looks
  46. like you should be able to identify a normal encrypted pw from a shadowed
  47. pw file. We can now go on to talk about how to crack it.
  48.  
  49. Cracking a password file isn't as complicated as it would seem, although the
  50. files vary from system to system. 1.The first step that you would take is
  51. to download or copy the file. 2. The second step is to find a password
  52. cracker and a dictionary maker. Although it's nearly impossible to find a
  53. good cracker there are a few ok ones out there. I recomend that you look
  54. for Cracker Jack, John the Ripper, Brute Force Cracker, or Jack the Ripper.
  55. Now for a dictionary maker or a dictionary file...  When you start a
  56. cracking prog you will be asked to find the the password file. That's where
  57. a dictionary maker comes in. You can download one from nearly every hacker
  58. page on the net.  A dictionary maker finds all the possible letter
  59. combinations with the alphabet that you choose(ASCII, caps, lowercase, and
  60. numeric letters may also be added) .  We will be releasing our pasword file
  61. to the public soon, it will be called, Psychotic Candy, "The Perfect Drug."
  62. As far as we know it will be one of the largest in circulation. 3. You then start up the cracker and follow the directions that it gives
  63. you.
  64.  
  65.  
  66. The PHF Technique
  67.  
  68. Well I wasn't sure if I should include this section due to the fact that
  69. everybody already knows it and most servers have already found out about
  70. the bug and fixed it. But since I have been asked questions about the phf
  71. I decided to include it.
  72.  
  73. The phf technique is by far the easiest way of getting a password file
  74. (although it doesn't work 95% of the time). But to do the phf all you do
  75. is open a browser and type in the following link:
  76.  
  77. http://webpage_goes_here/cgi-bin/phf?Qalias=x%0a/bin/cat%20/etc/passwd 
  78.  
  79. You replace the webpage_goes_here with the domain. So if you were trying to
  80. get the pw file for www.webpage.com you would type:
  81.  
  82. http://www.webpage.com/cgi-bin/phf?Qalias=x%0a/bin/cat%20/etc/passwd
  83.  
  84. and that's it! You just sit back and copy the file(if it works).
  85.  
  86. The best way to get root is with an exploit. Exploits are explained in the
  87. next chapter.
  88.  
  89.