Skip to content

Commit 0cad10c

Browse files
committed
ftp: Report if host is up but service doesn't match
1 parent 0d718a4 commit 0cad10c

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

  • lib/msf/core/exploit/remote

lib/msf/core/exploit/remote/ftp.rb

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,20 @@ def connect(global = true, verbose = nil)
9090
type: 'ftp.banner',
9191
data: { banner: Rex::Text.to_hex_ascii(self.banner.strip) }
9292
)
93+
else
94+
report_service(
95+
host: rhost,
96+
port: rport,
97+
proto: 'tcp',
98+
name: 'unknown',
99+
info: Rex::Text.to_hex_ascii(banner.to_s.strip).presence || 'Non-FTP service',
100+
parents: {
101+
host: rhost,
102+
port: rport,
103+
proto: 'tcp',
104+
name: 'tcp'
105+
}
106+
)
93107
end
94108

95109
# Return the file descriptor to the caller

0 commit comments

Comments
 (0)