Verify Essential Linux Binary Modified on Host

Cette page n'est pas encore disponible en français, sa traduction est en cours.
Si vous avez des questions ou des retours sur notre projet de traduction actuel, n'hésitez pas à nous contacter.

Security recommendation

ImpactRemediation complexitySeverityRecommended value
232No unauthorized modifications

Essential system binaries should remain unchanged unless modifications are part of authorized system updates or patches.

Compliance

Documentation

Essential system binaries are executable files that perform operating system functions and administrative tasks. These binaries typically reside in protected system directories such as /bin, /sbin, /usr/bin, and /usr/sbin.

File Integrity Monitoring (FIM) tracks changes to essential system files by monitoring various file operations including:

  • chmod: Permission changes that could weaken security controls or grant unauthorized access
  • chown: Ownership changes that could allow unauthorized users to control critical binaries
  • link: Creation of hard or symbolic links that could redirect execution to malicious code
  • rename: Moving or renaming binaries, potentially to hide malicious replacements
  • open: File modifications that alter the binary’s behavior or inject malicious code
  • unlink: Deletion of critical binaries, potentially as part of an attack to disable security controls
  • utimes: Timestamp modifications that could be used to hide evidence of tampering

Remediation

Prerequisites

  • You must have root or administrative privileges
  • Access to system logs and audit trails
  • Backup of known-good system state or package manager database

Step-by-step guide

Step 1: Identify Modified Binary

Review the Finding to determine which essential Linux binary was modified and the nature of the change:

# Check file details
ls -l /path/to/modified/binary
stat /path/to/modified/binary

Step 2: Verify Legitimate Change

Check if the modification was part of an authorized system update:

# For Debian/Ubuntu systems
dpkg -V package-name

# Check recent package manager activity
grep "upgraded\|installed" /var/log/dpkg.log  # Debian/Ubuntu