312-50 ยท System hacking
Privilege escalation paths and defenses
Vertical vs horizontal, kernel exploits, misconfigured services, unquoted service paths, DLL hijacking, SUID, sudo misconfigurations, and defenses.
Key points
- Vertical: higher privileges (user to admin/root). Horizontal: another account, same level.
- Paths: unpatched kernel flaws, weak file or service permissions, unquoted service paths with spaces, DLL hijacking via writable search paths.
- SUID/SGID binaries spawning shells; sudo rules allowing editors or interpreters.
- Defenses: patching, least privilege, quoted paths, limited write access, SUID and sudoers audits, application control.
Practice questions
A standard user obtains the same rights as another standard user in a different department. What is this called?
- Horizontal privilege escalation
- Vertical privilege escalation
- Kernel hardening
- Credential rotation
Show answer
Answer: A. Horizontal privilege escalation
Taking over or acting as another account at the same privilege level is horizontal escalation. Vertical would gain higher privileges such as admin.
Which Linux configurations commonly enable local privilege escalation?
- A SUID-root binary that can spawn a shell
- A sudoers rule allowing a text editor to run as root
- Home directories with mode 700
- An up-to-date patched kernel
- SSH key login with passphrases
Show answer
Answer: A. A SUID-root binary that can spawn a shell, B. A sudoers rule allowing a text editor to run as root
A SUID-root binary that can run shell commands and a sudo rule granting an editor or interpreter without restriction both let a user reach root. Strict file permissions and a current kernel are protective.
True or false: DLL hijacking only works if the attacker is already an administrator.
Show answer
Answer: False
False. It works when a privileged program loads a DLL from a location a lower-privileged user can write to, which is why it is an escalation technique.
Practice 8 questions on this topic in Bitzu
Short lessons, instant explanations and spaced review of what you get wrong. Free on iOS and Android.
