Return-to-libc attack

Return-to-libc attack

A return-to-libc attack is a computer security attack usually starting with a buffer overflow in which the return statement on the stack is replaced by the address of another instruction and an additional portion of the stack is overwritten to provide arguments to this function. This allows attackers to call preexisting functions without the need to inject malicious code into a program.

The shared library called "libc" provides the C runtime on UNIX style systems. Although the attacker could make the code return anywhere, libc is the most likely target, as it is always linked to the program, and it provides useful calls for an attacker (such as the system() call to execute an arbitrary program, which needs only one argument). This is why the exploit is called "return-to-libc" even when the return address may point to a completely different location.

Protection from return-to-libc attacks

A non-executable stack can prevent some buffer overflows but not a return-to-libc attack because in the return-to-libc attack only existing executable code is used. On the other hand these attacks can only call preexisting functions. Stack-smashing protection can prevent or obstruct exploitation as it can detect the corruption of the stack and possibly flush out the compromised segment. Address Space Layout Randomization (ASLR) makes this type of attack extremely unlikely to succeed on 64-bit machines as the memory locations of functions are random; however Shacham et al show that on 32-bit machines ASLR provides little benefit.

ee also

* Buffer Overflow
* Stack buffer overflow
* Stack-smashing protection
* No eXecute (NX) bit
* Address space layout randomization

References

*

External links

* [http://www.infosecwriters.com/text_resources/pdf/return-to-libc.pdf Bypassing non-executable-stack during exploitation using return-to-libc] by c0ntex at InfoSecWriters.com


Wikimedia Foundation. 2010.

Игры ⚽ Нужно сделать НИР?

Look at other dictionaries:

  • Return-to-libc attack — Une attaque de type return to libc est une attaque informatique démarrant généralement par un dépassement de tampon dans lequel l adresse de retour dans la pile est remplacée par l adresse d une autre fonction et une seconde partie de la pile est …   Wikipédia en Français

  • PaX — In computer security, PaX is a patch for the Linux kernel that implements least privilege protections for memory pages. The least privilege approach allows computer programs to do only what they have to do in order to be able to execute properly …   Wikipedia

  • Buffer overflow — In computer security and programming, a buffer overflow, or buffer overrun, is an anomalous condition where a process attempts to store data beyond the boundaries of a fixed length buffer. The result is that the extra data overwrites adjacent… …   Wikipedia

  • Атака возврата в библиотеку — (англ. Return to libc attack)  один из видов компьютерных атак, популярных на x86 совместимых машинах и схожих с ними, связанных с переполнением буфера, когда адрес возврата функции на стеке подменяется адресом иной функции в программе …   Википедия

  • PAX — Pour les articles homonymes, voir Pax. PaX a sa propre version de la mascotte de Linux, Tux PaX est un patch de sécurité pour le …   Wikipédia en Français

  • Address space layout randomization — (ASLR) is a computer security technique which involves randomly arranging the positions of key data areas, usually including the base of the executable and position of libraries, heap, and stack, in a process s address space. Benefits Address… …   Wikipedia

  • Executable space protection — In computer security, executable space protection is the marking of memory regions as non executable, such that an attempt to execute machine code in these regions will cause an exception. It makes use of hardware features such as the NX bit.The… …   Wikipedia

  • Position-independent code — In computing, position independent code (PIC) or position independent executable (PIE) is machine instruction code that executes properly regardless of where in memory it resides. PIC is commonly used for shared libraries, so that the same… …   Wikipedia

  • PaX — Pour les articles homonymes, voir Pax. PaX a sa propre version de la mascotte de Linux, Tux PaX est un correctif (patch) de sécurité pour le noyau Linux cr …   Wikipédia en Français

  • Exploit (Informatique) — Cet article fait partie de la série Programmes malveillants Virus Cabir MyDoom.A Tchernobyl …   Wikipédia en Français

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”