How to filter PROCTITLE events
Hi
I am looking for the method to filter the PROCTITLE events via auditctl.
It is said we can do it, but I could not figure out how.
"The proctitle event is emitted during syscall audits, and can be filtered with auditctl."
Regards
Hai
Quoted 5 lines · EDT 杨海
Hi
I am looking for the method to filter the PROCTITLE events via auditctl.
It is said we can do it, but I could not figure out how.
Did you read about the exclude filter? :-)
Quoted 2 lines
"The proctitle event is emitted during syscall audits, and can be filtered with auditctl."
-a always,exclude -F msgtype=PROCTITLE
There is another example in the 20-dont-audit.rules file.
-Steve
--
Linux-audit mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/linux-audit
Thanks Steve. It works :-)
Meanwhile, for read/write system call, if they belongs to same pid and same fd, we are trying to suppress them into one msg. I guess it would not be able to filter using auditctl, is that right?
Regards
Hai
------------------ Original ------------------
From: "Steve Grubb"<[email protected]>; Date: Wed, Jul 24, 2019 08:14 PM To: "linux-audit"<[email protected]>;
Cc: "杨海"<[email protected]>;
Subject: Re: How to filter PROCTITLE events
Quoted 5 lines · EDT 杨海
Hi
I am looking for the method to filter the PROCTITLE events via auditctl.
It is said we can do it, but I could not figure out how.
Did you read about the exclude filter? :-)
Quoted 2 lines
"The proctitle event is emitted during syscall audits, and can be filtered with auditctl."
-a always,exclude -F msgtype=PROCTITLE
There is another example in the 20-dont-audit.rules file.
-Steve
Quoted 4 lines · EDT 杨海
Thanks Steve. It works :-)
Meanwhile, for read/write system call, if they belongs to same pid and same fd, we are trying to suppress them into one msg. I guess it would not be able to filter using auditctl, is that right?
Technically you could suppress them. In practice, it's not feasible. You would need to have application specific rules to suppress. The more rules you have the more performance you lose.
But I would start by questioning whether you really need to monitor reads and writes? If a file is opened with O_WRONLY or O_RDWR, can it just be assumed that the file was written to?
-Steve
--
Linux-audit mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/linux-audit
Hi Steve,
Thanks for the suggestion on read/write. I have two more questions which I haven't figured out.
1) Does auditctl rules support regular expressions? For some params, it is not easy to filter specific messages using “=” or "!=".
2) In message payload, some fields are not what we care about. Any way we can reduce the fields/params in audit log?
Regards
Hai
------------------ Original ------------------
From: "Steve Grubb"<[email protected]>; Date: Thu, Jul 25, 2019 10:51 PM To: "杨海"<[email protected]>;
Cc: "linux-audit"<[email protected]>;
Subject: Re: How to filter PROCTITLE events
Quoted 4 lines · EDT 杨海
Thanks Steve. It works :-)
Meanwhile, for read/write system call, if they belongs to same pid and same fd, we are trying to suppress them into one msg. I guess it would not be able to filter using auditctl, is that right?
Technically you could suppress them. In practice, it's not feasible. You would need to have application specific rules to suppress. The more rules you have the more performance you lose.
But I would start by questioning whether you really need to monitor reads and writes? If a file is opened with O_WRONLY or O_RDWR, can it just be assumed that the file was written to?
-Steve
Hello,
Quoted 5 lines · EDT 杨海
Thanks for the suggestion on read/write. I have two more questions which I haven't figured out.
1) Does auditctl rules support regular expressions?
For some params, it is not easy to filter specific messages using “=” or "!=".
No. Most things inside the kernel are numbers. Text is a human convenience.
Quoted 2 lines
2) In message payload, some fields are not what we care about. Any way we can reduce the fields/params in audit log?
By default, no. You could patch auditd to do so if its really necessary.
-Steve
--
Linux-audit mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/linux-audit