linux C 家庭作业:如何使用bash shell记录审核流程?
我有一个功课额外的信用问题,我试图做,但未能得到它.
Q. Write a security shell script that logs the following information
for every proc
我是linux的新手,对新手问题感到抱歉. Q. Write a security shell script that logs the following information 我开始尝试捕获用户并回显它但失败了. output=`ps -ef | grep [*]` set -- $output User=$1 echo $User 最佳答案 ps的输出既不充分又无法生成此问题所需的数据.您需要像auditd,SELinux或直接内核黑客(即fork.c)这样的东西来在安全日志记录领域中远程执行任何操作. 更新 其他人提出了使用shell命令日志记录,ps和朋友(proc或sysfs)的建议.它们可能很有用,并且确实有它们的位置(显然).我认为不应该为此目的而依赖它们,特别是在教育背景下. … whether the process has tried to access a secure file (stored as either yes or no) 似乎是其他答案忽略的那个.我坚持原来的答案,但丹尼尔指出,还有其他有趣的方法来装饰这些数据. > systemtap 对于教育练习,这些工具将有助于提供更完整的答案. (编辑:岳阳站长网) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
- BEA-141150 - An error occurred while preparing applicat
- LINUX教学:Ubuntu 安装 JDK 7 / JDK8 的两种方式
- linux – 什么使内核/ OS实时?
- 在Linux中安装Android Studio到/ opt(将1.9 GB/ Android/Sd
- 当我在Linux中打开文件时应该什么时候使用O_CLOEXEC?
- LINUX教程:OpenLDAP安装及设置普通用户修改自己密码
- regex – 如何使用sed或Perl从xml文件中删除无效字符
- 使用pthread时,使用全局变量的C显示比指针慢100%?
- linux启动计划任务crontab
- linux – erlang:UNIX域套接字支持?