File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
modules/auxiliary/scanner/dlsw Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -56,7 +56,8 @@ def check_host(ip)
56
56
print_status ( "Checking #{ peer } for DLSw exposure" )
57
57
response = get_response
58
58
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 )
60
61
print_good ( "#{ peer } : The target Cisco router appears vulnerable: parts of a Cisco IOS banner detected" )
61
62
report_vuln (
62
63
host : rhost ,
@@ -86,6 +87,7 @@ def get_response(size = 1024)
86
87
# Borrowed from https://github.com/rapid7/metasploit-framework/blob/master/modules/auxiliary/scanner/ssl/openssl_heartbleed.rb
87
88
def get_data ( length = -1 )
88
89
90
+ print_status ( "Calling get_response" )
89
91
return sock . get_once ( -1 , response_timeout ) if length == -1
90
92
91
93
to_receive = length
@@ -128,4 +130,3 @@ def loot_and_report(dlsw_data)
128
130
print_status ( "#{ peer } : DLSw leaked data stored in #{ path } " )
129
131
end
130
132
end
131
-
You can’t perform that action at this time.
0 commit comments