Path: blob/master/modules/auxiliary/vsploit/pii/email_pii.rb
19721 views
##1# This module requires Metasploit: https://metasploit.com/download2# Current source: https://github.com/rapid7/metasploit-framework3##45class MetasploitModule < Msf::Auxiliary67#8# This module sends pii via an attacker smtp machine9#10include Msf::Exploit::Remote::SMTPDeliver11include Msf::Auxiliary::PII1213def initialize(info = {})14super(15update_info(16info,17'Name' => 'VSploit Email PII',18'Description' => %q{19This auxiliary reads from a file and sends data which20should be flagged via an internal or external SMTP server.21},22'License' => MSF_LICENSE,23'Author' => ['willis'],24'Notes' => {25'Stability' => [CRASH_SAFE],26'SideEffects' => [IOC_IN_LOGS],27'Reliability' => []28}29)30)31register_options(32[33OptString.new('RHOST', [true, 'SMTP server address', '127.0.0.1']),34OptPort.new('RPORT', [true, 'SMTP server port', 25])35]36)37end3839def run40msg = Rex::MIME::Message.new41msg.mime_defaults42msg.subject = datastore['SUBJECT']43msg.to = datastore['MAILTO']44msg.from = datastore['MAILFROM']4546data = create_pii4748msg.add_part(data, 'text/plain')49msg.add_part_attachment(data, rand_text_english(10))5051send_message(msg.to_s)52end53end545556