For faster navigation, this Iframe is preloading the Wikiwand page for Return-to-libc攻击.

Return-to-libc攻击


此条目翻译自其他语言维基百科,需要相关领域的编者协助校对翻译。如果您精通本领域,又能清楚地将来源语言翻译为中文,欢迎您协助校订翻译。原文参见维基数据

Return-to-libc攻击(缩写:ret2libc),即“返回至C标准库攻击”,是一种电脑安全攻击。这种攻击方式一般应用于缓冲区溢出中,其堆栈中的返回地址被替换为另一条指令的地址,并且堆栈的一部分被覆盖以提供其参数。这允许攻击者调用现有函数而无需注入恶意代码到程序中。

缩写为libc的共享库是C标准函数库,提供了类UNIX操作系统中的C运行时支持。尽管攻击者可以让代码返回到任意位置,但绝大多数情况下的目标都是libc。这是因为libc总是会被链接到程序中,并且它提供了对攻击者而言一些相当有用的函数(如system()调用可以只附加一个参数即执行外部程序)。这即是尽管返回地址可以指向另一个完全不同的区域,但这种攻击仍被称为return-to-libc的原因。

对 return-to-libc 攻击的防护

一个被标记了不可执行位的堆栈可以阻止一些缓冲区溢出攻击,但无论如何它无法防止return-to-libc攻击。因为return-to-libc攻击只用到了标记为可执行的代码(libc中的函数均为可执行)。当然,攻击者也只能够调用已存在的函数。Stack-smashing 防护能够阻止这种溢出,因为它可以检测到损坏的堆栈并且有可能移除被攻击的(segment)。地址空间布局随机化 (ASLR)使这种攻击在64位平台上变得几乎不可能成功,因为所有函数的内存地址都是随机的。在32位系统中,ASLR能够提供部分防护,因为只有16位地址可供用于随机化,这可以用暴力攻击在很少的几分钟内破解。[1]

相关攻击

面向返回编程 是这种攻击使用的精心完成的技术,并且,通过串联起每次单独的小型攻击以执行小数目的指令,可被用于进行更一般的操作。

参见

参考资料

  1. ^ Shacham, Hovav; Page, Matthew; Pfaff, Ben; Goh, Eu-Jin; Modadugu, Nagendra; and Boneh, Dan. On the Effectiveness of Address-Space Randomization (PDF). Proceedings of Computer and Communications Security (CCS'04), October 25–29, 2004, Washington (DC). [2011-07-22]. (原始内容存档 (PDF)于2011-09-15). 

外部链接

{{bottomLinkPreText}} {{bottomLinkText}}
Return-to-libc攻击
Listen to this article

This browser is not supported by Wikiwand :(
Wikiwand requires a browser with modern capabilities in order to provide you with the best reading experience.
Please download and use one of the following browsers:

This article was just edited, click to reload
This article has been deleted on Wikipedia (Why?)

Back to homepage

Please click Add in the dialog above
Please click Allow in the top-left corner,
then click Install Now in the dialog
Please click Open in the download dialog,
then click Install
Please click the "Downloads" icon in the Safari toolbar, open the first download in the list,
then click Install
{{::$root.activation.text}}

Install Wikiwand

Install on Chrome Install on Firefox
Don't forget to rate us

Tell your friends about Wikiwand!

Gmail Facebook Twitter Link

Enjoying Wikiwand?

Tell your friends and spread the love:
Share on Gmail Share on Facebook Share on Twitter Share on Buffer

Our magic isn't perfect

You can help our automatic cover photo selection by reporting an unsuitable photo.

This photo is visually disturbing This photo is not a good choice

Thank you for helping!


Your input will affect cover photo selection, along with input from other users.

X

Get ready for Wikiwand 2.0 🎉! the new version arrives on September 1st! Don't want to wait?