Skip to content

Commit b9a274f

Browse files
author
tate
committed
improving DLSw detection
1 parent a4a1048 commit b9a274f

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

modules/auxiliary/scanner/dlsw/dlsw_leak_capture.rb

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,8 @@ def check_host(ip)
5656
print_status("Checking #{peer} for DLSw exposure")
5757
response = get_response
5858

59-
if !response.blank? && (response =~ /IOS Software|cisco.com/)
59+
dlsw_header = ["3148015b"].pack("H*") # => "\x31\x48\x01\x5b""
60+
if !response.blank? && (response[0..3] == dlsw_header)
6061
print_good("#{peer}: The target Cisco router appears vulnerable: parts of a Cisco IOS banner detected")
6162
report_vuln(
6263
host: rhost,
@@ -86,6 +87,7 @@ def get_response(size = 1024)
8687
# Borrowed from https://github.com/rapid7/metasploit-framework/blob/master/modules/auxiliary/scanner/ssl/openssl_heartbleed.rb
8788
def get_data(length = -1)
8889

90+
print_status("Calling get_response")
8991
return sock.get_once(-1, response_timeout) if length == -1
9092

9193
to_receive = length
@@ -128,4 +130,3 @@ def loot_and_report(dlsw_data)
128130
print_status("#{peer}: DLSw leaked data stored in #{path}")
129131
end
130132
end
131-

0 commit comments

Comments
 (0)