Disable vsftpd Service
An XCCDF Rule
Description
Thevsftpd
service can be disabled with the following command:
$ sudo systemctl mask --now vsftpd.service
Rationale
Running FTP server software provides a network-based avenue of attack, and should be disabled if not needed. Furthermore, the FTP protocol is unencrypted and creates a risk of compromising sensitive information.
- ID
- xccdf_org.ssgproject.content_rule_service_vsftpd_disabled
- Severity
- Medium
- References
- Updated
Remediation Templates
OS Build Blueprint
[customizations.services]
masked = ["vsftpd"]
A Puppet Snippet
include disable_vsftpd
class disable_vsftpd {
service {'vsftpd':
enable => false,
ensure => 'stopped',
}
}
An Ansible Snippet
- name: Gather the package facts
package_facts:
manager: auto
tags:
- CCE-91366-5
- NIST-800-53-CM-6(a)
A Shell Script
# Remediation is applicable only in certain platforms
if rpm --quiet -q kernel-default; then
SYSTEMCTL_EXEC='/usr/bin/systemctl'
"$SYSTEMCTL_EXEC" stop 'vsftpd.service'
"$SYSTEMCTL_EXEC" disable 'vsftpd.service'
"$SYSTEMCTL_EXEC" mask 'vsftpd.service'