# Ensure AIDE is installed

Necessity: AIDE (Advanced Intrusion Detection Environment) is a file and directory integrity checker, a crucial component of a host-based intrusion detection system (HIDS). It creates a database of file attributes (hashes, permissions, modification times) and uses it as a baseline to detect unauthorized modifications to critical system files. Installing AIDE is essential for detecting rootkits, malware, and unauthorized changes that could compromise system security. Without AIDE, an attacker could alter system binaries or configuration files to maintain persistence or hide their activities, and these changes would go unnoticed.

Auditing and Remediation: The audit script verifies whether the `aide` package is installed on the system using the `rpm` package manager. The remediation script uses the `yum` package manager to install the `aide` package, ensuring the tool is available for integrity monitoring.

Recommended State Rationale: 
Basic: The fundamental requirement for any file integrity monitoring strategy is the presence of the necessary tool. Therefore, the basic recommended state is 'Installed'.
Moderate: Similar to the basic level, a moderate security posture requires AIDE to be installed. There is no intermediate state for the installation of this foundational security tool.
Strict: For a strict security posture, the installation of AIDE is mandatory. The binary nature of this control (either installed or not) means that 'Installed' is the only acceptable state across all security levels. Subsequent controls will manage AIDE's configuration for stricter security.

## Recommended State Configuration

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

## Audit Script Working

Bash script that checks if the 'aide' package is installed using `rpm -q aide`. If the package is installed, the script must output the string 'Installed'. If it is not installed, it must output 'Not Installed'. The output should contain only this string and nothing else.

## Remediation Script Working

Bash script that installs the 'aide' package. The script should accept one command-line argument, which will be the desired state (e.g., 'Install'). The script will use `yum install -y aide` to perform the installation. It must return `true` if the installation is successful and `false` if it fails.

