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通过shell终端执行命令。此场景下,/bin/bash就是这个parent process,而要执行的那个命令就是new process。
Linux有一些特性,可以使得创建出的进程比拉起的进程权限高。例如可执行文件配置了set-user-ID位,则拉起的进程就是root权限,而其父进程有可能是普通用户权限。如果可执行文件配置了file capability,则创建出的进程就具备了某些capability,如果父进程没有这些capability,则这也是一种权限放大的场景。
当发生这种权限放大的场景时,Linux的安全特性要求,此时子进程中的某些敏感环境变量会被清空,例如:LD_PRELOAD,LD_LIBRARY_PATH。由于这些环境变量都是从父进程继承过来的,如果不清空,则表明会使用高权限级别执行这些环境变量指定的可执行代码。

LD_LIBRARY_PATH

参考文献[1],ld.so搜索动态库的顺序如下:

  1. DT_PATH指定的库文件(deprecated)
  2. LD_LIBRARY_PATH指定的库文件
  3. DT_RUNPATH指定的库文件
  4. /etc/ld.so.cache这个二进制文件指定的库文件,该文件通过ldconfig命令生成
  5. In the default path /lib, and then /usr/lib. (On some 64-bit architectures, the default paths for 64-bit shared objects are /lib64, and then /usr/lib64.) If the binary was linked with the -z nodeflib linker option, this step is skipped.

所以针对LD_LIBRARY_PATH,除了第二条的方法失效,其他的都可以用。

LD_PRELOAD

那针对LD_PRELOAD,是不是就没法用呢?其实也不是。
在没有setcap以及set-user-ID的情况下,如果ld.so需要预加载一个库文件,指定方法在文献[1]中同样有描述:

  1. The LD_PRELOAD environment variable.
  2. The --preload command-line option when invoking the dynamic linker directly.
  3. The /etc/ld.so.preload file.

在secure-execution模式下,方法2和方法3均不受影响。方法1也仍然可以使用。但是需要一些特殊的设置,在[1]中也有描述。

In secure-execution mode, preload pathnames containing slashes are ignored. Furthermore, shared objects are preloaded only from the standard search directories and only if they have set-user-ID mode bit enabled (which is not typical).

综上,需要3点配置:

  • LD_PRELOAD环境变量指定的库文件不能包含斜线'/'
  • 库文件只会从标准路径下加载。这里标准路径可以参考LD_LIBRARY_PATH中的描述。注意,此时ld.so只会搜索标准路径,不会搜索通过其他手段配置的路径(如上一节描述的)。
  • 库文件必须使能了set-user-id位

示例代码

代码目录树:

[ben@localhost test]$ tree .
.
├── lib.c
├── libtest.so
├── main
├── main.c
├── test
└── test.c

main.c生成main可执行程序,test.c生成test可执行程序,lib.c生成libtest.so。

// main.c

#include <stdio.h>
#include <unistd.h>
#include <sys/wait.h>

int main()
{
        pid_t pid = fork();
        if (pid == 0) {
                char *envp[] = {
                        "LD_PRELOAD=libtest.so",
                        // "LD_PRELOAD=./libtest.so",
                        NULL
                };
                char *argv[] = {
                        "test",
                        NULL
                };
                int err = execve("./test", argv, envp);
        }
        else {
                int status;
                wait(&status);
        }
        return 0;
}

// test.c
#include <stdio.h>
#include <stdlib.h>

int main ()
{
        const char *preload = getenv("LD_PRELOAD");
        printf("LD_PRELOAD = %s\n", preload);
        return 0;
}

// lib.c
#include <stdio.h>

static void func(void) __attribute__((constructor));
void func(void)
{
        printf("I'm libtest.so loaded\n");
}

在test可执行程序是普通的二进制时,输出为

[ben@localhost test]$ ./main
I'm libtest.so loaded
LD_PRELOAD = ./libtest.so

当test配置了capability以后:

[ben@localhost test]$ sudo setcap cap_net_admin,cap_net_raw=eip ./test
[ben@localhost test]$ ./main
LD_PRELOAD = (null)

可见LD_PRELOAD指定libtest.so未被加载,且LD_PRELOAD环境变量被清空了。

LD_PRELOAD不含斜线

[ben@localhost test]$ ./main
ERROR: ld.so: object 'libtest.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
LD_PRELOAD = (null)

LD_PRELOAD仍然被清空了,但ld.so似乎尝试去加载libtest.so了,但是没找着。

将libtest.so放入标准路径

如果没有配置set-user-id位:

[ben@localhost test]$ ./main
ERROR: ld.so: object 'libtest.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
LD_PRELOAD = (null)

仍然提示找不到。如果设置了set-user-id位:

[ben@localhost test]$ sudo chmod a+s /usr/lib64/libtest.so 
[ben@localhost test]$ ./main
I'm libtest.so loaded
LD_PRELOAD = (null)

在满足上一节提到的3个条件时,libteso.so就可以正常加载了。
看看如果放到/usr/lib下面会怎么样?

[ben@localhost test]$ ls /usr/lib/libtest.so -l
-rwsr-sr-x. 1 root root 8208 1月  24 19:48 /usr/lib/libtest.so
[ben@localhost test]$ ./main
ERROR: ld.so: object 'libtest.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
LD_PRELOAD = (null)

看看还是一样找不到。可见在x64平台上,/usr/lib并非标准路径,而/usr/lib64以及/lib64才是

参考文献

[1] ld.so(8) — Linux manual page

[2] Stackoverflow - Does using linux capabilities disables LD_PRELOAD

%E5%9C%A8Linux%E4%B8%AD%EF%BC%8C%E4%B8%80%E4%B8%AA%E8%BF%9B%E7%A8%8B%E6%8B%89%E8%B5%B7%E5%8F%A6%E4%B8%80%E4%B8%AA%E8%BF%9B%E7%A8%8B%E7%9A%84%E6%B5%81%E7%A8%8B%E5%A4%A7%E8%87%B4%E5%A6%82%E4%B8%8B%EF%BC%9A%0A%60%60%60mermaid%0Agraph%20LR%0AF%5Bparent%20process%5D%20--%3E%20A%5Bstart%5D%0AA%20--fork--%3E%20B%5Bchild%5D%0AA%20--%3E%20C%5Bwait%5D%0AB%20--exec--%3E%20D%5Bnew%20process%5D%0AD%20--%3E%20E%5Bend%5D%0AC%20--%3E%20E%0A%60%60%60%0A%E6%9C%80%E5%B8%B8%E8%A7%81%E7%9A%84%E5%B0%B1%E6%98%AF%E9%80%9A%E8%BF%87shell%E7%BB%88%E7%AB%AF%E6%89%A7%E8%A1%8C%E5%91%BD%E4%BB%A4%E3%80%82%E6%AD%A4%E5%9C%BA%E6%99%AF%E4%B8%8B%EF%BC%8C%2Fbin%2Fbash%E5%B0%B1%E6%98%AF%E8%BF%99%E4%B8%AAparent%20process%EF%BC%8C%E8%80%8C%E8%A6%81%E6%89%A7%E8%A1%8C%E7%9A%84%E9%82%A3%E4%B8%AA%E5%91%BD%E4%BB%A4%E5%B0%B1%E6%98%AFnew%20process%E3%80%82%0ALinux%E6%9C%89%E4%B8%80%E4%BA%9B%E7%89%B9%E6%80%A7%EF%BC%8C%E5%8F%AF%E4%BB%A5%E4%BD%BF%E5%BE%97%E5%88%9B%E5%BB%BA%E5%87%BA%E7%9A%84%E8%BF%9B%E7%A8%8B%E6%AF%94%E6%8B%89%E8%B5%B7%E7%9A%84%E8%BF%9B%E7%A8%8B%E6%9D%83%E9%99%90%E9%AB%98%E3%80%82%E4%BE%8B%E5%A6%82%E5%8F%AF%E6%89%A7%E8%A1%8C%E6%96%87%E4%BB%B6%E9%85%8D%E7%BD%AE%E4%BA%86set-user-ID%E4%BD%8D%EF%BC%8C%E5%88%99%E6%8B%89%E8%B5%B7%E7%9A%84%E8%BF%9B%E7%A8%8B%E5%B0%B1%E6%98%AFroot%E6%9D%83%E9%99%90%EF%BC%8C%E8%80%8C%E5%85%B6%E7%88%B6%E8%BF%9B%E7%A8%8B%E6%9C%89%E5%8F%AF%E8%83%BD%E6%98%AF%E6%99%AE%E9%80%9A%E7%94%A8%E6%88%B7%E6%9D%83%E9%99%90%E3%80%82%E5%A6%82%E6%9E%9C%E5%8F%AF%E6%89%A7%E8%A1%8C%E6%96%87%E4%BB%B6%E9%85%8D%E7%BD%AE%E4%BA%86file%20capability%EF%BC%8C%E5%88%99%E5%88%9B%E5%BB%BA%E5%87%BA%E7%9A%84%E8%BF%9B%E7%A8%8B%E5%B0%B1%E5%85%B7%E5%A4%87%E4%BA%86%E6%9F%90%E4%BA%9Bcapability%EF%BC%8C%E5%A6%82%E6%9E%9C%E7%88%B6%E8%BF%9B%E7%A8%8B%E6%B2%A1%E6%9C%89%E8%BF%99%E4%BA%9Bcapability%EF%BC%8C%E5%88%99%E8%BF%99%E4%B9%9F%E6%98%AF%E4%B8%80%E7%A7%8D%E6%9D%83%E9%99%90%E6%94%BE%E5%A4%A7%E7%9A%84%E5%9C%BA%E6%99%AF%E3%80%82%0A%E5%BD%93%E5%8F%91%E7%94%9F%E8%BF%99%E7%A7%8D%E6%9D%83%E9%99%90%E6%94%BE%E5%A4%A7%E7%9A%84%E5%9C%BA%E6%99%AF%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LD_LIBRARY_PATH%E6%8C%87%E5%AE%9A%E7%9A%84%E5%BA%93%E6%96%87%E4%BB%B6%0A3.%20DT_RUNPATH%E6%8C%87%E5%AE%9A%E7%9A%84%E5%BA%93%E6%96%87%E4%BB%B6%0A4.%20%2Fetc%2Fld.so.cache%E8%BF%99%E4%B8%AA%E4%BA%8C%E8%BF%9B%E5%88%B6%E6%96%87%E4%BB%B6%E6%8C%87%E5%AE%9A%E7%9A%84%E5%BA%93%E6%96%87%E4%BB%B6%EF%BC%8C%E8%AF%A5%E6%96%87%E4%BB%B6%E9%80%9A%E8%BF%87ldconfig%E5%91%BD%E4%BB%A4%E7%94%9F%E6%88%90%0A5.%20In%20the%20default%20path%20%2Flib%2C%20and%20then%20%2Fusr%2Flib.%20%20(On%20some%2064-bit%20architectures%2C%20the%20default%20paths%20for%2064-bit%20shared%20objects%20are%20%2Flib64%2C%20and%20then%20%2Fusr%2Flib64.)%20%20If%20the%20binary%20was%20linked%20with%20the%20-z%20nodeflib%20linker%20option%2C%20this%20step%20is%20skipped.%0A%0A%E6%89%80%E4%BB%A5%E9%92%88%E5%AF%B9LD_LIBRARY_PATH%EF%BC%8C%E9%99%A4%E4%BA%86%E7%AC%AC%E4%BA%8C%E6%9D%A1%E7%9A%84%E6%96%B9%E6%B3%95%E5%A4%B1%E6%95%88%EF%BC%8C%E5%85%B6%E4%BB%96%E7%9A%84%E9%83%BD%E5%8F%AF%E4%BB%A5%E7%94%A8%E3%80%82%0A%0A%23%20LD_PRELOAD%0A%E9%82%A3%E9%92%88%E5%AF%B9LD_PRELOAD%EF%BC%8C%E6%98%AF%E4%B8%8D%E6%98%AF%E5%B0%B1%E6%B2%A1%E6%B3%95%E7%94%A8%E5%91%A2%EF%BC%9F%E5%85%B6%E5%AE%9E%E4%B9%9F%E4%B8%8D%E6%98%AF%E3%80%82%0A%E5%9C%A8%E6%B2%A1%E6%9C%89setcap%E4%BB%A5%E5%8F%8Aset-user-ID%E7%9A%84%E6%83%85%E5%86%B5%E4%B8%8B%EF%BC%8C%E5%A6%82%E6%9E%9Cld.so%E9%9C%80%E8%A6%81%E9%A2%84%E5%8A%A0%E8%BD%BD%E4%B8%80%E4%B8%AA%E5%BA%93%E6%96%87%E4%BB%B6%EF%BC%8C%E6%8C%87%E5%AE%9A%E6%96%B9%E6%B3%95%E5%9C%A8%E6%96%87%E7%8C%AE%5B1%5D%E4%B8%AD%E5%90%8C%E6%A0%B7%E6%9C%89%E6%8F%8F%E8%BF%B0%EF%BC%9A%0A1.%20The%20%60LD_PRELOAD%60%20environment%20variable.%0A2.%20The%20%60--preload%60%20command-line%20option%20when%20invoking%20the%20dynamic%20linker%20directly.%0A3.%20The%20%60%2Fetc%2Fld.so.preload%60%20file.%0A%0A%E5%9C%A8secure-execution%E6%A8%A1%E5%BC%8F%E4%B8%8B%EF%BC%8C%E6%96%B9%E6%B3%952%E5%92%8C%E6%96%B9%E6%B3%953%E5%9D%87%E4%B8%8D%E5%8F%97%E5%BD%B1%E5%93%8D%E3%80%82%E6%96%B9%E6%B3%951%E4%B9%9F%E4%BB%8D%E7%84%B6%E5%8F%AF%E4%BB%A5%E4%BD%BF%E7%94%A8%E3%80%82%E4%BD%86%E6%98%AF%E9%9C%80%E8%A6%81%E4%B8%80%E4%BA%9B%E7%89%B9%E6%AE%8A%E7%9A%84%E8%AE%BE%E7%BD%AE%EF%BC%8C%E5%9C%A8%5B1%5D%E4%B8%AD%E4%B9%9F%E6%9C%89%E6%8F%8F%E8%BF%B0%E3%80%82%0A%3E%20In%20secure-execution%20mode%2C%20**preload%20pathnames%20containing%20slashes%20are%20ignored**.%20%20Furthermore%2C%20shared%20objects%20are%20preloaded%20**only%20from%20the%20standard%20search%20directories**%20and%20only%20if%20**they%20have%20set-user-ID%20mode%20bit%20enabled**%20(which%20is%20not%20typical).%0A%0A%E7%BB%BC%E4%B8%8A%EF%BC%8C%E9%9C%80%E8%A6%813%E7%82%B9%E9%85%8D%E7%BD%AE%EF%BC%9A%0A-%20LD_PRELOAD%E7%8E%AF%E5%A2%83%E5%8F%98%E9%87%8F%E6%8C%87%E5%AE%9A%E7%9A%84%E5%BA%93%E6%96%87%E4%BB%B6%E4%B8%8D%E8%83%BD%E5%8C%85%E5%90%AB%E6%96%9C%E7%BA%BF'%2F'%0A-%20%E5%BA%93%E6%96%87%E4%BB%B6%E5%8F%AA%E4%BC%9A%E4%BB%8E%E6%A0%87%E5%87%86%E8%B7%AF%E5%BE%84%E4%B8%8B%E5%8A%A0%E8%BD%BD%E3%80%82%E8%BF%99%E9%87%8C%E6%A0%87%E5%87%86%E8%B7%AF%E5%BE%84%E5%8F%AF%E4%BB%A5%E5%8F%82%E8%80%83LD_LIBRARY_PATH%E4%B8%AD%E7%9A%84%E6%8F%8F%E8%BF%B0%E3%80%82%E6%B3%A8%E6%84%8F%EF%BC%8C%E6%AD%A4%E6%97%B6ld.so%E5%8F%AA%E4%BC%9A%E6%90%9C%E7%B4%A2%E6%A0%87%E5%87%86%E8%B7%AF%E5%BE%84%EF%BC%8C%E4%B8%8D%E4%BC%9A%E6%90%9C%E7%B4%A2%E9%80%9A%E8%BF%87%E5%85%B6%E4%BB%96%E6%89%8B%E6%AE%B5%E9%85%8D%E7%BD%AE%E7%9A%84%E8%B7%AF%E5%BE%84%EF%BC%88%E5%A6%82%E4%B8%8A%E4%B8%80%E8%8A%82%E6%8F%8F%E8%BF%B0%E7%9A%84%EF%BC%89%E3%80%82%0A-%20%E5%BA%93%E6%96%87%E4%BB%B6%E5%BF%85%E9%A1%BB%E4%BD%BF%E8%83%BD%E4%BA%86set-user-id%E4%BD%8D%0A%0A%23%20%E7%A4%BA%E4%BE%8B%E4%BB%A3%E7%A0%81%0A%E4%BB%A3%E7%A0%81%E7%9B%AE%E5%BD%95%E6%A0%91%EF%BC%9A%0A%60%60%60%0A%5Bben%40localhost%20test%5D%24%20tree%20.%0A.%0A%E2%94%9C%E2%94%80%E2%94%80%20lib.c%0A%E2%94%9C%E2%94%80%E2%94%80%20libtest.so%0A%E2%94%9C%E2%94%80%E2%94%80%20main%0A%E2%94%9C%E2%94%80%E2%94%80%20main.c%0A%E2%94%9C%E2%94%80%E2%94%80%20test%0A%E2%94%94%E2%94%80%E2%94%80%20test.c%0A%60%60%60%0Amain.c%E7%94%9F%E6%88%90main%E5%8F%AF%E6%89%A7%E8%A1%8C%E7%A8%8B%E5%BA%8F%EF%BC%8Ctest.c%E7%94%9F%E6%88%90test%E5%8F%AF%E6%89%A7%E8%A1%8C%E7%A8%8B%E5%BA%8F%EF%BC%8Clib.c%E7%94%9F%E6%88%90libtest.so%E3%80%82%0A%60%60%60c%0A%2F%2F%20main.c%0A%0A%23include%20%3Cstdio.h%3E%0A%23include%20%3Cunistd.h%3E%0A%23include%20%3Csys%2Fwait.h%3E%0A%0Aint%20main()%0A%7B%0A%20%20%20%20%20%20%20%20pid_t%20pid%20%3D%20fork()%3B%0A%20%20%20%20%20%20%20%20if%20(pid%20%3D%3D%200)%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20char%20*envp%5B%5D%20%3D%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22LD_PRELOAD%3Dlibtest.so%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%2F%2F%20%22LD_PRELOAD%3D.%2Flibtest.so%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20NULL%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7D%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20char%20*argv%5B%5D%20%3D%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22test%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20NULL%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7D%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20int%20err%20%3D%20execve(%22.%2Ftest%22%2C%20argv%2C%20envp)%3B%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20else%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20int%20status%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20wait(%26status)%3B%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20return%200%3B%0A%7D%0A%0A%2F%2F%20test.c%0A%23include%20%3Cstdio.h%3E%0A%23include%20%3Cstdlib.h%3E%0A%0Aint%20main%20()%0A%7B%0A%20%20%20%20%20%20%20%20const%20char%20*preload%20%3D%20getenv(%22LD_PRELOAD%22)%3B%0A%20%20%20%20%20%20%20%20printf(%22LD_PRELOAD%20%3D%20%25s%5Cn%22%2C%20preload)%3B%0A%20%20%20%20%20%20%20%20return%200%3B%0A%7D%0A%0A%2F%2F%20lib.c%0A%23include%20%3Cstdio.h%3E%0A%0Astatic%20void%20func(void)%20__attribute__((constructor))%3B%0Avoid%20func(void)%0A%7B%0A%20%20%20%20%20%20%20%20printf(%22I'm%20libtest.so%20loaded%5Cn%22)%3B%0A%7D%0A%60%60%60%0A%E5%9C%A8test%E5%8F%AF%E6%89%A7%E8%A1%8C%E7%A8%8B%E5%BA%8F%E6%98%AF%E6%99%AE%E9%80%9A%E7%9A%84%E4%BA%8C%E8%BF%9B%E5%88%B6%E6%97%B6%EF%BC%8C%E8%BE%93%E5%87%BA%E4%B8%BA%0A%60%60%60shell%0A%5Bben%40localhost%20test%5D%24%20.%2Fmain%0AI'm%20libtest.so%20loaded%0ALD_PRELOAD%20%3D%20.%2Flibtest.so%0A%60%60%60%0A%E5%BD%93test%E9%85%8D%E7%BD%AE%E4%BA%86capability%E4%BB%A5%E5%90%8E%EF%BC%9A%0A%60%60%60shell%0A%5Bben%40localhost%20test%5D%24%20sudo%20setcap%20cap_net_admin%2Ccap_net_raw%3Deip%20.%2Ftest%0A%5Bben%40localhost%20test%5D%24%20.%2Fmain%0ALD_PRELOAD%20%3D%20(null)%0A%60%60%60%0A%E5%8F%AF%E8%A7%81LD_PRELOAD%E6%8C%87%E5%AE%9Alibtest.so%E6%9C%AA%E8%A2%AB%E5%8A%A0%E8%BD%BD%EF%BC%8C%E4%B8%94LD_PRELOAD%E7%8E%AF%E5%A2%83%E5%8F%98%E9%87%8F%E8%A2%AB%E6%B8%85%E7%A9%BA%E4%BA%86%E3%80%82%0A%23%23%20LD_PRELOAD%E4%B8%8D%E5%90%AB%E6%96%9C%E7%BA%BF%0A%60%60%60shell%0A%5Bben%40localhost%20test%5D%24%20.%2Fmain%0AERROR%3A%20ld.so%3A%20object%20'libtest.so'%20from%20LD_PRELOAD%20cannot%20be%20preloaded%20(cannot%20open%20shared%20object%20file)%3A%20ignored.%0ALD_PRELOAD%20%3D%20(null)%0A%60%60%60%0ALD_PRELOAD%E4%BB%8D%E7%84%B6%E8%A2%AB%E6%B8%85%E7%A9%BA%E4%BA%86%EF%BC%8C%E4%BD%86ld.so%E4%BC%BC%E4%B9%8E%E5%B0%9D%E8%AF%95%E5%8E%BB%E5%8A%A0%E8%BD%BDlibtest.so%E4%BA%86%EF%BC%8C%E4%BD%86%E6%98%AF%E6%B2%A1%E6%89%BE%E7%9D%80%E3%80%82%0A%0A%23%23%20%E5%B0%86libtest.so%E6%94%BE%E5%85%A5%E6%A0%87%E5%87%86%E8%B7%AF%E5%BE%84%0A%E5%A6%82%E6%9E%9C%E6%B2%A1%E6%9C%89%E9%85%8D%E7%BD%AEset-user-id%E4%BD%8D%EF%BC%9A%0A%60%60%60shell%0A%5Bben%40localhost%20test%5D%24%20.%2Fmain%0AERROR%3A%20ld.so%3A%20object%20'libtest.so'%20from%20LD_PRELOAD%20cannot%20be%20preloaded%20(cannot%20open%20shared%20object%20file)%3A%20ignored.%0ALD_PRELOAD%20%3D%20(null)%0A%60%60%60%0A%E4%BB%8D%E7%84%B6%E6%8F%90%E7%A4%BA%E6%89%BE%E4%B8%8D%E5%88%B0%E3%80%82%E5%A6%82%E6%9E%9C%E8%AE%BE%E7%BD%AE%E4%BA%86set-user-id%E4%BD%8D%EF%BC%9A%0A%60%60%60shell%0A%5Bben%40localhost%20test%5D%24%20sudo%20chmod%20a%2Bs%20%2Fusr%2Flib64%2Flibtest.so%20%0A%5Bben%40localhost%20test%5D%24%20.%2Fmain%0AI'm%20libtest.so%20loaded%0ALD_PRELOAD%20%3D%20(null)%0A%60%60%60%0A%E5%9C%A8%E6%BB%A1%E8%B6%B3%E4%B8%8A%E4%B8%80%E8%8A%82%E6%8F%90%E5%88%B0%E7%9A%843%E4%B8%AA%E6%9D%A1%E4%BB%B6%E6%97%B6%EF%BC%8Clibteso.so%E5%B0%B1%E5%8F%AF%E4%BB%A5%E6%AD%A3%E5%B8%B8%E5%8A%A0%E8%BD%BD%E4%BA%86%E3%80%82%0A%E7%9C%8B%E7%9C%8B%E5%A6%82%E6%9E%9C%E6%94%BE%E5%88%B0%2Fusr%2Flib%E4%B8%8B%E9%9D%A2%E4%BC%9A%E6%80%8E%E4%B9%88%E6%A0%B7%EF%BC%9F%0A%60%60%60shell%0A%5Bben%40localhost%20test%5D%24%20ls%20%2Fusr%2Flib%2Flibtest.so%20-l%0A-rwsr-sr-x.%201%20root%20root%208208%201%E6%9C%88%20%2024%2019%3A48%20%2Fusr%2Flib%2Flibtest.so%0A%5Bben%40localhost%20test%5D%24%20.%2Fmain%0AERROR%3A%20ld.so%3A%20object%20'libtest.so'%20from%20LD_PRELOAD%20cannot%20be%20preloaded%20(cannot%20open%20shared%20object%20file)%3A%20ignored.%0ALD_PRELOAD%20%3D%20(null)%0A%60%60%60%0A%E7%9C%8B%E7%9C%8B%E8%BF%98%E6%98%AF%E4%B8%80%E6%A0%B7%E6%89%BE%E4%B8%8D%E5%88%B0%E3%80%82%E5%8F%AF%E8%A7%81%E5%9C%A8x64%E5%B9%B3%E5%8F%B0%E4%B8%8A%EF%BC%8C%2Fusr%2Flib%E5%B9%B6%E9%9D%9E%E6%A0%87%E5%87%86%E8%B7%AF%E5%BE%84%EF%BC%8C%E8%80%8C%2Fusr%2Flib64%E4%BB%A5%E5%8F%8A%2Flib64%E6%89%8D%E6%98%AF%E3%80%82%0A%0A%23%20%E5%8F%82%E8%80%83%E6%96%87%E7%8C%AE%0A%5B1%5D%20%5Bld.so(8)%20%E2%80%94%20Linux%20manual%20page%5D(https%3A%2F%2Fman7.org%2Flinux%2Fman-pages%2Fman8%2Fld.so.8.html)%0A%5B2%5D%20%5BStackoverflow%20-%20Does%20using%20linux%20capabilities%20disables%20LD_PRELOAD%5D(https%3A%2F%2Fstackoverflow.com%2Fquestions%2F18058426%2Fdoes-using-linux-capabilities-disables-ld-preload)