"echo" not logged in auditd
Hi
We are experiencing the same issue below, that "echo" cannot be logged in auditd. Would like to know some detailed explanation here, and understand in general what would NOT be in the scope of auditd log.
https://serverfault.com/questions/871343/why-does-auditd-only-log-echo-when-i-use-the-absolute-path
Regards
Hai
Quoted 5 lines · 杨海
Hi
We are experiencing the same issue below, that "echo" cannot be logged in auditd. Would like to know some detailed explanation here, and understand in general what would NOT be in the scope of auditd log.
https://serverfault.com/questions/871343/why-does-auditd-only-log-echo-when-i-use-the-absolute-path
This explanation is pretty clear.
The "shell builtin" means that whatever shell you are already using (bash, sh, ash, dash, zsh, ...) is the one running this command in the already-executing shell rather than starting a new kernel-tracked process (task). This would be similar to running python or perl in interactive mode and typing commands to one of those prompts. Once you have seen python or perl started as a new task, any commands native to either of those two interpreters would not start a new kernel-tracked task.
To try to solve your issue you would need to track the invocation of every shell but not know what's running inside it, or use pam_tty_audit to track the keystrokes of that shell. You might also be able to monitor .bash_history for that account, but since the user is able to influence the configuration of bash history, it would not be reliable.
Quoted 2 lines
Regards
Hai
- RGB
--
Richard Guy Briggs <[email protected]>
Sr. S/W Engineer, Kernel Security, Base Operating Systems Remote, Ottawa, Red Hat Canada
IRC: rgb, SunRaycer
Voice: +1.647.777.2635, Internal: (81) 32635
--
Linux-audit mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/linux-audit
Hello,
Quoted 3 lines · EDT 杨海
We are experiencing the same issue below, that "echo" cannot be logged in auditd. Would like to know some detailed explanation here, and understand in general what would NOT be in the scope of auditd log.
If the rule is on execve, then it only triggers on execve. If the shell handles it internally and never calls execve, then it cannot be audited by an execve rule.
Note that strace will always call execve and thus search for /usr/bin/echo. Whereas bash will see it as an internal function and handle it all by itself. So, be aware strace can lie to you. There are a couple other commands like "kill" which bash will handle instead of using the app.
-Steve
--
Linux-audit mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/linux-audit