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/lib/msf/core/auxiliary/pii.rb
Views: 11784
1
# -*- coding: binary -*-
2
3
module Msf
4
5
###
6
#
7
# This module provides methods for time-limited modules
8
#
9
###
10
11
module Auxiliary::PII
12
13
#
14
def initialize(info = {})
15
super
16
17
register_options(
18
[
19
OptInt.new('ENTRIES', [ false, "PII Entry Count", 1000]),
20
OptString.new('EMAIL_DOMAIN', [false, "Email Domain", "localhost.localdomain"])
21
], Auxiliary::PII)
22
23
end
24
25
#
26
# The command handler when launched from the console
27
#
28
def create_acct()
29
iin = [40,41,42,43,44,45,51,52,53,54,55]
30
acct = iin[rand(9)].to_s
31
32
while acct.length < 16
33
acct = acct.concat("#{rand(9).to_s}")
34
end
35
cvv = rand(899)+100
36
"#{acct}/#{cvv.to_s}"
37
end
38
39
def create_ssn
40
aaa = rand(5)+734
41
gg = rand(89)+10
42
sss = rand(8999)+1000
43
"#{aaa.to_s}-#{gg.to_s}-#{sss.to_s}"
44
end
45
46
def create_dob
47
"#{rand(11)+1}-#{rand(27)+1}-#{rand(30)+1960}"
48
end
49
50
def create_pw
51
list = ['123456','password','12345678','qwerty','abc123','111111','letmein','trustno1','superman',
52
'iloveyou','sunshine','1234','princess','starwars','princess','nintendo','computer','Password',
53
'passw0rd','michael','football','whatever','shadow','pokemon','666666','forgetyou','blahblah',
54
'cowboys','yankees','ravens','orioles','pirates','dabears','tiger','fairies','sushi','money',
55
'killzone','sandbox','rotflmao','subway','knicks','lakers','chargers','kermit','pigskin','baseball']
56
list[rand(list.length-1)]
57
end
58
59
def luhnCheck(ccNumber)
60
ccNumber = ccNumber.gsub(/\D/, '')
61
cardLength = ccNumber.length
62
parity = cardLength % 2
63
sum = 0
64
for i in 0...cardLength
65
digit = ccNumber[i] - 48
66
if i % 2 == parity
67
digit = digit * 2
68
end
69
if digit > 9
70
digit = digit - 9
71
end
72
sum = sum + digit
73
end
74
return (sum % 10)
75
end
76
77
def create_pii
78
pii = ''
79
i = 0
80
fnames = ['MICHAEL','JASON','JOHN','JAMES','ROBERT','DAVID','DANIEL','ERIC','RYAN','CHRISTOPHER','WILLIAM',
81
'JESSICA','KIMBERLY','COURTNEY','ELIZABETH','SUSAN','MICHELLE','JENNIFER','SARAH','LAUREN','AMANDA',
82
'SHAWN','HUGH','PAUL','IAN','GARY','TRACY','ELAINE','JACKIE','AARON','SANDRA','DARREN','STEVEN',
83
'ALEX','ELLEN','ALLEN','RONALD','GARRETT','JARED','RITA','JAYNE','JACOB','HAROLD','BAILEY']
84
85
lnames = ['BROWN','SMITH','JOHNSON','JACKSON','ROBINSON','JONES','MOORE','HAYES','ABRAHAM','SCOTT','EVANS',
86
'MCINTYRE','KNOX','HENDERSON','MALONE','PERRY','DOTSON','STEWART','MCDONALD','HAYWOOD','LOGAN',
87
'PATTERSON','RAINEY','POTTS','KILBURN','BANKS','PETERSON','STOTT','KING','MCQEEN','TONGE','BLACK',
88
'BROWN','BLACKBURN','WOODS','DAVIES','PAYTON','NICHOLSON','ROSE','ROBERTS','BIRD','FORD','HARRISON',
89
'NIXON','CLINTON','REAGAN','BUTLER','DUKES','CARTER','WASHINGTON','GRANT','SMART']
90
91
while i < datastore['ENTRIES']
92
fname = fnames[rand(fnames.length-1)]
93
lname = lnames[rand(lnames.length-1)]
94
new_acct = create_acct()
95
ssn = create_ssn()
96
pw = create_pw()
97
dob = create_dob()
98
pii << "#{new_acct}/#{lname}/#{fname}/#{dob}/#{ssn}/#{fname}.#{lname}@metasploit.org/#{pw}\n"
99
i += 1
100
end
101
pii
102
end
103
104
end
105
end
106
107