REFERENCE GUIDE
PATH, environment, and helper-program trust
Programs sometimes launch helpers by an unqualified name or consult environment variables for configuration and library loading.
Also known as: PATH hijacking · LD_PRELOAD
Mechanism
Programs sometimes launch helpers by an unqualified name or consult environment variables for configuration and library loading. The trust boundary arises when a privileged or trusted process resolves those values using attacker-controlled state. Resolution behavior differs between shells, exec variants, dynamic loaders, and applications.
Practical method
Identify the exact helper-launch API and inherited environment. Inspect PATH ordering, working directory, and writable search locations. In a local fixture, substitute an inert helper that logs its invocation and arguments. Analyze dynamic-loader variables separately from ordinary application settings.
printf "%s\n" "$PATH"
command -v helper
# Absolute helper paths reduce search ambiguity.
Interpreting evidence
Confirm that the target resolves the substituted helper, not merely that your interactive shell does. Capture the target process environment and privilege state at execution.
Pitfalls and limits
Privileged loader modes ignore several environment variables. A shell caches command locations. Absolute paths can still point into writable directories or invoke scripts with unsafe interpreter resolution.