Skip to content

Commit 1283580

Browse files
Merge pull request #1 from interference-security/tnspoision_checker_bug_fix
Fixed false positive bug in Oracle TNS Listener Checker module
2 parents 3413059 + 0fa1fc5 commit 1283580

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

modules/auxiliary/scanner/oracle/tnspoison_checker.rb

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,19 @@ def run_host(ip)
4242
send_packet = tns_packet("(CONNECT_DATA=(COMMAND=service_register_NSGR))")
4343
sock.put(send_packet)
4444
packet = sock.read(100)
45+
hex_packet = Rex::Text.to_hex(packet, prefix = ':')
46+
split_hex = hex_packet.split(":")
4547
find_packet = /\(ERROR_STACK=\(ERROR=/ === packet
46-
find_packet == true ? print_error("#{ip}:#{rport} is not vulnerable ") : print_good("#{ip}:#{rport} is vulnerable")
48+
#find_packet == true ? print_error("#{ip}:#{rport} is not vulnerable ") : print_good("#{ip}:#{rport} is vulnerable")
49+
if find_packet == true
50+
print_error("#{ip}:#{rport} is not vulnerable")
51+
elsif split_hex[5] == "02"
52+
print_good("#{ip}:#{rport} is vulnerable")
53+
elsif split_hex[5] == "04"
54+
print_error("#{ip}:#{rport} is not vulnerable")
55+
else
56+
print_error("#{ip}:#{rport} might not be vulnerable")
57+
end
4758
# TODO: Module should report_vuln if this finding is solid.
4859
rescue ::Rex::ConnectionError, ::Errno::EPIPE
4960
print_error("#{ip}:#{rport} unable to connect to the server")

0 commit comments

Comments
 (0)