# Ensure ftp client is not installed

Necessity: The File Transfer Protocol (FTP) is an insecure legacy protocol that transmits credentials and data in cleartext over the network. This makes it highly vulnerable to eavesdropping, packet sniffing, and man-in-the-middle attacks, which can lead to credential theft, data exposure, and unauthorized system access. Removing the FTP client mitigates the risk of users inadvertently or maliciously using this insecure protocol, thereby preventing the transmission of sensitive data over untrusted networks. Auditing and Remediation: The audit script queries the system's package management database (RPM) to determine if the 'ftp' package is installed. The remediation script uses the native package manager ('yum' or 'dnf') to uninstall the 'ftp' package, removing the client binaries from the system. Recommended State Rationale: The recommended state for Basic, Moderate, and Strict security levels is uniformly 'Not Installed'. Due to the fundamental lack of encryption in the FTP protocol, there is no scenario in a modern secure environment where its use is justifiable. Removing it entirely forces the adoption of secure alternatives such as SFTP (SSH File Transfer Protocol) or FTPS (FTP over SSL/TLS), which encrypt both the control and data channels, protecting data integrity and confidentiality. This single, strict recommendation aligns with security best practices and benchmarks like CIS.

## Recommended State Configuration

| Security Level | Value |
|----------------|-------|
| **Basic** | `['Not Installed']` |
| **Moderate** | `['Not Installed']` |
| **Strict** | `['Not Installed']` |
| **Type** | `ENUM` |

## Audit Script Working

bash script that checks if the 'ftp' package is installed using the system's package manager. The script must output only the string 'Installed' if the package is present, or 'Not Installed' if it is not.

## Remediation Script Working

bash script that accepts one positional argument representing the desired state ('Not Installed'). If the argument is 'Not Installed', the script must use the system's package manager (e.g., 'yum' or 'dnf') to remove the 'ftp' package. The script must return the string 'true' upon successful removal or if the package is already not installed, and 'false' if the removal fails or the input argument is invalid.

