NEWPractise supported commands in browser simulations, alongside the lesson.Try a browser practice exercise.Try a lab♥ Codelivly is 100% free, no paywall. If it helped you, chip in to keep it running.100% free. Help keep it so.Support us
Linux Fundamentals for Cybersecurity
Linux is the backbone of modern cybersecurity. Whether you are defending enterprise servers, analyzing malware, or launc
ViewWindows Fundamentals
The Windows Fundamentals learning path provides a comprehensive foundation in Microsoft Windows operating systems, speci
ViewExploitation Fundamentals
Amateurs stop at the proof of concept. They pop an alert(1), dump a database via SQLi, or find an IDOR, write a report,
ViewCredential Attacks
Amateurs think credential attacks are just about guessing "Password123" or running a generic brute-force script until th
ViewWAN, VPN and Cloud Networking
This comprehensive learning path transitions from local area networks to the complex world of wide-area connectivity, se
ViewCloud and Email Forensics
This learning path provides a comprehensive foundation in Cloud and Email Forensics, a critical discipline in modern Dig
ViewPreview · 30 min
Master environment variables like $PATH and shell profiles (~/.bashrc). Learn how attackers use Path Hijacking and Profile Hijacking for stealthy persistence and credential theft.
When you log in, the shell loads settings into memory before you type anything. They decide where it looks for programs and which personal settings apply.
These settings come from environment variables and shell profiles. Defenders audit them. Attackers use them for persistence and privilege escalation, because they run automatically.
An environment variable is a named value, like HOME=/home/jsmith. When exported, it is copied to every child process the shell starts.
echo $VAR — print one variableenv or printenv — print all environment variablesVAR=value — set a shell variable (only this shell)export VAR=value — set it and pass it to child processesunset VAR — remove itCreate a free account to unlock the rest of this task, complete tasks, and earn Rep.
Sign in