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. 关于reduce的理解

    什么是reduce reduce这个词字面上来讲,大多称作“归约”,但这个词太专业了,以至于第一眼看不出来意思.我更倾向于解释为“塌缩”,这样就形象多了.对一个n维的情况进行reduce,就是将执行操 ...

  2. 如何利用pip自动生成和安装requirements.txt依赖

    在查看别人的Python项目时,经常会看到一个requirements.txt文件,里面记录了当前程序的所有依赖包及其精确版本号.这个文件有点类似与Rails的Gemfile.其作用是用来在另一台PC ...

  3. Python 属性与方法 概念理解

    属性与方法 attribute(属性)是class(类)中的成员变量,而method(方法)则是class(类)中的function(函数). 也可以理解,属性就类变量,方法就是类函数. 类中的变量就 ...

  4. python入门学习:4.if语句

    python入门学习:4.if语句 关键点:判断 4.1 一个简单的测试4.2 条件测试4.3 if语句 4.1 一个简单的测试   if语句基本格式如下,注意不要漏了冒号 1if 条件 :2     ...

  5. 004_Python之all()\any()

    http://www.jianshu.com/p/65b6b4a62071 一.待验证整理

  6. Python 中的浅拷贝和深拷贝

    1. 列表和字典,直接赋值,都是浅拷贝,即赋值双方指向同一地址,因为 Python 对可变对象按引用传递. >>> a = [1, 2, 3] >>> b = a ...

  7. Python2 处理 Unicode 字符串的规则

    在 Python2 中处理 Unicode 字符串,需遵循如下规则: 1. 程序中的字符串要加前缀 u 2. 不要用 str(),而应该用 unicode() 作为字符串转换函数.不要使用 chr() ...

  8. python3 迭代器

    ''' 迭代:重复的过程,并且每次迭代的结果都是下次迭代的初始值 可迭代的 Iterable 迭代器 Iterator iter(数据) == 数据.__iter__() 将数据转换为迭代器 next ...

  9. Python脱产8期 Day12 2019/4/26

    一 函数默认值的细节 1.如果函数的默认参数的默认值为变量,在所属函数定义阶段一执行就被确定为当时变量存放的值 例: a = 100def fn(num=a): print(num) # 100a = ...

  10. C之attribute用法

    GNU C 的一大特色就是__attribute__ 机制.__attribute__ 可以设置函数属性(Function Attribute ).变量属性(Variable Attribute )和 ...