6
How to use Auditd file access logs?
(programming.dev)
c/cybersecurity is a community centered on the cybersecurity and information security profession. You can come here to discuss news, post something interesting, or just chat with others.
THE RULES
Instance Rules
Community Rules
If you ask someone to hack your "friends" socials you're just going to get banned so don't do that.
Learn about hacking
Other security-related communities !databreaches@lemmy.zip !netsec@lemmy.world !securitynews@infosec.pub !cybersecurity@infosec.pub !pulse_of_truth@infosec.pub
Notable mention to !cybersecuritymemes@lemmy.world
As far as I am aware,
auditctlrecords the whole process tree of an event. You can useausearchwith--pid <pid>or--ppid <pid>to work yourself all the way up the process tree.Thanks, I'll try and see how it works.
Ok, so I did a thing with
gitand checked the audit log withausearch -k test-key.Then I got the
ppid(say 2000) and then ranausearch --pid 2000, which gave no output, while doingausearch --pid 2000just gave the same entries that I got from the previous one.So, unable to get the process tree that way.
Perhaps there is some setting I am overlooking?
Sorry, I mistakenly believed that
auditctlrecords the process tree on event generation automatically, but that's not the case. You'll need to add a rule that recordsexecveevents.Oof! Wouldn't that either end up recording everything, or require me to know beforehand, what I am looking for?
Pretty much yes, unfortunately. Because the process calling your target process is obviously created before, you'd need to proactively log all executions. :/
Welp
Guess I need to look for another way for my auditing desires.
On the other hand, considering such a thing can be easily done using
htop, I'd suppose it would be possible to add such a functionality toauditd(to include the whole tree and full executable paths).I feel like this functionality has considerable merit and would make the file access rules much more useful.