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

  1.                               PHF Vulnerability
  2.  
  3. PHF is a white pages like service (program) that was distributed with NCSA
  4. httpd and Appache www servers. I personally can't think of a single
  5. legimate use for phf. Anyway, back to the point, the problem is that phf
  6. can be used to retreve *any* file from a vulnerable machine. (this includes
  7. passwd file) The usage is quite simple, phf used http protocol, and
  8. therefore it can be used through a simple web browser. PHF is located in
  9. cgi directory of the server. The command line that exploits phf by
  10. retreving a pw file is:
  11. http://your.host.name/cgi-bin/phf?Qalias=x%0a/bin/cat%20/etc/passwd
  12.  
  13. Where your.host.name is replaced with a name of the server in question. So,
  14. for example if somebody was going to attempt to exploit system
  15. www.cool.com, they would type
  16. http://www.cool.com/cgi-bin/phf?Qalias=x%0a/bin/cat%20/etc/passwd in the
  17. browser location window.
  18.  
  19. If you are the sys admin, and are concerned with unauthorized users
  20. exploiting your system through a phf bug, here is a simple way to prevent
  21. it. Add the following line to the php.h file: #define PATTERN_RESTRICT
  22. ".*\\.phtml$" This line restricts phf so it can only display files that end
  23. in .phtl extension (therefore preventing retreval of the important files
  24. such as passwd) PHF bug is likelly to work only weak, unprotected systems,
  25. particulary, foreign systems (japanese for example).
  26.  
  27. Duncan Silver of U2
  28. www.hackersclub.com/uu
  29.