启用 ASLR 后,图像的所有部分是否每次都以相对于图像基址的相同偏移量加载
With ASLR turned on, are all sections of an image get loaded at the same offsets relative to the image base address every time?
libc
的不同部分(例如.text
、.plt
、.got
、.bss
、.rodata
等(是否每次都以相对于libc
基址的相同偏移量加载?
我知道每次运行程序时,加载程序都会在随机位置加载libc
。
提前谢谢你。
我想我找到了自己问题的答案。我使用英特尔 PIN 编写了一个引脚工具,该工具在每个libc
加载时输出相对于libc
地址的部分偏移量。以下是以相同的偏移量加载的部分及其相应的偏移量(-
之前的内容是与其版本libc
的库名称,之后是部分名称(:
libc.so.6-.note.gnu.build-id 0x0000000000000270
libc.so.6-.note.ABI-tag 0x0000000000000294
libc.so.6-.gnu.hash 0x00000000000002b8
libc.so.6-.dynsym 0x0000000000003d80
libc.so.6-.dynstr 0x0000000000010ff8
libc.so.6-.gnu.version 0x00000000000169d8
libc.so.6-.gnu.version_d 0x0000000000017b68
libc.so.6-.gnu.version_r 0x0000000000017ee0
libc.so.6-.rela.dyn 0x0000000000017f10
libc.so.6-.rela.plt 0x000000000001f680
libc.so.6-.plt 0x000000000001f7c0
libc.so.6-.plt.got 0x000000000001f8a0
libc.so.6-.text 0x000000000001f8b0
libc.so.6-__libc_freeres_fn 0x0000000000172b10
libc.so.6-__libc_thread_freeres_fn 0x0000000000175030
libc.so.6-.rodata 0x0000000000175300
libc.so.6-.stapsdt.base 0x0000000000196650
libc.so.6-.interp 0x0000000000196660
libc.so.6-.eh_frame_hdr 0x000000000019667c
libc.so.6-.eh_frame 0x000000000019bb38
libc.so.6-.gcc_except_table 0x00000000001bc3cc
libc.so.6-.hash 0x00000000001bc810
libc.so.6-.tdata 0x00000000003c07c0
libc.so.6-.tbss 0x00000000003c07d0
libc.so.6-.init_array 0x00000000003c07d0
libc.so.6-__libc_subfreeres 0x00000000003c07e0
libc.so.6-__libc_atexit 0x00000000003c08d8
libc.so.6-__libc_thread_subfreeres 0x00000000003c08e0
libc.so.6-.data.rel.ro 0x00000000003c0900
libc.so.6-.dynamic 0x00000000003c3ba0
libc.so.6-.got 0x00000000003c3d80
libc.so.6-.got.plt 0x00000000003c4000
libc.so.6-.data 0x00000000003c4080
libc.so.6-.bss 0x00000000003c5720
而且确实有一些部分每次都以不同的偏移量加载。您可能会在下面看到它们。但是,由于我不认识它们并且对我来说并不重要,因此我想得出结论,是的,每次程序运行时,我们最关心的部分都会以相同的偏移量加载。
libc.so.6-.note.stapsdt
libc.so.6-.gnu.warning.sigstack
libc.so.6-.gnu.warning.sigreturn
libc.so.6-.gnu.warning.siggetmask
libc.so.6-.gnu.warning.tmpnam
libc.so.6-.gnu.warning.tmpnam_r
libc.so.6-.gnu.warning.tempnam
libc.so.6-.gnu.warning.sys_errlist
libc.so.6-.gnu.warning.sys_nerr
libc.so.6-.gnu.warning.gets
libc.so.6-.gnu.warning.getpw
libc.so.6-.gnu.warning.re_max_failures
libc.so.6-.gnu.warning.lchmod
libc.so.6-.gnu.warning.getwd
libc.so.6-.gnu.warning.sstk
libc.so.6-.gnu.warning.revoke
libc.so.6-.gnu.warning.mktemp
libc.so.6-.gnu.warning.gtty
libc.so.6-.gnu.warning.stty
libc.so.6-.gnu.warning.chflags
libc.so.6-.gnu.warning.fchflags
libc.so.6-.gnu.warning.__compat_bdflush
libc.so.6-.gnu.warning.__memset_zero_constant_len_parameter
libc.so.6-.gnu.warning.__gets_chk
libc.so.6-.gnu.warning.inet6_option_space
libc.so.6-.gnu.warning.inet6_option_init
libc.so.6-.gnu.warning.inet6_option_append
libc.so.6-.gnu.warning.inet6_option_alloc
libc.so.6-.gnu.warning.inet6_option_next
libc.so.6-.gnu.warning.inet6_option_find
libc.so.6-.gnu.warning.getmsg
libc.so.6-.gnu.warning.putmsg
libc.so.6-.gnu.warning.fattach
libc.so.6-.gnu.warning.fdetach
libc.so.6-.gnu.warning.setlogin
libc.so.6-.gnu_debuglink
libc.so.6-.shstrtab
相关文章:
- C++,OpenCV,尝试显示图像时"OpenCV(4.3.0) Error: Assertion failed (size.width>0 && size.height>0)"此错误
- 如何在 OpenCV 中将图像与另一个图像相关联
- unique_ptr相对于shared_ptr的优势是什么
- int 相对于C++中主代码的目的
- SourceAddress 是否相对于 MmCopyVirtualMemory 中的 SourceProcess?
- 相对于类statics的基元全局的生存期
- 实现现有的网络接口,以相对于C 11中的Endianess定义位字段
- 如何添加相对于QTABBAR中标签的位置的小部件
- 相对于 3D 应用程序中的 Windows 消息循环的计时错误
- §12.3.2 [class.conv.fct]/1 in C++1z 相对于 C++14 发生了重大变化。有意义吗?
- 相对于 cpp 不工作目录的路径
- 使用原生C++Qt相对于PyQt有什么优势?
- 打开相对于chromium.exe的文件
- msvcr100相对于msvcrt的优势
- at()函数相对于get(ch)的必要性
- unique_ptr相对于auto_ptr的优点
- c++中std::thread相对于pthread的优势
- QImage::operator==对于具有相同内容的图像是否返回false ?
- 直方图对于深色图像不准确
- 哈希,相对于x,y位置的多边形