Initial version of the RCE scheme- Added complete execve hook, helper and modifying capabilities for the filename called. Works still needs to be done

This commit is contained in:
h3xduck
2022-02-06 14:15:57 -05:00
parent 05baa8fb8a
commit 044c85f3ff
12 changed files with 1766 additions and 1406 deletions

View File

@@ -1,9 +1,23 @@
#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <unistd.h>
int main(int argc, char* argv[]){
printf("Hello world from execve hijacker\n");
for(int ii=0; ii<argc; ii++){
printf("Argument %i is %s\n", ii, argv[ii]);
}
int fd = open("/tmp/testcreated", O_RDWR | O_CREAT | O_TRUNC, 0666);
int ii = 0;
while(*(argv[0]+ii)!='\0'){
write(fd, argv[0]+ii, 1);
ii++;
}
return 0;
}