Binary Exploitation - Linux
Bypass SUID
whitelist
SUID
whitelistSometimes
SUID
commands may have a whitelist for commands .This can be bypassed by using
subcommands
:
In this example
supershell
is theSUID
binary and/bin/ls
the whitelisted command, there are also another way to bypass this by using'
to open a quote:
Then in the next line use your desired command:
Exploit pkexec
pkexec
ShellSock
ShellSock
Attack vectors include remote command execution via
CGI
scripts or web servers, as well as exploitation in environments likeSSH
,HTTP
, and any process that involvesBash
interpreting environment variables.Affects
Bash
versions1.x
to4.3
:
Inject malicious code through the
User-Agent
header, targeting a vulnerableCGI
script in the/cgi-bin/
directory to initiate a reverse shell:
Last updated