An open API service indexing awesome lists of open source software.

https://github.com/lumontec/lsmtrace

Trace deep kernel events through eBPF and lsm hooks
https://github.com/lumontec/lsmtrace

ebpf kernel linux-security-module security tracing

Last synced: about 1 month ago
JSON representation

Trace deep kernel events through eBPF and lsm hooks

Awesome Lists containing this project

README

          

# lsmtrace

Trace all Linux Security Modules hooks touched by executable.
Have a look at my **[blog post](https://lumontec.com/1-building-a-security-tracing)** to find out more.

## Requirements

Your kernel must have been compiled with the follwing options:
* BPF_SYSCALL
* BPF_LSM
* DEBUG_INFO
* DEBUG_INFO_BTF

## Compilation

```shell
$ git submodule update --init --recursive # check out libbpf
$ cd src
$ make
```

## Run

```shell
$ sudo ./lsmtrace /usr/bin/ls -a /home

Attaching hooks, don`t rush..

-> HOOK_CALL: -> cred_getsecid( const struct cred *c, u32 *secid )
-> HOOK_CALL: -> file_permission( struct file *file, int mask )
file,f_mode = 32797
file,f_path.dentry,d_flags = 64
file,f_path.dentry,d_name.name = ls
file,f_path.dentry,d_inode,i_ino = 3670696
...
```