linux 审计工具 lynis

本贴最后更新于 1651 天前,其中的信息可能已经事过境迁

1. 参考资料:https://cisofy.com/documentation/lynis/get-started/#first-run

2. 常用命令

### Common parameters

Lynis is started with at least one command, usually followed by one or more options.

#### Example Commands

| Command |  Description |
| audit system |  Perform a system audit |
| show commands |  Show available Lynis commands |
| show help |  Provide a help screen |
| show profiles |  Display discovered profiles |
| show settings |  List all active settings from profiles |
| show version |  Display current Lynis version |

The *show* command requires an up-to-date version of Lynis.

#### Options

| Option |  Abbreviated |  Description |
| --auditor "Given name Surname" |    |  Assign an auditor name to the audit (report) |
| --cronjob |    |  Run Lynis as cronjob (includes -c -Q) |
| --debug |    |  Show debug information, useful for troubleshooting and development |
| --help |  -h |  Shows valid parameters |
| --man-page |    |  View man page |
| --no-colors |    |  Do not use any colors |
| --pentest |    |  Perform a penetration test scan (non-privileged) |
| --quick |  -Q |  Don't wait for user input, except on errors |
| --quiet |  -q |  Only show warnings (includes --quick, but doesn't wait) |
| --reverse-colors |    |  Use a different color scheme for lighter backgrounds |
| --verbose |    |  Show more screen output |

  
**Tips**  

* If Lynis is not installed as package (with included man page), use **--man** or **nroff -man ./lynis.8**
* For systems where the shell background is light, use **--nocolors** or **--reverse-colors**
* Use command **show options** to see all available parameters of Lynis

3. report

During the audit process, Lynis will gather findings and other data points. This information is stored in the report file, which is by default **/var/log/lynis-report.dat**.
  • Linux

    Linux 是一套免费使用和自由传播的类 Unix 操作系统,是一个基于 POSIX 和 Unix 的多用户、多任务、支持多线程和多 CPU 的操作系统。它能运行主要的 Unix 工具软件、应用程序和网络协议,并支持 32 位和 64 位硬件。Linux 继承了 Unix 以网络为核心的设计思想,是一个性能稳定的多用户网络操作系统。

    914 引用 • 930 回帖 • 1 关注
  • lynis
    1 引用

相关帖子

欢迎来到这里!

我们正在构建一个小众社区,大家在这里相互信任,以平等 • 自由 • 奔放的价值观进行分享交流。最终,希望大家能够找到与自己志同道合的伙伴,共同成长。

注册 关于
请输入回帖内容 ...