• Get In Touch
August 19, 2016

How-to Install and Use Lynis on Ubuntu 14.04

Want your very own server? Get our 1GB memory, Xeon V4, 25GB SSD VPS for £10.00 / month.
Get a Cloud Server

HP_NO_IMG/data/uploads/users/70fed463-d441-452e-bb7e-e0e3fa684498/1508448809.png” alt=”” />

Overview

Lynis is an open source security auditing tool used to evaluate the security defenses of Linux and UNIX-based systems.

It used by system administrator, security professional and auditors. It run on the host itself so that it can perform extensive security scannning.

Currently Lynis supports multiple operating systems, including:

  • AIX
  • FreeBSD
  • HP-UX
  • Linux
  • macOS
  • NetBSD
  • OpenBSD
  • Solaris

Lynis will run the tests in several steps:

  1. Determine operating system
  2. Search for available tools and utilities
  3. Check for Lynis update
  4. Run tests from enabled plugins
  5. Run security tests per category
  6. Report status of security scan

Lynis scanning is opportunistic. It means that it only uses what it can find on the system so our system will stay clean since we don’t need to install additional packages.

Even though Lynis do opportunistic scanning it will still be able to do in-depth scanning, whatever it found on the system that can be audited it will audit the item.

Several use cases for using Lynis include:

  • Security Audit
  • Compliance testing (PCI, HIPAA, SOx)
  • Vulnerability detection and scanning
  • System hardening

Lynis use multiple resources for testing. Some of them are:

  • Security best practices
  • CIS
  • NIST
  • OpenSCAP data
  • Vendor guides and recommendation (From Linux distrbution project / vendor)

Lynis can do additional tests using plugins. This can be seen as add-on or extension that will enhance its functionality.

You can get more information about Lynis from Lynis website. In this tutorial we’ll learn how-to install and use Lynis on Ubuntu 14.04 Trusty Tahr. Let’s get started.

Install Lynis On Ubuntu 14.04

First of all we need to add cisofy public key so we can verify the package downloaded from cisofy site.

    $ wget -O - http://packages.cisofy.com/keys/cisofy-software-public.key | sudo apt-key add - > /dev/null

Add Lynis repository to apt source list file. We will create new file inside /etc/apt/sources.list.d/ for easier maintenance.

    $ echo "deb [arch=amd64] https://packages.cisofy.com/community/lynis/deb/ trusty main" | sudo tee -a /etc/apt/sources.list.d/cisofy-lynis.list

Since we use https repository we need to install apt-transport-https. We can install this package using command below:

    $ sudo apt-get install apt-transport-https

If your ubuntu installation already have apt-transport-https package installed, you will get message below:

    ...
    apt-transport-https is already the newest version.
    ...

Let’s update apt metadata so apt know Lynis repository.

    $ sudo apt-get update

Now we’re ready to install Lynis. We can install Lynis using command below:

    $ sudo apt-get install lynis

Using Lynis

We can run in with root or without root privileges.

    $ lynis audit system

    [ Lynis 2.3.2 ]

    ################################################################################
      Lynis comes with ABSOLUTELY NO WARRANTY. This is free software, and you are
      welcome to redistribute it under the terms of the GNU General Public License.
      See the LICENSE file for details about using this software.

      2007-2016, CISOfy - https://cisofy.com/lynis/
      Enterprise support available (compliance, plugins, interface and tools)
    ################################################################################


    [+] Initializing program
    ------------------------------------

      ###################################################################
      #                                                                 #
      #   NON-PRIVILEGED SCAN MODE                                      #
      #                                                                 #
      ###################################################################

      NOTES:
      --------------
      * Some tests will be skipped (as they require root permissions)
      * Some tests might fail silently or give different results

      - Detecting OS...                                           [ DONE ]
      - Checking profiles...                                      [ DONE ]

      ---------------------------------------------------
      Program version:           2.3.2
      Operating system:          Linux
      Operating system name:     Ubuntu
      Operating system version:  14.04
      Kernel version:            3.13.0
      Hardware platform:         x86_64
      Hostname:                  vagrant-ubuntu-trusty-64
      ---------------------------------------------------
      Profiles:                  /etc/lynis/default.prf
      Log file:                  /tmp/lynis.log
      Report file:               /tmp/lynis-report.dat
      Report version:            1.0
      Plugin directory:          /usr/share/lynis/plugins
      ---------------------------------------------------
      Auditor:                   [Not Specified]
      Test category:             all
      Test group:                all
      ---------------------------------------------------
      - Program update status...                                  [ NO UPDATE ]

    [+] System Tools
    ------------------------------------
      - Scanning available tools...
      - Checking system binaries...

    [+] Plugins (phase 1)
    ------------------------------------
     Note: plugins have more extensive tests and may take several minutes to complete

      - Plugins enabled                                           [ NONE ]

    [+] Boot and services
    ------------------------------------
      - Service Manager                                           [ SysV Init ]
      - Checking presence GRUB                                    [ OK ]
      - Checking presence GRUB2                                   [ FOUND ]
        - Checking for password protection                        [ WARNING ]
      - Check services at startup (rc2.d)                         [ DONE ]
        Result: found 12 services
      - Check startup files (permissions)                         [ OK ]

    [+] Kernel
    ------------------------------------
      - Checking default run level                                [ RUNLEVEL 2 ]
      - Checking CPU support (NX/PAE)
        CPU support: PAE and/or NoeXecute supported               [ FOUND ]
      - Checking kernel version and release                       [ DONE ]
      - Checking kernel type                                      [ DONE ]
      - Checking loaded kernel modules                            [ DONE ]
          Found 26 active modules
      - Checking Linux kernel configuration file                  [ FOUND ]
      - Checking default I/O kernel scheduler                     [ FOUND ]
      - Checking for available kernel update                      [ OK ]
      - Checking core dumps configuration                         [ DISABLED ]
        - Checking setuid core dumps configuration                [ PROTECTED ]
      - Check if reboot is needed                                 [ NO ]

    [+] Memory and Processes
    ------------------------------------
      - Checking /proc/meminfo                                    [ FOUND ]
      - Searching for dead/zombie processes                       [ OK ]
      - Searching for IO waiting processes                        [ OK ]

    [+] Users, Groups and Authentication
    ------------------------------------
      - Administrator accounts                                    [ OK ]
      - Unique UIDs                                               [ OK ]
      - Unique group IDs                                          [ OK ]
      - Unique group names                                        [ OK ]
      - Password file consistency                                 [ SUGGESTION ]
      - Query system users (non daemons)                          [ DONE ]
      - NIS+ authentication support                               [ NOT ENABLED ]
      - NIS authentication support                                [ NOT ENABLED ]
      - sudoers file                                              [ FOUND ]
        - Check sudoers file permissions                          [ OK ]
      - PAM password strength tools                               [ SUGGESTION ]
      - PAM configuration files (pam.conf)                        [ FOUND ]
      - PAM configuration files (pam.d)                           [ FOUND ]
      - PAM modules                                               [ FOUND ]
      - LDAP module in PAM                                        [ NOT FOUND ]
      - Accounts without expire date                              [ OK ]
      - Accounts without password                                 [ OK ]
      - Checking user password aging (minimum)                    [ DISABLED ]
      - User password aging (maximum)                             [ DISABLED ]
      - Determining default umask
        - umask (/etc/profile)                                    [ NOT FOUND ]
        - umask (/etc/login.defs)                                 [ SUGGESTION ]
        - umask (/etc/init.d/rc)                                  [ SUGGESTION ]
      - LDAP authentication support                               [ NOT ENABLED ]
      - Logging failed login attempts                             [ ENABLED ]

    [+] Shells
    ------------------------------------
      - Checking shells from /etc/shells
        Result: found 6 shells (valid shells: 6).
        - Session timeout settings/tools                          [ NONE ]
      - Checking default umask values
        - Checking default umask in /etc/bash.bashrc              [ NONE ]
        - Checking default umask in /etc/profile                  [ NONE ]

    [+] File systems
    ------------------------------------
      - Checking mount points
        - Checking /home mount point                              [ SUGGESTION ]
        - Checking /tmp mount point                               [ SUGGESTION ]
        - Checking /var mount point                               [ SUGGESTION ]
      - Query swap partitions (fstab)                             [ NONE ]
      - Testing swap partitions                                   [ CHECK NEEDED ]
      - Testing proc mount                                        [ SUGGESTION ]
      - Checking for old files in /tmp                            [ OK ]
      - Checking /tmp sticky bit                                  [ OK ]
      - Mount options of /                                        [ OK ]
      - Checking Locate database                                  [ NOT FOUND ]
      - Disable kernel support of some filesystems
        - Discovered kernel modules: squashfs udf 

    [+] Storage
    ------------------------------------
      - Checking usb-storage driver (modprobe config)             [ NOT DISABLED ]
      - Checking USB devices authorization                        [ DISABLED ]
      - Checking firewire ohci driver (modprobe config)           [ DISABLED ]

    [+] NFS
    ------------------------------------
      - Query rpc registered programs                             [ DONE ]
      - Query NFS versions                                        [ DONE ]
      - Query NFS protocols                                       [ DONE ]
      - Check running NFS daemon                                  [ NOT FOUND ]

    [+] Name services
    ------------------------------------
      - Searching DNS domain name                                 [ FOUND ]
          Domain name: vagrant-ubuntu-trusty-64
      - Checking /etc/hosts
        - Checking /etc/hosts (duplicates)                        [ OK ]
        - Checking /etc/hosts (hostname)                          [ SUGGESTION ]
        - Checking /etc/hosts (localhost)                         [ OK ]

    [+] Ports and packages
    ------------------------------------
      - Searching package managers
        - Searching dpkg package manager                          [ FOUND ]
          - Querying package manager
        - Query unpurged packages                                 [ NONE ]
      - Checking security repository in sources.list file         [ OK ]
      - Checking upgradeable packages                             [ SKIPPED ]
      - Checking package audit tool                               [ NONE ]

    [+] Networking
    ------------------------------------
      - Checking IPv6 configuration                               [ ENABLED ]
          Configuration method                                    [ AUTO ]
          IPv6 only                                               [ NO ]
      - Checking configured nameservers
        - Testing nameservers
            Nameserver: 10.0.2.3                                  [ OK ]
        - Minimal of 2 responsive nameservers                     [ WARNING ]
      - Checking default gateway                                  [ DONE ]
      - Getting listening ports (TCP/UDP)                         [ DONE ]
          * Found 16 ports
      - Checking promiscuous interfaces                           [ OK ]
      - Checking waiting connections                              [ OK ]
      - Checking status DHCP client                               [ RUNNING ]
      - Checking for ARP monitoring software                      [ NOT FOUND ]

    [+] Printers and Spools
    ------------------------------------
      - Checking cups daemon                                      [ NOT FOUND ]
      - Checking lp daemon                                        [ NOT RUNNING ]

    [+] Software: e-mail and messaging
    ------------------------------------
      - Checking Exim status                                      [ NOT FOUND ]
      - Checking Postfix status                                   [ NOT FOUND ]
      - Checking Dovecot status                                   [ NOT FOUND ]
      - Checking Qmail status                                     [ NOT FOUND ]
      - Checking Sendmail status                                  [ NOT FOUND ]

    [+] Software: firewalls
    ------------------------------------
      - Checking iptables kernel module                           [ NOT FOUND ]
      - Checking host based firewall                              [ NOT ACTIVE ]

    [+] Software: webserver
    ------------------------------------
      - Checking Apache                                           [ NOT FOUND ]
      - Checking nginx                                            [ NOT FOUND ]

    [+] SSH Support
    ------------------------------------
      - Checking running SSH daemon                               [ FOUND ]
        - Searching SSH configuration                             [ FOUND ]
        - SSH option: AllowTcpForwarding                          [ SUGGESTION ]
        - SSH option: ClientAliveCountMax                         [ SUGGESTION ]
        - SSH option: ClientAliveInterval                         [ OK ]
        - SSH option: Compression                                 [ SUGGESTION ]
        - SSH option: FingerprintHash                             [ NOT FOUND ]
        - SSH option: GatewayPorts                                [ OK ]
        - SSH option: IgnoreRhosts                                [ OK ]
        - SSH option: LoginGraceTime                              [ OK ]
        - SSH option: LogLevel                                    [ SUGGESTION ]
        - SSH option: MaxAuthTries                                [ SUGGESTION ]
        - SSH option: MaxSessions                                 [ SUGGESTION ]
        - SSH option: PermitRootLogin                             [ SUGGESTION ]
        - SSH option: PermitUserEnvironment                       [ OK ]
        - SSH option: PermitTunnel                                [ OK ]
        - SSH option: Port                                        [ SUGGESTION ]
        - SSH option: PrintLastLog                                [ OK ]
        - SSH option: Protocol                                    [ OK ]
        - SSH option: StrictModes                                 [ OK ]
        - SSH option: TCPKeepAlive                                [ SUGGESTION ]
        - SSH option: UseDNS                                      [ SUGGESTION ]
        - SSH option: UsePrivilegeSeparation                      [ SUGGESTION ]
        - SSH option: VerifyReverseMapping                        [ NOT FOUND ]
        - SSH option: X11Forwarding                               [ SUGGESTION ]
        - SSH option: AllowAgentForwarding                        [ NOT FOUND ]
        - SSH option: AllowUsers                                  [ NOT FOUND ]
        - SSH option: AllowGroups                                 [ NOT FOUND ]

    [+] SNMP Support
    ------------------------------------
      - Checking running SNMP daemon                              [ NOT FOUND ]

    [+] Databases
    ------------------------------------
        No database engines found

    [+] LDAP Services
    ------------------------------------
      - Checking OpenLDAP instance                                [ NOT FOUND ]

    [+] PHP
    ------------------------------------
      - Checking PHP                                              [ NOT FOUND ]

    [+] Squid Support
    ------------------------------------
      - Checking running Squid daemon                             [ NOT FOUND ]

    [+] Logging and files
    ------------------------------------
      - Checking for a running log daemon                         [ OK ]
        - Checking Syslog-NG status                               [ NOT FOUND ]
        - Checking systemd journal status                         [ NOT FOUND ]
        - Checking Metalog status                                 [ NOT FOUND ]
        - Checking RSyslog status                                 [ FOUND ]
        - Checking RFC 3195 daemon status                         [ NOT FOUND ]
        - Checking minilogd instances                             [ NOT FOUND ]
      - Checking logrotate presence                               [ OK ]
      - Checking log directories (static list)                    [ DONE ]
      - Checking open log files                                   [ DONE ]
      - Checking deleted files in use                             [ DONE ]

    [+] Insecure services
    ------------------------------------
      - Checking inetd status                                     [ NOT ACTIVE ]

    [+] Banners and identification
    ------------------------------------
      - /etc/issue                                                [ FOUND ]
        - /etc/issue contents                                     [ WEAK ]
      - /etc/issue.net                                            [ FOUND ]
        - /etc/issue.net contents                                 [ WEAK ]

    [+] Scheduled tasks
    ------------------------------------
    find: `/var/spool/cron/crontabs': Permission denied
      - Checking crontab/cronjob                                  [ DONE ]

    [+] Accounting
    ------------------------------------
      - Checking accounting information                           [ NOT FOUND ]
      - Checking sysstat accounting data                          [ NOT FOUND ]
      - Checking auditd                                           [ NOT FOUND ]

    [+] Time and Synchronization
    ------------------------------------
      - Checking event based ntpdate (if-up)                      [ FOUND ]
      - Checking for a running NTP daemon or client               [ OK ]

    [+] Cryptography
    ------------------------------------
      - Checking for expired SSL certificates                     [ NONE ]

    [+] Virtualization
    ------------------------------------

    [+] Containers
    ------------------------------------

    [+] Security frameworks
    ------------------------------------
      - Checking presence AppArmor                                [ FOUND ]
    You do not have enough privilege to read the profile set.
        - Checking AppArmor status                                [ UNKNOWN ]
      - Checking presence SELinux                                 [ NOT FOUND ]
      - Checking presence grsecurity                              [ NOT FOUND ]
      - Checking for implemented MAC framework                    [ NONE ]

    [+] Software: file integrity
    ------------------------------------
      - Checking file integrity tools
      - Checking presence integrity tool                          [ NOT FOUND ]

    [+] Software: System tooling
    ------------------------------------
      - Checking automation tooling
        Found: Puppet (agent)                                     [ FOUND ]
      - Automation tooling                                        [ FOUND ]
      - Checking for IDS/IPS tooling                              [ NONE ]

    [+] Software: Malware
    ------------------------------------

    [+] File Permissions
    ------------------------------------
      - Starting file permissions check
        /etc/lilo.conf                                            [ NOT FOUND ]
        /root/.ssh                                                [ NOT FOUND ]

    [+] Home directories
    ------------------------------------
      - Checking shell history files                              [ OK ]

    [+] Kernel Hardening
    ------------------------------------
      - Comparing sysctl key pairs with scan profile
        - kernel.core_uses_pid (exp: 1)                           [ DIFFERENT ]
        - kernel.ctrl-alt-del (exp: 0)                            [ OK ]
        - kernel.kptr_restrict (exp: 2)                           [ DIFFERENT ]
        - kernel.sysrq (exp: 0)                                   [ DIFFERENT ]
        - net.ipv4.conf.all.accept_redirects (exp: 0)             [ DIFFERENT ]
        - net.ipv4.conf.all.accept_source_route (exp: 0)          [ OK ]
        - net.ipv4.conf.all.bootp_relay (exp: 0)                  [ OK ]
        - net.ipv4.conf.all.forwarding (exp: 0)                   [ OK ]
        - net.ipv4.conf.all.log_martians (exp: 1)                 [ DIFFERENT ]
        - net.ipv4.conf.all.mc_forwarding (exp: 0)                [ OK ]
        - net.ipv4.conf.all.proxy_arp (exp: 0)                    [ OK ]
        - net.ipv4.conf.all.rp_filter (exp: 1)                    [ OK ]
        - net.ipv4.conf.all.send_redirects (exp: 0)               [ DIFFERENT ]
        - net.ipv4.conf.default.accept_redirects (exp: 0)         [ DIFFERENT ]
        - net.ipv4.conf.default.accept_source_route (exp: 0)      [ DIFFERENT ]
        - net.ipv4.conf.default.log_martians (exp: 1)             [ DIFFERENT ]
        - net.ipv4.icmp_echo_ignore_broadcasts (exp: 1)           [ OK ]
        - net.ipv4.icmp_ignore_bogus_error_responses (exp: 1)     [ OK ]
        - net.ipv4.tcp_syncookies (exp: 1)                        [ OK ]
        - net.ipv4.tcp_timestamps (exp: 0)                        [ DIFFERENT ]
        - net.ipv6.conf.all.accept_redirects (exp: 0)             [ DIFFERENT ]
        - net.ipv6.conf.all.accept_source_route (exp: 0)          [ OK ]
        - net.ipv6.conf.default.accept_redirects (exp: 0)         [ DIFFERENT ]
        - net.ipv6.conf.default.accept_source_route (exp: 0)      [ OK ]

    [+] Hardening
    ------------------------------------
        - Installed compiler(s)                                   [ FOUND ]
        - Installed malware scanner                               [ NOT FOUND ]

    [+] Custom Tests
    ------------------------------------
      - Running custom tests...                                   [ NONE ]

    [+] Plugins (phase 2)
    ------------------------------------

    ================================================================================

      -[ Lynis 2.3.2 Results ]-

      Warnings (1):
      ----------------------------
      ! Install a package audit tool to determine vulnerable packages [NETW-2705] 
          https://cisofy.com/controls/NETW-2705/

      Suggestions (41):
      ----------------------------
      * Set a password on GRUB bootloader to prevent altering boot configuration (e.g. boot in single user mode without password) [BOOT-5122] 
          https://cisofy.com/controls/BOOT-5122/

      * Run pwck manually and correct any errors in the password file [AUTH-9228] 
          https://cisofy.com/controls/AUTH-9228/

      * Install a PAM module for password strength testing like pam_cracklib or pam_passwdqc [AUTH-9262] 
          https://cisofy.com/controls/AUTH-9262/

      * Configure minimum password age in /etc/login.defs [AUTH-9286] 
          https://cisofy.com/controls/AUTH-9286/

      * Configure maximum password age in /etc/login.defs [AUTH-9286] 
          https://cisofy.com/controls/AUTH-9286/

      * Default umask in /etc/login.defs could be more strict like 027 [AUTH-9328] 
          https://cisofy.com/controls/AUTH-9328/

      * Default umask in /etc/init.d/rc could be more strict like 027 [AUTH-9328] 
          https://cisofy.com/controls/AUTH-9328/

      * To decrease the impact of a full /home file system, place /home on a separated partition [FILE-6310] 
          https://cisofy.com/controls/FILE-6310/

      * To decrease the impact of a full /tmp file system, place /tmp on a separated partition [FILE-6310] 
          https://cisofy.com/controls/FILE-6310/

      * To decrease the impact of a full /var file system, place /var on a separated partition [FILE-6310] 
          https://cisofy.com/controls/FILE-6310/

      * Check your /etc/fstab file for swap partition mount options [FILE-6336] 
          https://cisofy.com/controls/FILE-6336/

      * The database required for 'locate' could not be found. Run 'updatedb' or 'locate.updatedb' to create this file. [FILE-6410] 
          https://cisofy.com/controls/FILE-6410/

      * Disable drivers like USB storage when not used, to prevent unauthorized storage or data theft [STRG-1840] 
          https://cisofy.com/controls/STRG-1840/

      * Add the IP name and FQDN to /etc/hosts for proper name resolving [NAME-4404] 
          https://cisofy.com/controls/NAME-4404/

      * Install debsums utility for the verification of packages with known good database. [PKGS-7370] 
          https://cisofy.com/controls/PKGS-7370/

      * Install package apt-show-versions for patch management purposes [PKGS-7394] 
          https://cisofy.com/controls/PKGS-7394/

      * Install a package audit tool to determine vulnerable packages [PKGS-7398] 
          https://cisofy.com/controls/PKGS-7398/

      * Check your resolv.conf file and fill in a backup nameserver if possible [NETW-2705] 
          https://cisofy.com/controls/NETW-2705/

      * Consider running ARP monitoring software (arpwatch) [NETW-3032] 
          https://cisofy.com/controls/NETW-3032/

      * Configure a firewall/packet filter to filter incoming and outgoing traffic [FIRE-4590] 
          https://cisofy.com/controls/FIRE-4590/

      * Consider hardening SSH configuration [SSH-7408] 
        - Details: AllowTcpForwarding (YES --> NO)
          https://cisofy.com/controls/SSH-7408/

      * Consider hardening SSH configuration [SSH-7408] 
        - Details: ClientAliveCountMax (3 --> 2)
          https://cisofy.com/controls/SSH-7408/

      * Consider hardening SSH configuration [SSH-7408] 
        - Details: Compression (DELAYED --> NO)
          https://cisofy.com/controls/SSH-7408/

      * Consider hardening SSH configuration [SSH-7408] 
        - Details: LogLevel (INFO --> VERBOSE)
          https://cisofy.com/controls/SSH-7408/

      * Consider hardening SSH configuration [SSH-7408] 
        - Details: MaxAuthTries (6 --> 1)
          https://cisofy.com/controls/SSH-7408/

      * Consider hardening SSH configuration [SSH-7408] 
        - Details: MaxSessions (10 --> 2)
          https://cisofy.com/controls/SSH-7408/

      * Consider hardening SSH configuration [SSH-7408] 
        - Details: PermitRootLogin (WITHOUT-PASSWORD --> NO)
          https://cisofy.com/controls/SSH-7408/

      * Consider hardening SSH configuration [SSH-7408] 
        - Details: Port (22 --> )
          https://cisofy.com/controls/SSH-7408/

      * Consider hardening SSH configuration [SSH-7408] 
        - Details: TCPKeepAlive (YES --> NO)
          https://cisofy.com/controls/SSH-7408/

      * Consider hardening SSH configuration [SSH-7408] 
        - Details: UseDNS (YES --> NO)
          https://cisofy.com/controls/SSH-7408/

      * Consider hardening SSH configuration [SSH-7408] 
        - Details: UsePrivilegeSeparation (YES --> SANDBOX)
          https://cisofy.com/controls/SSH-7408/

      * Consider hardening SSH configuration [SSH-7408] 
        - Details: X11Forwarding (YES --> NO)
          https://cisofy.com/controls/SSH-7408/

      * Add a legal banner to /etc/issue, to warn unauthorized users [BANN-7126] 
          https://cisofy.com/controls/BANN-7126/

      * Add legal banner to /etc/issue.net, to warn unauthorized users [BANN-7130] 
          https://cisofy.com/controls/BANN-7130/

      * Enable process accounting [ACCT-9622] 
          https://cisofy.com/controls/ACCT-9622/

      * Enable sysstat to collect accounting (no results) [ACCT-9626] 
          https://cisofy.com/controls/ACCT-9626/

      * Enable auditd to collect audit information [ACCT-9628] 
          https://cisofy.com/controls/ACCT-9628/

      * Install a file integrity tool to monitor changes to critical and sensitive files [FINT-4350] 
          https://cisofy.com/controls/FINT-4350/

      * One or more sysctl values differ from the scan profile and could be tweaked [KRNL-6000] 
          https://cisofy.com/controls/KRNL-6000/

      * Harden compilers like restricting access to root user only [HRDN-7222] 
          https://cisofy.com/controls/HRDN-7222/

      * Harden the system by installing at least one malware scanner, to perform periodic file system scans [HRDN-7230] 
          https://cisofy.com/controls/HRDN-7230/

      Follow-up:
      ----------------------------
      - Check the logfile for more details (less /tmp/lynis.log)
      - Read security controls texts (https://cisofy.com)
      - Use --upload to upload data (Lynis Enterprise users)

    ================================================================================

      Lynis security scan details:

      Hardening index : 60 [############        ]
      Tests performed : 190
      Plugins enabled : 0

      Components:
      - Firewall               [X]
      - Malware scanner        [X]

      Lynis Modules:
      - Compliance Status      [?]
      - Security Audit         [V]
      - Vulnerability Scan     [V]

      Files:
      - Test and debug information      : /tmp/lynis.log
      - Report data                     : /tmp/lynis-report.dat

    ================================================================================

      Skipped tests due to non-privileged mode
        BOOT-5102 - Check for AIX boot device
        BOOT-5106 - Check EFI boot file on Mac OS X
        BOOT-5116 - Check if system is booted in UEFI mode
        AUTH-9216 - Check group and shadow group files
        AUTH-9254 - Solaris passwordless accounts
        AUTH-9288 - Checking for expired passwords
        FILE-6368 - Checking ACL support on root file system
        PKGS-7390 - Check Ubuntu database consistency
        PKGS-7392 - Check for Debian/Ubuntu security updates
        FIRE-4508 - Check used policies of iptables chains
        FIRE-4512 - Check iptables for empty ruleset
        FIRE-4513 - Check iptables for unused rules
        ACCT-9630 - Check for auditd rules

    ================================================================================

      Lynis 2.3.2

      Auditing, system hardening, and compliance for UNIX-based systems
      (Linux, macOS, BSD, and others)

      2007-2016, CISOfy - https://cisofy.com/lynis/
      Enterprise support available (compliance, plugins, interface and tools)

    ================================================================================

      [TIP]: Enhance Lynis audits by adding your settings to custom.prf (see /etc/lynis/default.prf for all settings)


To run with root / sudo privileges we can use command below

    $ sudo lynis audit system

To check Lynis version, we can use command below:

    $ lynis show version
    2.3.2

To show update info we can use command below:

    $ lynis update info

     == Lynis ==

      Version         : 2.3.2
      Status          : Up-to-date
      Release date    : 2016-08-09
      Update location : https://cisofy.com/lynis/


    2007-2016, CISOfy - https://cisofy.com/lynis/

Summary

In this tutorial we learned how-to install Lynis system audit on Ubuntu 14.04. We also learned how-to use Lynis to audit our systems.

Want your very own server? Get our 1GB memory, Xeon V4, 25GB SSD VPS for £10.00 / month.
Get a Cloud Server

Share this Article!

Related Posts

Node.js Authentication – A Complete Guide with Passport and JWT

Node.js Authentication – A Complete Guide with Passport and JWT

Truth be told, it’s difficult for a web application that doesn’t have some kind of identification, even if you don’t see it as a security measure in and of itself. The Internet is a kind of lawless land, and even on free services like Google’s, authentication ensures that abuses will be avoided or at least […]

Node.js and MongoDB: How to Connect MongoDB With Node

Node.js and MongoDB: How to Connect MongoDB With Node

MongoDB is a document-oriented NoSQL database, which was born in 2007 in California as a service to be used within a larger project, but which soon became an independent and open-source product. It stores documents in JSON, a format based on JavaScript and simpler than XML, but still with good expressiveness. It is the dominant […]

Using MySQL with Node.js: A Complete Tutorial

Using MySQL with Node.js: A Complete Tutorial

Although data persistence is almost always a fundamental element of applications, Node.js has no native integration with databases. Everything is delegated to third-party libraries to be included manually, in addition to the standard APIs. Although MongoDB and other non-relational databases are the most common choice with Node because if you need to scale an application, […]

Node.Js Vs Django: Which Is the Best for Your Project

Node.Js Vs Django: Which Is the Best for Your Project

Django and NodeJs are two powerful technologies for web development, both have great functionality, versatile applications, and a great user interface. Both are open source and can be used for free. But which one fits your project best? NodeJs is based on JavaScript, while Django is written in Python. These are two equally popular technologies […]

Nodejs Vs PHP:  Which Works Best?

Nodejs Vs PHP: Which Works Best?

Before getting into the “battle” between Node.js and PHP we need to understand why the issue is still ongoing. It all started with the increased demand for smartphone applications, their success forcing developers to adapt to new back-end technologies that could handle a multitude of simultaneous requests. JavaScript has always been identified as a client-side […]