Skip to content
RCE Write-up Advanced

Bypassing a noexec by elf roping

The author bypassed a noexec mount and chroot to execute code by crafting an ELF binary that uses the dynamic loader's relocation and longjmp to build a ROP chain, ultimately calling mprotect and executing a payload. An attacker with file upload and control over an execve string could achieve code execution despite the noexec restriction.

Xilokar Follow

Published on blog.xilokar.info

published on Mon 27 November 2023 by Xilokar

Xilokar, on blog.xilokar.info

The full write-up lives on its author's site

It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 6 min read.

Context

This post describes how I bypassed a noexec mount option inside a limited, chrooted environment. The scenario is a common one after finding a vulnerability in a service: you can upload a file, and you have the opportunity to execve a string you provide. It looks like the work is done.

It is not. The service is limited in practice. The upload directory is a tmpfs mounted with the noexec option, and the service runs in a chrooted environment with no shell, so there is no /bin/sh -c /tmp/upload/myscript.sh to fall back on.

The target here is the software I had found a vulnerability in; the goal is to get code execution despite those two restrictions. I do not claim this is a new approach or something never seen before, just something I was not aware of.

Setup

The environment has a few properties that matter for everything that follows:

  • The upload directory is a tmpfs with the noexec mount option.
  • The service runs inside a chroot with no shell available.
  • The applications provided in the chroot are dynamic executables, so ld.so and libc.so are reachable. In this system they are the same musl binary.
  • The relocation types and gadgets later in the post are AARCH64.

Finding it

My first attempt was the obvious one: upload an ELF into the tmpfs and run it through the loader, /lib/ld.so /tmp/uploaded.bin, to get around the missing execute permission on the file.

That used to be a classical noexec bypass, but kernels nowadays refuse to mmap part of a file on a non-exec filesystem with the PROT_EXEC flag set, so this did not work.

While playing with ld.so, I noticed something more interesting: the memory locations of ld.so and of the uploaded ELF file, although randomised by ASLR, were fixed relative to each other. That is not the case when an ELF is executed the normal way.

The second observation is that even though my ELF binary is non-executable and therefore never executed, it can still be loaded. You only have to make sure it has no PROT_EXEC segment, and both ld.so and the kernel will happily map it.

Once loaded, the last thing ld.so normally does is branch to your entry point. Since the segments have been made non-executable, that branch fails miserably. That is the point where a non-executable, writable address space calls for ROP.

Exploitation

Step 1: point the entry point into libc

Because the loaded ELF and libc.so sit at a static offset from each other, a little arithmetic lets us tell ld.so that our entry point is far away from our loaded segments, inside the .text section of libc.so. That works.

The remaining problem is choosing where to jump. A full ROP chain needs to be built on the stack, and the stack at the entry point is not adapted to that: we only have a pointer to the argv and env strings there. The best chance would be a single gadget that swaps the stack to a memory region we control, but with the libc.so I was targeting that turned out to be difficult without a little more help.

Step 2: use longjmp to switch stacks

A very suitable function for switching the stack is longjmp, which restores an executable context. There are already calls to it inside ld.so:

Text
FUN_00148920("Error recording dependencies for %s", lVar9);
if (DAT_001919e8 != 0) {
        /* WARNING: Subroutine does not return */
          longjmp(DAT_001919e0,1);
}

What matters is that the pointer to the structure used for the longjmp call is a writable global.

Step 3: abuse relocations to overwrite that pointer

ELF loading involves relocations. A relocation tells the loader, in effect, "I will need this function, please write its position here so that I can use it". You can even add an addendum to the position of the symbol you want the loader to inform you about.

The same trick used for the entry point works here: we can make the loader write the address of symbol_a plus an addendum into the writable .data section of libc.so, for example at the position of the pointer used during the longjmp call. A relocation of that shape looks like this:

Text
fffffffffe7fd9e0  001800000101 R_AARCH64_ABS64   000000000000000 puts

Even better, the loader can be made to have the relocation point to our own object:

Text
struct init_stack rop_exec_stack = {
  .sp = &rop_stack.rop_chain,
  .x30 = GADGET(START_STACK_GADGET),
};

void *address_of_rtld_fail = (void*)&rop_exec_stack;

After patching the ELF, the relocation reads:

Text
fffffffffe7fd9e0  001800000101 R_AARCH64_ABS64  0000000000186140 \
                                                rop_exec_stack + 0

Now we only have to point the entry point at the call to longjmp, and our first and only gadget has everything done for us: the stack pointer is set to our ROP chain, which we can carefully write at this stage.

Step 4: build the chain

Finding suitable gadgets is very time consuming, especially on AARCH64 as I found. The loader can still be used to have it calculate values and offsets for us.

After some amount of time I was able to write a ROP chain that:

  1. mallocs a huge buffer,
  2. mprotects it to make it executable,
  3. memcpys a payload embedded in the uploaded .bin file,
  4. and jumps into it.

It is then easy, easy once done, to embed a static ELF in our payload and have it executed.

From the original on blog.xilokar.info

With that, the next step would be working on escaping the chroot, but that is another story.

Root cause

It only prevents the kernel from mapping file-backed pages with PROT_EXEC. It does not prevent the loader from mapping the file without execute permission, and it does not prevent the loader from being pointed at executable code that already exists elsewhere in the address space, here libc.so.

Two properties of the environment make the bypass practical. First, ld.so and the uploaded ELF keep a fixed relative layout under ASLR, so a computed entry point inside libc.so is reliable. Second, ld.so performs relocations into writable data, including a writable global that holds the pointer used by its own longjmp call, which gives an attacker-controlled stack switch without needing a stack pivot gadget.

The chroot and the missing shell raise the bar but do not remove the primitive: once a static ELF can be executed from the payload, the restrictions of the chroot are the next obstacle rather than a barrier to code execution.

Impact

In this case, being able to upload a file and influence the string passed to execve was enough to obtain code execution despite the noexec upload directory and the shell-less chroot. The technique requires the ability to craft and upload an ELF, knowledge of the target's ld.so and libc.so (the same musl binary here) to compute offsets and find gadgets, and the AARCH64 gadget hunt described above. Escaping the chroot is a separate problem that this technique does not solve by itself.

Fix

A noexec mount should not be relied on as the only control for an upload directory that is reachable by a service able to invoke execve. The report does not describe a specific patch.

Variants to test

  • Loader invocation on a noexec mount. Try /lib/ld.so /tmp/uploaded.bin with an ELF that has no PROT_EXEC segment. A positive result is the file being mapped successfully even though it cannot be executed directly.
  • Relative layout under ASLR. Compare the addresses of ld.so and the uploaded ELF across runs. A positive result is a constant offset between them, unlike normal ELF execution.
  • Relocation into writable data. Craft a relocation that writes a symbol address plus an addendum into a writable section of libc.so, such as the pointer used by an internal longjmp. A positive result is the loader writing your chosen value there.
  • Entry point redirection. Point the ELF entry at a chosen location inside libc.so rather than at your own segments. A positive result is control flow reaching that location.
  • Stack switch via longjmp. Overwrite the jmp_buf pointer with a structure whose saved stack pointer and link register you control. A positive result is the stack pointer moving to your ROP chain.
  • Full chain. Build a chain that mallocs, mprotects to executable, memcpys an embedded payload and jumps to it. A positive result is execution of a static ELF embedded in the uploaded file.

Written with AI from the full original report and checked against it passage by passage; anything it could not back up was removed or toned down. The original is the record. 18 min read.

What happened, in plain words

Imagine you find a way to upload files to someone else's computer and to ask that computer to run a command for you. That sounds like the game is over: you upload a program and it runs. This post is about the two locks the owner had put on the door, and how I got around both of them.

The first lock is a filesystem setting called noexec. A filesystem is the part of the computer that stores files, and noexec is a flag that says "files stored here may be read, but never run as programs". The second lock is a chroot: a way of putting a program inside a small fake root of the filesystem, so it can only see a handful of files and folders, and in this case there is no shell (no command interpreter) inside that little world. So the easy trick of uploading a script and asking the shell to run it is not available.

I still managed to run my own code. The trick was not to run the uploaded file directly, but to use the program that loads other programs (the dynamic loader, ld.so) and the shared library that every program uses (libc.so). I made the loader load my file without ever marking it executable, then made it jump into code that already existed in libc.so, and from there built a chain of small existing code fragments (a ROP chain) that finally ran a program I had hidden inside the uploaded file.

I do not claim this is a brand new technique. It is just something I had not been aware of before.

Context

This post describes how I bypassed a noexec mount option inside a limited, chrooted environment. The scenario is a common one after finding a vulnerability in a service: you can upload a file, and you have the opportunity to execve a string you provide. It looks like the work is done.

A few words on those terms, because everything later depends on them:

  • A vulnerability is a mistake in a program that lets someone use it in a way its author did not intend.
  • execve is the system call (the low-level request a program makes to the operating system) that asks the kernel to start running a program. If a service lets you choose the string it passes to execve, you effectively choose what program gets started.
  • A mount option is a setting applied when a filesystem is attached to the directory tree. noexec is one of them.
  • A chroot changes what a process sees as the root of the filesystem. Inside it, paths like /bin/sh may simply not exist.

It is not done. The service is limited in practice. The upload directory is a tmpfs mounted with the noexec option, and the service runs in a chrooted environment with no shell, so there is no /bin/sh -c /tmp/upload/myscript.sh to fall back on.

A tmpfs is a filesystem that lives in memory rather than on a disk. It is fast and it disappears when the machine reboots, which is why services often use it for temporary uploads. The noexec flag on it means the kernel will refuse to run programs stored there.

The target here is the software I had found a vulnerability in; the goal is to get code execution despite those two restrictions. I do not claim this is a new approach or something never seen before, just something I was not aware of.

Setup

The environment has a few properties that matter for everything that follows:

  • The upload directory is a tmpfs with the noexec mount option.
  • The service runs inside a chroot with no shell available.
  • The applications provided in the chroot are dynamic executables, so ld.so and libc.so are reachable. In this system they are the same musl binary.
  • The relocation types and gadgets later in the post are AARCH64.

Three of those need explaining.

A dynamic executable is a program that does not contain all of its own code. At start-up it asks a separate program, the dynamic loader (here ld.so), to bring in shared libraries it needs. A shared library is a file full of ready-made functions that many programs can use at the same time; libc.so is the standard C library, containing basics such as memory allocation and string copying. musl is one particular implementation of that standard library, and on this system the loader and the C library are the same file.

AARCH64 is the name of the 64-bit instruction set used by ARM processors, the kind found in many phones and in some servers. It matters because the small code fragments used later, and the way addresses are written into memory, are specific to that instruction set.

Finding it

My first attempt was the obvious one: upload an ELF into the tmpfs and run it through the loader, /lib/ld.so /tmp/uploaded.bin, to get around the missing execute permission on the file.

An ELF is the standard file format for programs and libraries on Linux and similar systems. When you run a program, the kernel reads an ELF file and sets it up in memory. The command above asks the loader to load the file named /tmp/uploaded.bin and start it, instead of asking the kernel to run it directly.

That used to be a classical noexec bypass, but kernels nowadays refuse to mmap part of a file on a non-exec filesystem with the PROT_EXEC flag set, so this did not work.

mmap is the system call that maps a file (or a region of memory) into a process's address space, so the process can read it as if it were memory. PROT_EXEC is one of the permission flags you can ask for when mapping: it means "code in this region may be executed". Modern kernels check the filesystem's noexec flag and refuse to grant PROT_EXEC for file-backed pages from such a filesystem. So the old trick is dead.

While playing with ld.so, I noticed something more interesting: the memory locations of ld.so and of the uploaded ELF file, although randomised by ASLR, were fixed relative to each other. That is not the case when an ELF is executed the normal way.

ASLR (Address Space Layout Randomisation) is a defence that places programs and libraries at unpredictable addresses each time they start, so an attacker cannot hard-code an address. "Fixed relative to each other" means that although both addresses change from run to run, the distance between them stays the same. If you learn one address, you can compute the other. That is a big deal, because it removes much of the value of ASLR for this pair of files.

The second observation is that even though my ELF binary is non-executable and therefore never executed, it can still be loaded. You only have to make sure it has no PROT_EXEC segment, and both ld.so and the kernel will happily map it.

A segment here means a chunk of the ELF file that gets mapped into memory with certain permissions: readable, writable, executable, or a combination. If none of the segments asks for execute permission, the kernel is willing to map the file even from a noexec filesystem. The file is then present in memory as data, not as runnable code.

Once loaded, the last thing ld.so normally does is branch to your entry point. Since the segments have been made non-executable, that branch fails miserably. That is the point where a non-executable, writable address space calls for ROP.

The entry point is the address inside a program where execution is supposed to begin. The loader finishes its work by jumping there. If that address points at memory that is not marked executable, the processor refuses and the process crashes.

ROP stands for Return-Oriented Programming. The idea: you cannot write new executable code, but the program already has plenty of executable code in its libraries. You find short snippets of that existing code, called gadgets, each ending in an instruction that returns to an address taken from the stack. By laying out a list of such addresses on the stack, you make the program perform a sequence of small actions of your choosing. It is like not being allowed to bring your own tools into a workshop, but being allowed to point at the workshop's existing tools in a particular order.

Exploitation

Step 1: point the entry point into libc

Because the loaded ELF and libc.so sit at a static offset from each other, a little arithmetic lets us tell ld.so that our entry point is far away from our loaded segments, inside the .text section of libc.so. That works.

The .text section of a library is the part that holds its machine code, and it is mapped as executable. So instead of pointing the entry point at my own non-executable file, I point it at code that is already allowed to run. The arithmetic is possible only because of the fixed relative layout noticed earlier.

The remaining problem is choosing where to jump. A full ROP chain needs to be built on the stack, and the stack at the entry point is not adapted to that: we only have a pointer to the argv and env strings there. The best chance would be a single gadget that swaps the stack to a memory region we control, but with the libc.so I was targeting that turned out to be difficult without a little more help.

The stack is the region of memory a program uses for short-lived bookkeeping: return addresses, local variables, saved registers. A ROP chain is a list of addresses placed on the stack, so to run one you need the stack pointer to point at your list. argv and env are the list of command-line arguments and the list of environment variables that the operating system hands to a new program. At the entry point, the stack holds pointers to those strings, not a layout I control. A stack pivot is a gadget whose only job is to move the stack pointer to a place the attacker controls; finding one in this libc.so was hard.

Step 2: use longjmp to switch stacks

A very suitable function for switching the stack is longjmp, which restores an executable context. There are already calls to it inside ld.so:

Text
FUN_00148920("Error recording dependencies for %s", lVar9);
if (DAT_001919e8 != 0) {
        /* WARNING: Subroutine does not return */
          longjmp(DAT_001919e0,1);
}

Line by line:

  1. FUN_00148920("Error recording dependencies for %s", lVar9); calls a function that prints an error message about recording dependencies. The %s is a placeholder for a string, and lVar9 is the value substituted there. The name FUN_00148920 is what a decompiler shows when it has no symbol name for that function.
  2. if (DAT_001919e8 != 0) { checks a global variable. DAT_001919e8 is a decompiler name for a piece of data at a known address, and the check means "if this flag is set".
  3. The comment /* WARNING: Subroutine does not return */ is the decompiler telling us that the next call never comes back to this point.
  4. longjmp(DAT_001919e0,1); calls longjmp with a pointer stored in the global DAT_001919e0 and the value 1.

What is longjmp? In C, setjmp saves the current execution context (roughly, where the stack is and where to continue) into a structure called a jmp_buf, and longjmp later restores it, jumping back to that saved point. Because restoring the context includes restoring the stack pointer, longjmp is effectively a stack switch built into the library. That is exactly the primitive I needed.

What matters is that the pointer to the structure used for the longjmp call is a writable global. In other words, the address DAT_001919e0 holds a pointer, and that pointer lives in memory the program is allowed to write to. If I can change that pointer, I can make longjmp restore a context that I chose, including a stack pointer pointing at my own ROP chain.

Step 3: abuse relocations to overwrite that pointer

ELF loading involves relocations. A relocation tells the loader, in effect, "I will need this function, please write its position here so that I can use it". You can even add an addendum to the position of the symbol you want the loader to inform you about.

A relocation is an instruction inside an ELF file that says "at this place in memory, write the address of that symbol, possibly plus a small constant". It exists because a shared library does not know in advance where it will be loaded, so the loader has to fill in the real addresses at start-up. A symbol is a named thing in a library, such as a function. The addendum is the small constant added to the symbol's address before writing it.

The same trick used for the entry point works here: we can make the loader write the address of symbol_a plus an addendum into the writable .data section of libc.so, for example at the position of the pointer used during the longjmp call. A relocation of that shape looks like this:

Text
fffffffffe7fd9e0  001800000101 R_AARCH64_ABS64   000000000000000 puts

Reading this line from left to right:

  1. fffffffffe7fd9e0 is the address where the loader will write the result.
  2. 001800000101 is a set of bookkeeping bits describing the relocation.
  3. R_AARCH64_ABS64 is the relocation type: write a 64-bit absolute address, on AARCH64.
  4. 000000000000000 puts is the symbol whose address is to be written, here the C library function puts.

So this relocation means: "write the address of puts at fffffffffe7fd9e0". If I can craft a relocation of my own, I can choose both the destination and the symbol.

Even better, the loader can be made to have the relocation point to our own object:

Text
struct init_stack rop_exec_stack = {
  .sp = &rop_stack.rop_chain,
  .x30 = GADGET(START_STACK_GADGET),
};

void *address_of_rtld_fail = (void*)&rop_exec_stack;

Line by line:

  1. struct init_stack rop_exec_stack = { starts the definition of a variable named rop_exec_stack, of a structure type called init_stack, and opens the list of its initial values.
  2. .sp = &rop_stack.rop_chain, sets the field named sp (stack pointer) to the address of rop_stack.rop_chain, which is where my ROP chain lives.
  3. .x30 = GADGET(START_STACK_GADGET), sets the field named x30 to a gadget. x30 is the AARCH64 register that holds the return address, so this is where execution continues after the stack switch.
  4. }; closes the definition.
  5. void *address_of_rtld_fail = (void*)&rop_exec_stack; takes the address of that structure and stores it in a pointer variable. The name suggests it is meant to replace the pointer the loader uses when it reports a failure.

After patching the ELF, the relocation reads:

Text
fffffffffe7fd9e0  001800000101 R_AARCH64_ABS64  0000000000186140 \
                                                rop_exec_stack + 0

This is the same relocation as before, but now the symbol is rop_exec_stack instead of puts, and the addendum is 0. The backslash at the end of the first line is just a way of continuing a long line onto the next one. The effect: the loader writes the address of my own structure into the writable global that longjmp will use.

Now we only have to point the entry point at the call to longjmp, and our first and only gadget has everything done for us: the stack pointer is set to our ROP chain, which we can carefully write at this stage.

In other words, the entry point lands on the longjmp call inside ld.so. That call reads the pointer I just overwrote, finds my structure, restores the stack pointer to my ROP chain, and returns to the gadget I put in x30. From there, the chain runs.

Step 4: build the chain

Finding suitable gadgets is very time consuming, especially on AARCH64 as I found. The loader can still be used to have it calculate values and offsets for us.

After some amount of time I was able to write a ROP chain that:

  1. mallocs a huge buffer,
  2. mprotects it to make it executable,
  3. memcpys a payload embedded in the uploaded .bin file,
  4. and jumps into it.

Those four steps in plain words:

  1. malloc asks the C library for a block of memory of a given size. A huge buffer gives room for the payload.
  2. mprotect changes the permissions on a region of memory. Calling it on the buffer makes that memory executable, which is allowed because the buffer is ordinary anonymous memory, not a file on the noexec filesystem.
  3. memcpy copies bytes from one place to another. Here it copies the payload, which was embedded inside the uploaded .bin file, into the freshly executable buffer.
  4. Jumping into the buffer starts running the payload.

It is then easy, easy once done, to embed a static ELF in our payload and have it executed.

A static ELF is a program that carries all of its own code and does not need the loader to bring in shared libraries at start-up. That makes it a convenient thing to hide inside a payload: once the payload is running, it can start the static ELF without depending on anything else in the chroot.

From the original on blog.xilokar.info

With that, the next step would be working on escaping the chroot, but that is another story.

Root cause

It only prevents the kernel from mapping file-backed pages with PROT_EXEC. It does not prevent the loader from mapping the file without execute permission, and it does not prevent the loader from being pointed at executable code that already exists elsewhere in the address space, here libc.so.

Two properties of the environment make the bypass practical. First, ld.so and the uploaded ELF keep a fixed relative layout under ASLR, so a computed entry point inside libc.so is reliable. Second, ld.so performs relocations into writable data, including a writable global that holds the pointer used by its own longjmp call, which gives an attacker-controlled stack switch without needing a stack pivot gadget.

The chroot and the missing shell raise the bar but do not remove the primitive: once a static ELF can be executed from the payload, the restrictions of the chroot are the next obstacle rather than a barrier to code execution.

Impact

In this case, being able to upload a file and influence the string passed to execve was enough to obtain code execution despite the noexec upload directory and the shell-less chroot. The technique requires the ability to craft and upload an ELF, knowledge of the target's ld.so and libc.so (the same musl binary here) to compute offsets and find gadgets, and the AARCH64 gadget hunt described above. Escaping the chroot is a separate problem that this technique does not solve by itself.

Fix

A noexec mount should not be relied on as the only control for an upload directory that is reachable by a service able to invoke execve. The report does not describe a specific patch.

Variants to test

  • Loader invocation on a noexec mount. Try /lib/ld.so /tmp/uploaded.bin with an ELF that has no PROT_EXEC segment. A positive result is the file being mapped successfully even though it cannot be executed directly.
  • Relative layout under ASLR. Compare the addresses of ld.so and the uploaded ELF across runs. A positive result is a constant offset between them, unlike normal ELF execution.
  • Relocation into writable data. Craft a relocation that writes a symbol address plus an addendum into a writable section of libc.so, such as the pointer used by an internal longjmp. A positive result is the loader writing your chosen value there.
  • Entry point redirection. Point the ELF entry at a chosen location inside libc.so rather than at your own segments. A positive result is control flow reaching that location.
  • Stack switch via longjmp. Overwrite the jmp_buf pointer with a structure whose saved stack pointer and link register you control. A positive result is the stack pointer moving to your ROP chain.
  • Full chain. Build a chain that mallocs, mprotects to executable, memcpys an embedded payload and jumps to it. A positive result is execution of a static ELF embedded in the uploaded file.

Glossary

  • AARCH64: the 64-bit instruction set used by ARM processors; the architecture of the target in this post.
  • Addendum: a small constant added to a symbol's address when a relocation is applied.
  • ASLR: Address Space Layout Randomisation; a defence that places programs and libraries at unpredictable addresses at start-up.
  • argv: the list of command-line arguments passed to a program.
  • Chroot: a way of changing what a process sees as the root of the filesystem, limiting which files it can reach.
  • Dynamic executable: a program that relies on a loader to bring in shared libraries at start-up.
  • Dynamic loader (ld.so): the program that loads shared libraries and prepares a dynamic executable to run.
  • ELF: the standard file format for programs and libraries on Linux-like systems.
  • Entry point: the address where a program's execution begins.
  • env: the list of environment variables passed to a program.
  • execve: the system call that asks the kernel to start running a program.
  • Gadget: a short snippet of existing executable code, usually ending in a return, used as a building block in a ROP chain.
  • jmp_buf: the C structure in which setjmp saves an execution context for longjmp to restore.
  • libc.so: the standard C library, a shared library providing common functions such as memory allocation and string copying.
  • longjmp: a C library function that restores a context saved by setjmp, effectively jumping back and restoring the stack pointer.
  • malloc: a C library function that reserves a block of memory.
  • memcpy: a C library function that copies bytes from one memory region to another.
  • mmap: the system call that maps a file or memory region into a process's address space.
  • Mount option: a setting applied when a filesystem is attached to the directory tree, such as noexec.
  • mprotect: the system call that changes the permissions (read, write, execute) of a region of memory.
  • musl: one implementation of the standard C library; here the loader and the C library are the same musl binary.
  • noexec: a mount option that prevents programs stored on that filesystem from being executed.
  • PROT_EXEC: the mmap permission flag meaning that code in the mapped region may be executed.
  • Relocation: an instruction in an ELF file telling the loader to write a symbol's address (plus an addendum) at a given place in memory.
  • ROP (Return-Oriented Programming): building a sequence of actions by chaining existing code gadgets through return addresses placed on the stack.
  • Segment: a chunk of an ELF file mapped into memory with particular permissions.
  • Shared library: a file of ready-made functions that many programs can use at the same time.
  • Stack: the memory region a program uses for return addresses, local variables and saved registers.
  • Stack pivot: a gadget that moves the stack pointer to a region the attacker controls.
  • Static ELF: a program that contains all of its own code and does not need shared libraries at start-up.
  • Symbol: a named item, such as a function, inside a library.
  • .text section: the part of a library or program that holds its machine code and is mapped executable.
  • tmpfs: a filesystem that lives in memory rather than on disk.
  • Vulnerability: a mistake in a program that lets it be used in a way its author did not intend.

Similar reports

View all

Same bug class and techniques, clearest first.

Remote code execution

The lesson behind this report.

Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.