Bash
Theory
Bash scripting is a powerful tool used by system administrators and developers to automate tasks and streamline processes on Unix-like systems. However, like any software, bash scripts can be vulnerable to various security issues, which, if exploited, can lead to privilege escalation and unauthorized access.
Practice
Shell In Prompt
If a bash script executes read -p
. We can input /bin/bash -i
to get a shell as another user.
Bash eq
If a bash script use the -eq
comaparison, it's vulnerable to arbitrary command execution.
No Command Path Exploit
If a bash script executes another command without specifying the path. We can abuse it and get a privilege escalation.
Last updated