Skip to content

Commit 7a74bb3

Browse files
committed
vsftpd_232: Improve wording
1 parent 8b14a09 commit 7a74bb3

1 file changed

Lines changed: 9 additions & 6 deletions

File tree

modules/auxiliary/dos/ftp/vsftpd_232.rb

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ def initialize(info = {})
1212
super(
1313
update_info(
1414
info,
15-
'Name' => 'VSFTPD 2.3.2 Denial of Service',
16-
'Description' => %q{
15+
'Name' => 'VSFTPD 2.3.2 and Earlier STAT Denial of Service',
16+
'Description' => %q{
1717
This module triggers a Denial of Service condition in the VSFTPD server in
1818
versions before 2.3.3 (tested on 2.3.0, 2.3.1, and 2.3.2).
1919
Version 2.3.3 and higher should not be vulnerable.
@@ -51,13 +51,15 @@ def check
5151
print_error('Connection refused')
5252
return Exploit::CheckCode::Unknown('Failed to connect or authenticate via FTP')
5353
end
54-
vprint_status("FTP banner: #{banner.strip}") if banner
54+
55+
banner = banner.to_s.strip
56+
vprint_status("FTP banner: #{banner.strip}") unless banner.empty?
5557
report_service(
5658
host: rhost,
5759
port: rport,
5860
proto: 'tcp',
5961
name: 'ftp',
60-
info: banner.strip
62+
info: banner.to_s.gsub(/^\d{3}[\s-]/, '').strip.gsub(/\A\(|\)\z/, '')
6163
)
6264
rescue Rex::ConnectionRefused
6365
print_error('Connection refused')
@@ -66,6 +68,7 @@ def check
6668
print_error('Connection timed out')
6769
return Exploit::CheckCode::Unknown('Connection timed out')
6870
end
71+
6972
s = ''
7073
loop do
7174
# get each line until our desired line shows or end line shows
@@ -121,11 +124,11 @@ def run
121124
print_error('Connection reset!')
122125
rescue Rex::ConnectionRefused
123126
print("\n")
124-
print_good('Connection refused! Appears DOS attack succeeded')
127+
print_good('Connection refused! Appears DoS attack succeeded')
125128
break
126129
rescue EOFError
127130
print("\n")
128-
print_good('Stream was cut off abruptly. Appears DOS attack succeeded')
131+
print_good('Stream was cut off abruptly. Appears DoS attack succeeded')
129132
break
130133
end
131134
disconnect

0 commit comments

Comments
 (0)