-
Notifications
You must be signed in to change notification settings - Fork 418
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
revert: revert recently changed hooked_syscall event (#3597)
One might re-revert this once a fix for #3595 has been done. Revert "chore(events): rename syscall hooking arguments (#3594)" Revert "feat(events): refactor hooked_syscall event"
- Loading branch information
1 parent
c0f4b93
commit 1ecedcc
Showing
21 changed files
with
379 additions
and
1,196 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
# hooked_syscalls | ||
|
||
## Intro | ||
`hooked_syscalls` is an event that checks the selected syscalls for any syscall hooking. | ||
|
||
## Description | ||
The purpose of the `hooked_syscalls` event is to monitor for system call hooking in the Linux kernel. It verifies the function pointer of the system call to ensure it lies between the etext and stext addresses. This helps identify instances of kernel code modifications, often used for malicious activities such as hiding processes, files, or network connections. | ||
|
||
The `hooked_syscalls` event checks either user-specified syscalls or a default list of syscalls depending on the architecture of the system, with a different list for amd64 and arm64 respectively. | ||
|
||
## Arguments | ||
* `check_syscalls`:`[]string`[U] - the syscall checked for syscall hooking. Can be used to specify selected syscalls or use the default ones. | ||
The default syscalls for amd64 are: | ||
|
||
`read` | ||
`write` | ||
`open` | ||
`close` | ||
`ioctl` | ||
`socket` | ||
`sendto` | ||
`recvfrom` | ||
`sendmsg` | ||
`recvmsg` | ||
`execve` | ||
`kill` | ||
`getdents` | ||
`ptrace` | ||
`getdents64` | ||
`openat` | ||
`bpf` | ||
`execveat` | ||
|
||
The default syscalls for arm64 are: | ||
`ioctl` | ||
`openat` | ||
`close` | ||
`getdents64` | ||
`read` | ||
`write` | ||
`ptrace` | ||
`kill` | ||
`socket` | ||
`execveat` | ||
`sendto` | ||
`recvfrom` | ||
`sendmsg` | ||
`recvmsg` | ||
`execve` | ||
`bpf` | ||
* `hooked_syscalls`:`[]trace.HookedSymbolData` [K] - The hooked syscalls that were found along with their owners. `Hidden` owner means that the pointed function owner is not a part of the kernel modules list. | ||
## Hooks | ||
### Various system calls | ||
#### Type | ||
Uprobe | ||
#### Purpose | ||
Detection of syscall hooking. | ||
|
||
## Example Use Case | ||
The `hooked_syscalls` event could be used as part of a broader system integrity monitoring solution. For example, a security engineer could use it to raise alerts or run further investigations if unexpected syscall hooking activities are detected. This could aid in the early detection and mitigation of malware or rootkit infections. | ||
Example: | ||
|
||
```console | ||
tracee -e hooked_syscalls.args.check_syscalls=<syscall>,<syscall>,...` | ||
``` | ||
|
||
## Issues | ||
The `check_syscalls` argument is used as a parameter to specify the syscalls to be checked. This will change in the future to be an event parameter. | ||
|
||
## Related Events | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.