CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In
rapid7

Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.

GitHub Repository: rapid7/metasploit-framework
Path: blob/master/modules/auxiliary/vsploit/pii/email_pii.rb
Views: 11704
1
##
2
# This module requires Metasploit: https://metasploit.com/download
3
# Current source: https://github.com/rapid7/metasploit-framework
4
##
5
6
class MetasploitModule < Msf::Auxiliary
7
8
#
9
# This module sends pii via an attacker smtp machine
10
#
11
include Msf::Exploit::Remote::SMTPDeliver
12
include Msf::Auxiliary::PII
13
14
def initialize(info = {})
15
super(update_info(info,
16
'Name' => 'VSploit Email PII',
17
'Description' => %q{
18
This auxiliary reads from a file and sends data which
19
should be flagged via an internal or external SMTP server.
20
},
21
'License' => MSF_LICENSE,
22
'Author' => ['willis']
23
))
24
register_options(
25
[
26
OptString.new('RHOST', [true, "SMTP server address",'127.0.0.1']),
27
OptPort.new('RPORT', [true, "SMTP server port", 25])
28
])
29
end
30
31
def run
32
33
msg = Rex::MIME::Message.new
34
msg.mime_defaults
35
msg.subject = datastore['SUBJECT']
36
msg.to = datastore['MAILTO']
37
msg.from = datastore['MAILFROM']
38
39
data = create_pii
40
41
msg.add_part(data, "text/plain")
42
msg.add_part_attachment(data, rand_text_english(10))
43
44
resp = send_message(msg.to_s)
45
end
46
end
47
48