Skip to content

Commit

Permalink
test: Fix native/nc-backdoor-echo-s.test
Browse files Browse the repository at this point in the history
  • Loading branch information
djolertrk committed Nov 29, 2024
1 parent e39dca7 commit 3d66c14
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 40 deletions.
2 changes: 1 addition & 1 deletion docs/TestFeatures.md
Original file line number Diff line number Diff line change
Expand Up @@ -309,4 +309,4 @@ NOTE: If a test should be executed in `DEPLOY` mode only, `.test` file should co
| backdoor + PID | Yes | native/nc-backdoor-plus-pid.test |
| hide file | Yes | native/hiden-file.test |
| hide file (2) | Yes | native/hiden-file-in-all-dirs.test |
| unhide module | Yes (but does not work) | native/unhide-module.test |
| unhide module | Yes | native/hide-unhide-module.test |
11 changes: 5 additions & 6 deletions test/native/nc-backdoor-echo-s.test
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# REQUIRES: 0
# REQUIRES: DEBUG_ONLY
# REQUIRES: NATIVE_TESTS

Expand All @@ -9,17 +8,17 @@ sudo dmesg -c
sleep 10
sudo insmod ../../../build/kovid.ko
sudo timeout 10 ../../../scripts/bdclient.sh nc localhost 9999 0x7d3b1cb572f16425
echo -s > /proc/myprocname
echo list-hidden-tasks > /proc/myprocname
sudo rmmod kovid
sudo dmesg

# CHECK: kv: using kprobe for kallsyms_lookup_name
# CHECK: Waiting for event
# CHECK: loaded
# CHECK: Got event
# CHECK: hide [{{.*}}] {{.*}}
# CHECK: hide [{{.*}}] {{.*}}
# CHECK: BD : dash
# CHECK: BD : bash
# CHECK: hide: {{.*}}
# CHECK: hide: {{.*}}
# CHECK: hide: {{.*}}
# CHECK: hide: {{.*}}
# CHECK: Got event
# CHECK: unloaded
1 change: 1 addition & 0 deletions test/native/nc-backdoor-plus-pid.test
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# REQUIRES: 0
# REQUIRES: DEBUG_ONLY
# REQUIRES: NATIVE_TESTS

Expand Down
2 changes: 1 addition & 1 deletion test/native/openssl-backdoor.test
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# RUN: FileCheck-18 --input-file=%t.log %s

sudo insmod ../../../build/kovid.ko
sudo timeout 10 ../../../scripts/bdclient.sh openssl localhost 9999
sudo timeout 10 ../../../scripts/bdclient.sh openssl localhost 9999 0x7d3b1cb572f16425
sudo rmmod kovid

# CHECK: ACCEPT
Expand Down
2 changes: 1 addition & 1 deletion test/native/tty-backdoor.test
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
sudo dmesg -c
sleep 20
sudo insmod ../../../build/kovid.ko
sudo timeout 10 ../../../scripts/bdclient.sh tty localhost 9999
sudo timeout 10 ../../../scripts/bdclient.sh tty localhost 9999 0x7d3b1cb572f16425
sudo rmmod kovid
sudo dmesg

Expand Down
31 changes: 0 additions & 31 deletions test/native/unhide-module.test

This file was deleted.

0 comments on commit 3d66c14

Please sign in to comment.