ausearch这个工具,可以针对指定的事件来搜索audit日志文件。默认情况下,ausearch搜索/var/log/audit/audit.log这个文件。

The ausearch utility allows you to search Audit log files for specific events. By default, ausearch searches the /var/log/audit/audit.log file. You can specify a different file using the ausearch options -if file_name command. Supplying multiple options in one ausearch command is equivalent to using the AND operator between field types and the ORoperator between multiple instances of the same field type.

 Using ausearch to Search Audit Log Files

To search the /var/log/audit/audit.log file for failed login attempts, use the following command:
~]# ausearch --message USER_LOGIN --success no --interpret
To search for all account, group, and role changes, use the following command:
~]# ausearch -m ADD_USER -m DEL_USER -m ADD_GROUP -m USER_CHAUTHTOK -m DEL_GROUP -m CHGRP_ID -m ROLE_ASSIGN -m ROLE_REMOVE -i
To search for all logged actions performed by a certain user, using the user's login ID (auid), use the following command:
~]# ausearch -ua  -i
To search for all failed system calls from yesterday up until now, use the following command:
~]# ausearch --start yesterday --end now -m SYSCALL -sv no -i

For a full listing of all ausearch options, see the ausearch(8) man page.

linux audit审计(8)--ausearch搜索audit日志文件的更多相关文章

  1. linux audit审计(4)--audit的日志切分,以及与rsyslog的切分协同使用

    audit的规则配置稍微不当,就会短时间内产生大量日志,所以这个规则配置一定要当心.当audit日志写满后,可以看到如下场景: -r-------- 1 root root 8388609 Mar 3 ...

  2. linux audit审计(3)--audit服务配置

    audit守护进程可以通过/etc/audit/auditd.conf文件进行配置,默认的auditd配置文件可以满足大多数环境的要求. local_events = yes write_logs = ...

  3. linux audit审计(2)--audit启动

    参考:https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/security_guide/sec- ...

  4. linux audit审计(6)--audit永久生效的规则配置

    定义reboot系统后,仍然生效的审计规则,有两种办法: 1.直接写入/etc/audit/audit.rules文件中,在service文件中需要加入ExecStartPost=-/sbin/aud ...

  5. linux自动删除30天前的日志文件

    linux应用总结: 自动删除n天前的日志文件: . 使用的命令格式如下: find 对应目录 -mtime +天数 -name "文件名" -exec -rm -rf -name ...

  6. linux audit审计(5)--audit规则配置

    audit可以配置规则,这个规则主要是给内核模块下发的,内核audit模块会按照这个规则获取审计信息,发送给auditd来记录日志. 规则类型可分为: 1.控制规则:控制audit系统的规则: 2.文 ...

  7. linux的审计功能(audit)

    为了满足这样的需求:记录文件变化.记录用户对文件的读写,甚至记录系统调用,文件变化通知.什么是auditThe Linux Audit Subsystem is a system to Collect ...

  8. 【linux日志】【日志分析】linux系统各日志文件的含义

    前段时间太忙,没有来得及管博客,最近时间充裕了,开始更新博客. 因为最近在看linux日志相关内容,把心得分享给大家 linux系统日志文件默认存放路径/var/log/ ls查看此路径下有哪些日志文 ...

  9. 基于NMAP日志文件的暴力破解工具BruteSpray

    基于NMAP日志文件的暴力破解工具BruteSpray   使用NMAP的-sV选项进行扫描,可以识别目标主机的端口对应的服务.用户可以针对这些服务进行认证爆破.为了方便渗透测试人员使用,Kali L ...

随机推荐

  1. USB知识汇总

    概述 通用串行总线(英语:Universal Serial Bus,缩写:USB)是连接计算机系统与外部设备的一种串口总线标准,也是一种输入输出接口的技术规范,被广泛地应用于个人电脑和移动设备等信息通 ...

  2. Spark中的Join类型

    常规连接: 左半连接: 左半连接结果集:仅仅保留左边表中的行,这些行的joinkey出现在右边表中!!!(类似于leftTable.joinKey in (rightTable.joinKeys)). ...

  3. 计划任务执行bat

    @echo offtaskkill /f /t /im ControlKJmen.exetaskkill /f /t /im KJMen.exetaskkill /f /t /im DisplayLo ...

  4. Linux:Day2 发行版本、命令获取

    Linux的哲学思想: 1.一切皆文件:把几乎所有资源,包括硬件设备都组织为文件格式: 2.由众多单一目的的小程序组成,一个程序只实现一个功能,而且要做好: 组合小程序完成复杂任务: 3.尽量避免跟用 ...

  5. python相关资料链接

    后续的博客更新,会涉及到很多的python及python的框架相关的内容,这里将自己收藏的一些关于python相关资料的链接做一个整理,算是一个导航索引吧... PS:其中有些链接对应的技术团队文章, ...

  6. 广师大python学习笔记求派的值

    用python语言算π值并且带有进度条 用python算圆周率π 1.准备第三方库pip 2.利用马青公式求π 3.用python语言编写出求圆周率到任意位的程序如下: from math impor ...

  7. sklearn 数据预处理1: StandardScaler

    作用:去均值和方差归一化.且是针对每一个特征维度来做的,而不是针对样本. [注:] 并不是所有的标准化都能给estimator带来好处. “Standardization of a dataset i ...

  8. LeetCode 832. Flipping an Image

    Given a binary matrix A, we want to flip the image horizontally, then invert it, and return the resu ...

  9. 美团面试(c++方向)

    美团后台基本都是java,c++很少的 一面:(其实问了很多,但是很多不记得了) 1.    mfc里边的句柄, Qt里边的信号和槽函数 2.    c 程序的内存分布 3.    堆和栈的区别 4. ...

  10. 阿里字体css代码引入方法

    1.第一步,选择自己想要的图标字体,添加入库. 2.选择下载代码. 3.我们可以发现,有如下的代码被下载下来了. 4.我们选择iconfont.css放到自己的文件夹中. 5.然后我们根据下载下来ht ...