# Ensure prelink is not installed

The 'prelink' utility modifies shared libraries and linked binaries to speed up their startup time. However, this process can significantly reduce the effectiveness of Address Space Layout Randomization (ASLR), a critical security feature that randomizes memory addresses to make it harder for attackers to exploit memory corruption vulnerabilities. By pre-mapping library locations, prelink makes these addresses predictable, undermining ASLR's protection. The risk of a more predictable memory layout for exploitation outweighs the minor performance gains. The audit script verifies the installation status of the 'prelink' package. The remediation script uninstalls the package to restore the full security benefit of ASLR. All hardening levels (Basic, Moderate, and Strict) recommend that 'prelink' be 'not installed'. Given the security risk it introduces by weakening a fundamental defense mechanism like ASLR, there is no justifiable scenario in a secure environment to have it installed. This recommendation aligns with security 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 'prelink' package is installed using the package manager. The script must output only the string 'installed' if the package is present, and 'not installed' if it is not. No other text or formatting should be included in the output.

## Remediation Script Working

Bash script that accepts a single positional argument for the desired state. If the argument is 'not installed', the script must use the system's package manager to uninstall the 'prelink' package. The script must output 'true' on successful removal or if the package was already absent, and 'false' if the removal process fails.

