Skip to content

Commit 9d6e066

Browse files
committed
Guess service name and port
1 parent a44640c commit 9d6e066

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

modules/auxiliary/gather/eventlog_cred_disclosure.rb

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,17 +152,27 @@ def run
152152

153153
cred_table << [host_ipaddress, type, subtype, domain_name, username, password]
154154

155+
if type == 'Windows'
156+
service_name = 'epmap'
157+
port = 135
158+
elsif type == 'IBM AS/400'
159+
service_name = 'as-servermap'
160+
port = 449
161+
else
162+
next
163+
end
164+
155165
credential_core = report_credential_core({
156166
password: password,
157167
username: username,
158168
})
159169

160170
host_login_data = {
161171
address: host_ipaddress,
162-
service_name: type,
172+
service_name: service_name,
163173
workspace_id: myworkspace_id,
164174
protocol: 'tcp',
165-
port: 0, # can be any port, so just set to 0 else the cred api screams
175+
port: port,
166176
core: credential_core,
167177
status: Metasploit::Model::Login::Status::UNTRIED
168178
}

0 commit comments

Comments
 (0)