Environment Hijacking

Detects manipulation of system environment, DNS, network resolution, and execution paths to redirect or intercept traffic and commands

9 rules in environment_hijacking.yml

CRITICAL: 1 | HIGH: 6 | MEDIUM: 2

Rule IDSeverityTitleDescriptionRefs
ld_config_manipulationCRITICALDynamic Linker Configuration TamperingModifies /etc/ld.so.conf or runs ldconfig with custom paths to inject malicious shared libraries
alternatives_manipulationHIGHSystem Alternatives ManipulationUses update-alternatives to replace system binaries with attacker-controlled versions
etc_hosts_manipulationHIGH/etc/hosts DNS HijackingModifies /etc/hosts to redirect domain resolution to attacker-controlled IPs
library_path_injectionHIGHLibrary Search Path InjectionModifies CLASSPATH, GEM_PATH, NODE_PATH, or other language library paths to load malicious code
path_env_prependHIGHPATH Environment Variable ManipulationPrepends a directory to PATH, allowing malicious binaries to shadow legitimate system commands
pythonpath_manipulationHIGHPYTHONPATH ManipulationPYTHONPATH is exported, or set to a writable location like /tmp, /var/tmp, or /dev/shm. Python imports the planted module first, giving the attacker code execution as the playbook user.
resolv_conf_manipulationHIGHDNS Resolver ManipulationModifies /etc/resolv.conf to point to attacker-controlled DNS servers
motd_banner_injectionMEDIUMMOTD/Profile Script InjectionInjects commands into /etc/profile, /etc/motd, or login scripts that execute on every user login
ntp_server_manipulationMEDIUMNTP Server ManipulationChanges NTP server configuration, potentially enabling time-based authentication bypass