Vortex Level 12
Vortex Level 12 — exploit a program knowing the stack is not executable, which rules out classic shellcode on the stack.
Table of Contents
Source: This content is aggregated from overthewire (MIT). Visit the original repository for the latest version.
We don’t want no executable stack
Exploit this level knowing that the stack is not executable. You must login to vortex.labs.overthewire.org to complete this level..
Study guide
Level map: logged in as vortex12, obtain access to vortex13.
What this level teaches
Defeating the non-executable stack.
Key ideas
- NX stack. The CPU refuses to run code placed on the stack, so injected shellcode will not work.
- Alternatives. Reuse existing code (return-to-libc) or chain short code fragments (return-oriented programming).
- Library locations. Use
lddandgdbto find functions and strings in loaded libraries. - Login required. The page says you must log in to the Vortex host to complete this level.
How to approach it
- Confirm the stack is non-executable and read the vulnerable code.
- Pick a function in the C library that does what you need, and find the address of a string for its argument.
- Lay out the stack frame as the function expects.
Why it matters
Non-executable memory is standard today, so ret2libc and ROP are the baseline techniques.