To track deletion of files using tracee #1044
Replies: 8 comments 8 replies
-
Hello @Dinakaranevil , Can you please provide the exact command you used to start tracee with? |
Beta Was this translation helpful? Give feedback.
-
One more thing you can try is using the unlink and unlinkat events, in addition to security_inode_unlink: |
Beta Was this translation helpful? Give feedback.
-
hi @yanivagman , |
Beta Was this translation helpful? Give feedback.
-
Here is how it is done for security_inode_unlink: |
Beta Was this translation helpful? Give feedback.
-
hi @yanivagman |
Beta Was this translation helpful? Give feedback.
-
hi @yanivagman ,
i wanted to add a custom function basically to take back up of files before the file is getting deleted
y cant i trace the variables on trace pipe i am not getting any errors while building the project from source nor any output on the trace_pipe |
Beta Was this translation helpful? Give feedback.
-
Hi @yanivagman ,
But this can be mechanism can be implemented using ebpf right ??? |
Beta Was this translation helpful? Give feedback.
-
To implement such a mechanism (copy before delete) your program will need to be able to read (and copy) the file content before deletion. As ebpf doesn't provide any interface (helpers) to the file system, this copy will have to take place in user space (unless the file is in memory, and then theoretically you can copy it using bpf_probe_read() calls). |
Beta Was this translation helpful? Give feedback.
-
Is it recommended to track deletion of files using tracee
I tried to track the security_inode_unlink system call along with execve system call
I opened an other terminal and deleted files using rm command sometimes it was not able to detect the deletion of files sometimes .Can someone suggest me a better approach to track deletion of files
Beta Was this translation helpful? Give feedback.
All reactions