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 f34236640594648fceaea94eb5d760eb061c5156
parent ca5e6e403c6c01e0593d9f222000c2b20856b5eb
Author: Tizian Leonhardt <tizianleonhardt@web.de>
Date:   Thu,  4 Feb 2021 22:45:23 +0100

Make occ.sh smarter

Diffstat:
Mproject/occ.sh | 15++++++++++-----
1 file changed, 10 insertions(+), 5 deletions(-)

diff --git a/project/occ.sh b/project/occ.sh @@ -1,6 +1,6 @@ #!/bin/bash #Extract all occurences of function calls and the assigned variables from kernel sources -funcs=("kmalloc" "kzalloc") +funcs=("kmalloc" "kzalloc" "vmalloc" "vzalloc") out=".funcs" rm -f cscope.out cscope.files $out @@ -20,13 +20,18 @@ if ! [ -x "$(command -v cscope)" ]; then fi echo "Generating file cscope.files.." -find $1 \ + +old_pwd=$PWD + +cd $1 +find . \ -name "*.[chxsS]" -print > ./cscope.files echo "Done!" echo "Generating occurence database.." -echo "$1" >> $out for f in ${funcs[@]}; do cscope -L -0 $f >> $out done -echo "Done!" -\ No newline at end of file +echo "Done!" + +mv $out $old_pwd +\ No newline at end of file