Lynis - Security auditing tool for Linux, macOS, and UNIX-based systems. Assists with compliance testing (HIPAA/ISO27001/PCI DSS) and system hardening. Agentless, and installation optional.
Go to file
hlein 62d9a18861 A bunch of Solaris compatibility tweaks (#367)
* Work around Solaris' /bin/sh not being POSIX.

If /usr/xpg4/bin/sh is present, we are (definitely?) on Solaris or
a derivative, and /bin/sh cannot be trusted to support POSIX, but
/usr/xpg4/bin/sh can be.  Exec it right away.

* Work around Solaris 'which' command oddity.

Solaris' (at least) 'which' command outputs not-found errors to STDOUT
instead of STDERR.

This makes "did we get any output from which" checks insufficient;
piping to grep -v the "no foo in ..." message should work.

Note that this patch set includes all such uses of which that I could
find, including ones that should never be reached on Solaris (i.e. only
executed on some other OS) just for consistency.

* Improved alternate-sh exec to avoid looping.

* Solaris' /usr/ucb/echo supports -n.

* Check for the best hash type that openssl supports.

When using openssl to generate hashes, do not assume it supports
sha256; try that, then sha1, then give up and use md5.

* Solaris does not support sed -i; use a tempfile.

* Use the full path for modinfo.

When running as non-root, /usr/sbin/ might not be in PATH.
include/tests_accounting already calls modinfo by full path, but
include/tests_kernel did not.

* Solaris find does not support -maxdepth.

This mirrors the logic already in tests_homedirs.

* Use PSBINARY instead of ps.

* Work around Solaris' date not supporting +%s.

Printing nawk's srand value is a bizarre but apparently once popular
workaround for there being no normal userland command to print
UNIX epoch seconds.  A perl one-liner is the other common approach,
but nawk may be more reliably present on Solaris than perl.

* Revert to using sha1 for HOSTID.

* Whitespace cleanup for openssl hash tests.
2017-03-08 16:24:24 +00:00
db Added MAIL-8817 2017-02-28 20:17:11 +01:00
extras Lots of cleanups (#366) 2017-03-07 19:23:08 +00:00
include A bunch of Solaris compatibility tweaks (#367) 2017-03-08 16:24:24 +00:00
plugins Lots of cleanups (#366) 2017-03-07 19:23:08 +00:00
.gitignore Ignore swap files 2016-07-30 14:12:27 +02:00
.travis.yml Added notifications 2016-05-12 08:23:32 +02:00
CHANGELOG.md Updated log 2017-03-06 15:42:47 +01:00
CONTRIBUTIONS.md Updated contributors guide 2016-10-28 16:38:09 +02:00
CONTRIBUTORS.md Added translator 2016-11-21 15:02:48 +01:00
FAQ Changed date and preparing for release 2017-02-09 13:35:40 +01:00
INSTALL Changed date and preparing for release 2017-02-09 13:35:40 +01:00
LICENSE Update of LICENSE file, which has version control texts in it 2014-10-06 14:00:47 +02:00
README Updated README 2016-08-04 17:00:48 +02:00
README.md Added link to ToolsWatch top 10 of 2016 2017-02-15 13:25:08 +01:00
default.prf Allow data uploads to be configured in profile 2017-02-21 15:40:06 +01:00
developer.prf Allow strict code checking for developers 2016-07-28 11:39:10 +02:00
lynis A bunch of Solaris compatibility tweaks (#367) 2017-03-08 16:24:24 +00:00
lynis.8 Updated man page 2016-10-13 20:13:44 +02:00

README.md

Build Status CII Best Practices Documentation


lynis

Lynis - Security auditing and hardening tool, for UNIX-based systems.

Lynis is a security auditing for UNIX derivatives like Linux, macOS, BSD, and others. It performs an in-depth security scan and runs on the system itself. The primary goal is to test security defenses and provide tips for further system hardening. It will also scan for general system information, vulnerable software packages, and possible configuration issues. Lynis was commonly used by people in the "blue team" to assess the security defenses of their systems. Nowadays, penetration testers also have Lynis in their toolkit.

We believe software should be simple, updated on a regular basis, and open. You should be able to trust, understand, and have the option to change the software. Many agree with us, as the software is being used by thousands every day to protect their systems.

Goals

The main goals are:

  • Automated security auditing
  • Compliance testing (e.g. ISO27001, PCI-DSS, HIPAA)
  • Vulnerability detection

The software (also) assists with:

  • Configuration management
  • Software patch management
  • System hardening
  • Penetration testing
  • Intrusion detection

Audience

Typical users of the software:

  • System administrators
  • Auditors
  • Security officers
  • Security professionals

Installation

Git

  1. Clone or download the project files (no compilation nor installation is required) ;

     git clone https://github.com/CISOfy/lynis
    
  2. Execute:

     ./lynis audit system
    

If you want to run the software as root, we suggest changing the ownership of the files. Use chown -R 0:0 to recursively alter the owner and group and set it to user ID 0 (root).

Package

Stable releases of Lynis are packaged and made available as RPM or DEB package. The CISOfy software repository can be used to install Lynis on systems running : CentOS, Debian, Fedora, OEL, openSUSE, RHEL, Ubuntu, and others.

Enterprise version

This software component is also part of an enterprise solution. Same quality, yet with more functionality.

Focus areas include compliance (PCI DSS, HIPAA, ISO27001, and others). The Enterprise version comes with:

  • a web interface and features a dashboard ;
  • hardening snippets ;
  • and an improvement plan.

Documentation

Full documentation: https://cisofy.com/documentation/lynis/.

Customization

If you want to create your own tests, have a look at the Lynis software development kit.

Security

We participate in the CII best practices badge program of the Linux Foundation.

Media and Awards

Lynis is collecting some awards and we are proud of that.

Contribute

We love contributors.

Do you have something to share? Or help out with translating Lynis into your own language? Create an issue or pull request on GitHub, or send us an e-mail: lynis-dev@cisofy.com.

More details can be found in the Contributors Guide.

You can also simply contribute to the project by starring the project and show your appreciation that way.

Thanks!

License

GPLv3