documentation_complete: true

prodtype: rhel7,fedora

title: 'Enable Logging of All FTP Transactions'

description: |-
    Add or correct the following configuration options within the <tt>vsftpd</tt>
    configuration file, located at <tt>/etc/vsftpd/vsftpd.conf</tt>:
    <pre>xferlog_enable=YES
    xferlog_std_format=NO
    log_ftp_protocol=YES</pre>

rationale: |-
    To trace malicious activity facilitated by the FTP service, it must be configured to ensure that all commands sent to
    the FTP server are logged using the verbose vsftpd log
    format. The default vsftpd log file is <tt>/var/log/vsftpd.log</tt>.

severity: unknown

identifiers:
    cce@rhel7: 80247-0

ocil_clause: 'xferlog_enable is missing, or is not set to yes'

ocil: |-
    Find if logging is applied to the FTP daemon.
    <br /><br />
    Procedures:
    <br /><br />
    If vsftpd is started by xinetd the following command will indicate the xinetd.d startup file:
    <pre>$ grep vsftpd /etc/xinetd.d/*</pre>
    <pre>$ grep server_args <i>vsftpd xinetd.d startup file</i></pre>
    This will indicate the vsftpd config file used when starting through xinetd.
    If the <i>server_args</i> line is missing or does not include the vsftpd configuration file, then the default config file (/etc/vsftpd/vsftpd.conf) is used.
    <pre>$ sudo grep xferlog_enable <i>vsftpd config file</i></pre>
