suid wrapper in source and bin

This commit is contained in:
mad 2018-08-12 18:53:21 +02:00
parent 1834f8df55
commit 6f4042b081
2 changed files with 18 additions and 0 deletions

18
suid-wrapper.c Executable file
View File

@ -0,0 +1,18 @@
#ifndef _GNU_SOURCE
#define _GNU_SOURCE 1
#endif
#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
#include <unistd.h>
char *p;
int
main (int argc, char* argv[])
{
setuid(0);
if (asprintf(&p, "/bin/bash /usr/bin/nlvmi %s %s %s", argv[1], argv[2], argv[3]) != -1)
{
system(p);
}
}

BIN
wrap-nlvmi Executable file

Binary file not shown.