Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/CISOfy/lynis.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CHANGELOG.md71
-rw-r--r--CONTRIBUTING.md4
-rw-r--r--db/languages/de50
-rw-r--r--db/languages/en48
-rw-r--r--db/languages/fr86
-rw-r--r--db/languages/it34
-rw-r--r--db/software-eol.db80
-rw-r--r--db/tests.db4
-rw-r--r--extras/bash_completion.d/lynis2
-rw-r--r--include/binaries7
-rw-r--r--include/consts13
-rw-r--r--include/functions35
-rw-r--r--include/helper_audit_dockerfile10
-rw-r--r--include/helper_configure2
-rw-r--r--include/osdetection152
-rw-r--r--include/profiles9
-rw-r--r--include/report8
-rw-r--r--include/tests_accounting15
-rw-r--r--include/tests_authentication61
-rw-r--r--include/tests_banners2
-rw-r--r--include/tests_boot_services4
-rw-r--r--include/tests_containers2
-rw-r--r--include/tests_crypto52
-rw-r--r--include/tests_databases2
-rw-r--r--include/tests_dns4
-rw-r--r--include/tests_file_integrity2
-rw-r--r--include/tests_file_permissions2
-rw-r--r--include/tests_filesystems12
-rw-r--r--include/tests_firewalls6
-rw-r--r--include/tests_hardening2
-rw-r--r--include/tests_homedirs2
-rw-r--r--include/tests_insecure_services10
-rw-r--r--include/tests_kernel28
-rw-r--r--include/tests_kernel_hardening4
-rw-r--r--include/tests_ldap2
-rw-r--r--include/tests_logging2
-rw-r--r--include/tests_mac_frameworks12
-rw-r--r--include/tests_mail_messaging2
-rw-r--r--include/tests_malware14
-rw-r--r--include/tests_nameservices2
-rw-r--r--include/tests_networking6
-rw-r--r--include/tests_ports_packages20
-rw-r--r--include/tests_printers_spoolers2
-rw-r--r--include/tests_scheduling2
-rw-r--r--include/tests_shells2
-rw-r--r--include/tests_snmp2
-rw-r--r--include/tests_squid2
-rw-r--r--include/tests_ssh2
-rw-r--r--include/tests_storage2
-rw-r--r--include/tests_system_integrity2
-rw-r--r--include/tests_time17
-rw-r--r--include/tests_tooling29
-rw-r--r--include/tests_usb2
-rw-r--r--include/tests_virtualization2
-rw-r--r--include/tests_webservers2
-rwxr-xr-xlynis12
56 files changed, 763 insertions, 202 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 213fbe89..bbf8e892 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,9 +1,37 @@
# Lynis Changelog
-## Lynis 3.0.1 (not released yet)
+## Lynis 3.0.2 (not released yet)
+
+### Added
+- AUTH-9284 - Scan for locked user accounts in /etc/passwd
+- TOOL-5130 - Check for active Suricata daemon
+- OS detection of Flatcar, IPFire, Mageia, NixOS, ROSA Linux, SLES (extended), Void Linux, Zorin OS
+- OS detection of OpenIndiana (Hipster and Legacy), Shillix, SmartOS, Tribblix, and others
+- EOL dates for Alpine, macOS, Mageia, OmniosCE, and Solaris 11
+
+### Changed
+- ACCT-9626 - Detect sysstat systemd unit
+- KRNL-5830 - Improved reboot test by ignoring known bad values
+- KRNL-5830 - Ignore rescue kernel such as on CentOS systems
+- KRNL-5830 - Detection of Alpine Linux kernel
+- NETW-2400 - Compatibility change for hostname check
+- PKGS-7410 - Don't show exception if no kernels were found on the disk
+- TIME-3185 - Supports now checking files at multiple locations (systemd)
+- ParseNginx function: Support include on absolute paths
+- ParseNginx function: Ignore empty included wildcards
+- Set 'RHEL' as OS_NAME for Red Hat Enterprise Linux
+- French translation file improved and translations extended
+- Test if pgrep exists before using it
+- Better support for busybox shell
+- Small code enhancements
+
+---------------------------------------------------------------------------------
+
+## Lynis 3.0.1 (2020-10-05)
### Added
- Detection of Alpine Linux
+- Detection of CloudLinux
- Detection of Kali Linux
- Detection of Linux Mint
- Detection of macOS Big Sur (11.0)
@@ -18,8 +46,9 @@
- AUTH-9229 - Added option for LOCKED accounts and bugfix for older bash versions
- BOOT-5122 - Presence check for grub.d added
- CRYP-7902 - Added support for certificates in DER format
+- CRYP-7931 - Added data to report
- CRYP-7931 - Redirect errors (e.g. when swap is not encrypted)
-- FILE-6430 - Don't grep nonexistant modprobe.d files
+- FILE-6430 - Don't grep nonexistent modprobe.d files
- FIRE-4535 - Set initial firewall state
- INSE-8312 - Corrected text on screen
- KRNL-5728 - Handle zipped kernel configuration correctly
@@ -137,7 +166,7 @@ Using the relevant options, the scan will change base on the intended goal.
- AUTH-9268 - Perform test also on DragonFly, FreeBSD, and NetBSD
- AUTH-9282 - fix: temporary variable was overwritten
- AUTH-9408 - added support for pam_tally2 to log failed logins
-- AUTH-9489 - test removedd as it is merged with AUTH-9218
+- AUTH-9489 - test removed as it is merged with AUTH-9218
- BANN-7126 - additional words for login banner are accepted
- BOOT-5122 - check for defined password in all GRUB configuration files
- CONT-8106 - support newer 'docker info' output
@@ -423,7 +452,7 @@ Tests:
* [AUTH-9308] - Made 'sulogin' more generic for systemd rescue shell
* [DNS-1600] - Initial work on DNSSEC validation testing
* [NETW-2704] - Added support for local resolver 127.0.0.53
-* [PHP-2379] - Suhosin test disbled
+* [PHP-2379] - Suhosin test disabled
* [SSH-7408] - Removed 'DELAYED' from OpenSSH Compression setting
* [TIME-3160] - Improvements to detect step-tickers file and entries
@@ -670,7 +699,7 @@ Changes:
* Renamed some variables to better indicate their purpose (counting, data type)
* Removal of unused code and comments
* Deleted unused tests from database file
-* Correct levels of identation
+* Correct levels of indentation
* Support for older mac OS X versions (Lion and Mountain Lion)
* Initialized variables for more binaries
* Additional sysctls are tested
@@ -1331,7 +1360,7 @@ Functions
* AddSetting - New function to store settings (lynis show settings)
* ContainsString - New function to search for a string in another one
* Display - Added --debug, showing details on screen in debug mode
- - Reset identation for lines which are too long
+ - Reset indentation for lines which are too long
* DisplayToolTip - New function to display tooltips
* IsDebug - Check for usage of --debug
* IsDeveloperMode - Status for development and debugging (--developer)
@@ -1404,7 +1433,7 @@ release.
------------
The biggest change in this release is the optimization of several functions. It
allows for better detection, and dealing with the quirks, of every single
-operating system. Some functions were fortified to handle unexcepted results
+operating system. Some functions were fortified to handle unexpected results
better, like missing a particular binary, or not returning the hostname.
This release also enables tests to be shorter, by adding new functions. Some
@@ -1682,7 +1711,7 @@ Added tests for CSF's lfd utility for integrity monitoring on directories and
files. Related tests are FINT-4334 and FINT-4336.
Added support for Chrony time daemon and timesync daemon. Additionally NTP
-sychronization status is checked when it is enabled.
+synchronization status is checked when it is enabled.
Improved single user mode protection on the rescue.service file.
@@ -2264,7 +2293,7 @@ Lynis 1.4.2 (2014-02-19)
Changes:
- Ignore interfaces aliases for HostID
- Extended umask tests with pam_umask entries [AUTH-9328]
- - Check for supressed version on Squid [SQD-3680]
+ - Check for suppressed version on Squid [SQD-3680]
---------------------------------------------------------------------------------
@@ -2277,7 +2306,7 @@ Lynis 1.4.1 (2014-02-15)
- Added 64 bits locations for Apache modules
- Add start of new category to logfile
- Extended sysstat test with /etc/cron.d/sysstat [ACCT-9626]
- - Extended cron job tests with entries start with asterix (*) [SCHD-7704]
+ - Extended cron job tests with entries start with asterisk (*) [SCHD-7704]
- Additional check for multiple umask entries (like RHEL 6.x) [AUTH-9328]
- Adjusted PHP test for register_globals (explicit test) [PHP-2368]
- Small adjustments for upcoming plugin support
@@ -2404,7 +2433,7 @@ Lynis 1.3.6 (2013-12-03)
- Adjusted PHP check to find ini files [PHP-2211]
- Skip Apache test for NetBSD [HTTP-6622]
- Skip test http version check for NetBSD [HTTP-6624]
- - Additional check to supress sort error [HTTP-6626]
+ - Additional check to suppress sort error [HTTP-6626]
- Improved the way binaries are checked (less disk reads)
- Adjusted ReportWarning() function to skip impact rating
- Improved report on screen by leaving out date/time and type
@@ -2440,7 +2469,7 @@ Lynis 1.3.5 (2013-11-19)
- Added suggestion about BIND version [NAME-4210]
- Merged test NTP daemon test TIME-3108 into TIME-3104
- Improved support for Arch Linux (output, detection)
- - Extended common list of directories with SSL certifcates in profile
+ - Extended common list of directories with SSL certificates in profile
- New function GetHostID() to determine an unique identifier of the machine
- Added a tests_custom file template
- Perform file permissions test on tests_custom file
@@ -2483,7 +2512,7 @@ Lynis 1.3.3 (2013-10-24)
Lynis 1.3.2 (2013-10-09)
New:
- - Test for PowerDNS authoritive servers (master/slave status) [NAME-4238]
+ - Test for PowerDNS authoritative servers (master/slave status) [NAME-4238]
Changes:
- CUPS test extended with hardening rules [PRNT-2308]
@@ -2530,7 +2559,7 @@ Lynis 1.3.0 (2011-12-25)
- Fixed incorrect warning for single user mode [AUTH-9308]
- Improved output for stratum 16 time servers [TIME-3116]
- Added suggestion and screen output for kernel hardening [KRNL-6000]
- - Screen layout optimalizations and log file improvements
+ - Screen layout optimizations and log file improvements
- Improved list/layout of scan options
- Improved binary check for compilers
- Added configuration option in scan profile (show_tool_tips, default true)
@@ -3093,7 +3122,7 @@ Lynis 1.1.5 (2008-06-10)
- Improved FreeBSD pkg_info output, logging output and report data [PKG-7302]
- Changed shell history file test, searching files with maxdepth 1 [HOME-9310]
- Extended iptables test, to check Linux kernel configuration file [FIRE-4511]
- - Added report warning to promicuous test [NETW-3014]
+ - Added report warning to promiscuous test [NETW-3014]
- Fixed yellow color when being used at text display
- Several logging improvements and cleanups
@@ -3162,11 +3191,11 @@ Lynis 1.1.2 (2008-05-11)
- Improved LILO test and removed double message
- Fixed incorrect message when using --help parameter
- Improved portaudit test (FreeBSD) to show unique packages only
- - Updated man page, FAQ, extended documention with plugin information
+ - Updated man page, FAQ, extended documentation with plugin information
- Added several php.ini file locations (MacOS X, OpenBSD, OpenSuSE)
** Special release notes [package/ports]: **
- - Added several default paths to check for usuable an INCLUDE directory. This
+ - Added several default paths to check for usable INCLUDE directory. This
should make packaging Lynis easier for downstream package providers.
- When no profile is set, Lynis will check first /etc/lynis/default.prf,
before setting default.prf (in current work directory) as profile to use.
@@ -3225,7 +3254,7 @@ Lynis 1.0.9 (2008-03-24)
- Added available shells from /etc/shells to report file
- Updated man page
- Fixed option in main help window for --man option
- - Code improvement, splitting up sections to seperated files
+ - Code improvement, splitting up sections to separated files
---------------------------------------------------------------------------------
@@ -3241,7 +3270,7 @@ Lynis 1.0.8 (2008-02-10)
- Changed old temporary files check
- Changed test to include ubuntu security repository
- Moved UID check to avoid PID creation as non root user
- - Moved most functions to seperated files and several code cleanups
+ - Moved most functions to separated files and several code cleanups
- Improved logging output
- Extended FreeBSD (Copyright file) test
- Changed indentation for many tests
@@ -3285,7 +3314,7 @@ Lynis 1.0.7 (2008-01-28)
- Updated year number in program and support files
- Added new function Display, to use indentation within lines
- Added function RemovePIDFile before some exit routines, to clean up PID file
- - Extracted profile support, parameter support to seperated files
+ - Extracted profile support, parameter support to separated files
- Created file tests_ports_packages for Ports and Packages
- Deleted lynis.spec file, since it was not working and will be rewritten later
@@ -3438,7 +3467,7 @@ Lynis 1.0.0 (2007-11-08)
- Test: query nameservers and test connectivity
- Test: check promiscuous interfaces (FreeBSD)
- Test: check sticky bit on /tmp directory
- - Test: check debian.org security brance in /etc/apt/sources.list
+ - Test: check debian.org security branch in /etc/apt/sources.list
- Test: check kernel update on Debian
- Test: query default Linux run level
- Test: query chkconfig to see which services start at boot
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 66a7b19b..5d9d4b00 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -27,7 +27,7 @@ To ensure all pull requests can be easily checked and merged, here are some tips
## Code Guidelines
### General
-Identation should be 4 spaces (no tab character).
+Indentation should be 4 spaces (no tab character).
### Comments
Comments: use # sign followed by a space. When needed, create a comment block.
@@ -68,6 +68,6 @@ software or computer software documentation in whole or in part, in any manner
and for any purpose whatsoever, and to have or authorize others to do so.
If you want to be named in as a contributor in the CONTRIBUTOR file, then include
-this notition in your pull request. Preferred format: Full Name, and your e-mail
+this notation in your pull request. Preferred format: Full Name, and your e-mail
address).
diff --git a/db/languages/de b/db/languages/de
index ef6711c8..5d3f5be1 100644
--- a/db/languages/de
+++ b/db/languages/de
@@ -14,21 +14,67 @@ NOTE_EXCEPTIONS_FOUND="Abweichungen gefunden"
NOTE_EXCEPTIONS_FOUND_DETAILED="Einige außergewöhnliche Ereignisse oder Informationen wurden gefunden"
NOTE_PLUGINS_TAKE_TIME="Beachte: Plugins beinhalten eingehendere Tests und können mehrere Minuten benötigen, bis sie abgeschlossen sind"
NOTE_SKIPPED_TESTS_NON_PRIVILEGED="Übersprungene Tests aufgrund nicht privilegiertem Modus"
+SECTION_ACCOUNTING="Accounting"
+SECTION_BANNERS_AND_IDENTIFICATION="Banner und Identifizierung"
+SECTION_BASICS="Grundlegendes"
+SECTION_BOOT_AND_SERVICES="Systemstart und Dienste"
+SECTION_CONTAINERS="Container"
+SECTION_CRYPTOGRAPHY="Kryptographie"
SECTION_CUSTOM_TESTS="Benutzerdefinierte Tests"
SECTION_DATA_UPLOAD="Daten hochladen"
+SECTION_DATABASES="Datenbanken"
+SECTION_DOWNLOADS="Downloads"
+SECTION_EMAIL_AND_MESSAGING="Software: E-Mail und Messaging"
+SECTION_FILE_INTEGRITY="Software: Dateintegrität"
+SECTION_FILE_PERMISSIONS="Dateiberechtigungen"
+SECTION_FILE_SYSTEMS="Dateisysteme"
+SECTION_FIREWALLS="Software: Firewalls"
+SECTION_GENERAL="Allgemein"
+SECTION_HARDENING="Härtung"
+SECTION_HOME_DIRECTORIES="Heimatverzeichnisse"
+SECTION_IMAGE="Image"
SECTION_INITIALIZING_PROGRAM="Initialisiere Programm"
-SECTION_MALWARE="Malware"
-SECTION_MEMORY_AND_PROCESSES="Speicher und Prozesse"
+SECTION_INSECURE_SERVICES="Unsichere Dienste"
+SECTION_KERNEL="Kernel"
+SECTION_KERNEL_HARDENING="Kernelhärtung"
+SECTION_LDAP_SERVICES="LDAP Dienste"
+SECTION_LOGGING_AND_FILES="Logs und Logdateien"
+SECTION_MALWARE="Software: Malware"
+SECTION_MEMORY_AND_PROCESSES="Software: Speicher und Prozesse"
+SECTION_NAME_SERVICES="Namensauflösung"
+SECTION_NETWORKING="Netzwerk"
+SECTION_PERMISSIONS="Berechtigungen"
+SECTION_PORTS_AND_PACKAGES="Ports und Pakete"
+SECTION_PRINTERS_AND_SPOOLS="Drucker und Warteschlange"
+SECTION_PROGRAM_DETAILS="Programmdetails"
+SECTION_SCHEDULED_TASKS="Geplante Aufgaben"
+SECTION_SECURITY_FRAMEWORKS="Sicherheitsframeworks"
+SECTION_SHELLS="Shells"
+SECTION_SNMP_SUPPORT="SNMP Unterstützung"
+SECTION_SOFTWARE="Software"
+SECTION_SQUID_SUPPORT="Squid"
+SECTION_SSH_SUPPORT="SSH"
+SECTION_STORAGE="Speicher"
+SECTION_SYSTEM_INTEGRITY="Software: Systemintegrität"
+SECTION_SYSTEM_TOOLING="Software: Systemwerkzeuge"
SECTION_SYSTEM_TOOLS="Systemwerkzeuge"
+SECTION_TIME_AND_SYNCHRONIZATION="Zeit und Zeitsynchronisierung"
+SECTION_USB_DEVICES="USB Geräte"
+SECTION_USERS_GROUPS_AND_AUTHENTICATION="Benutzer, Gruppen und Authentifizierung"
+SECTION_VIRTUALIZATION="Virtualisierung"
+SECTION_WEBSERVER="Software: Webserver"
+STATUS_ACTIVE="AKTIV"
STATUS_DISABLED="DEAKTIVIERT"
STATUS_DONE="FERTIG"
STATUS_ENABLED="AKTIVIERT"
STATUS_ERROR="FEHLER"
STATUS_FAILED="FEHLERHAFT"
STATUS_FOUND="GEFUNDEN"
+STATUS_INSTALLED="INSTALLIERT"
STATUS_NO="NEIN"
STATUS_NONE="NICHTS"
STATUS_NOT_CONFIGURED="NICHT KONFIGURIERT"
+STATUS_NOT_ENABLED="NICHT AKTIVIERT"
STATUS_NOT_FOUND="NICHT GEFUNDEN"
STATUS_NOT_RUNNING="LÄUFT NICHT"
STATUS_OFF="AUS"
diff --git a/db/languages/en b/db/languages/en
index 7b697896..b5cbef6a 100644
--- a/db/languages/en
+++ b/db/languages/en
@@ -14,21 +14,67 @@ NOTE_EXCEPTIONS_FOUND="Exceptions found"
NOTE_EXCEPTIONS_FOUND_DETAILED="Some exceptional events or information was found"
NOTE_PLUGINS_TAKE_TIME="Note: plugins have more extensive tests and may take several minutes to complete"
NOTE_SKIPPED_TESTS_NON_PRIVILEGED="Skipped tests due to non-privileged mode"
+SECTION_ACCOUNTING="Accounting"
+SECTION_BANNERS_AND_IDENTIFICATION="Banners and identification"
+SECTION_BASICS="Basics"
+SECTION_BOOT_AND_SERVICES="Boot and services"
+SECTION_CONTAINERS="Containers"
+SECTION_CRYPTOGRAPHY="Cryptography"
SECTION_CUSTOM_TESTS="Custom tests"
SECTION_DATA_UPLOAD="Data upload"
+SECTION_DATABASES="Databases"
+SECTION_DOWNLOADS="Downloads"
+SECTION_EMAIL_AND_MESSAGING="Software: e-mail and messaging"
+SECTION_FILE_INTEGRITY="Software: file integrity"
+SECTION_FILE_PERMISSIONS="File Permissions"
+SECTION_FILE_SYSTEMS="File systems"
+SECTION_FIREWALLS="Software: firewalls"
+SECTION_GENERAL="General"
+SECTION_HARDENING="Hardening"
+SECTION_HOME_DIRECTORIES="Home directories"
+SECTION_IMAGE="Image"
SECTION_INITIALIZING_PROGRAM="Initializing program"
-SECTION_MALWARE="Malware"
+SECTION_INSECURE_SERVICES="Insecure services"
+SECTION_KERNEL="Kernel"
+SECTION_KERNEL_HARDENING="Kernel Hardening"
+SECTION_LDAP_SERVICES="LDAP Services"
+SECTION_LOGGING_AND_FILES="Logging and files"
+SECTION_MALWARE="Software: Malware"
SECTION_MEMORY_AND_PROCESSES="Memory and Processes"
+SECTION_NAME_SERVICES="Name services"
+SECTION_NETWORKING="Networking"
+SECTION_PERMISSIONS="Permissions"
+SECTION_PORTS_AND_PACKAGES="Ports and packages"
+SECTION_PRINTERS_AND_SPOOLS="Printers and Spools"
+SECTION_PROGRAM_DETAILS="Program Details"
+SECTION_SCHEDULED_TASKS="Scheduled tasks"
+SECTION_SECURITY_FRAMEWORKS="Security frameworks"
+SECTION_SHELLS="Shells"
+SECTION_SNMP_SUPPORT="SNMP Support"
+SECTION_SOFTWARE="Software"
+SECTION_SQUID_SUPPORT="Squid Support"
+SECTION_SSH_SUPPORT="SSH Support"
+SECTION_STORAGE="Storage"
+SECTION_SYSTEM_INTEGRITY="Software: System integrity"
+SECTION_SYSTEM_TOOLING="Software: System tooling"
SECTION_SYSTEM_TOOLS="System tools"
+SECTION_TIME_AND_SYNCHRONIZATION="Time and Synchronization"
+SECTION_USB_DEVICES="USB Devices"
+SECTION_USERS_GROUPS_AND_AUTHENTICATION="Users, Groups and Authentication"
+SECTION_VIRTUALIZATION="Virtualization"
+SECTION_WEBSERVER="Software: webserver"
+STATUS_ACTIVE="ACTIVE"
STATUS_DISABLED="DISABLED"
STATUS_DONE="DONE"
STATUS_ENABLED="ENABLED"
STATUS_ERROR="ERROR"
STATUS_FAILED="FAILED"
STATUS_FOUND="FOUND"
+STATUS_INSTALLED="INSTALLED"
STATUS_NO="NO"
STATUS_NONE="NONE"
STATUS_NOT_CONFIGURED="NOT CONFIGURED"
+STATUS_NOT_ENABLED="NOT ENABLED"
STATUS_NOT_FOUND="NOT FOUND"
STATUS_NOT_RUNNING="NOT RUNNING"
STATUS_OFF="OFF"
diff --git a/db/languages/fr b/db/languages/fr
index 51b4da41..0a867eee 100644
--- a/db/languages/fr
+++ b/db/languages/fr
@@ -1,38 +1,88 @@
+ERROR_NO_LICENSE="Pas de clé de licence configurée"
+ERROR_NO_UPLOAD_SERVER="Pas de serveur de transfert configuré"
GEN_CHECKING="Vérification"
GEN_CURRENT_VERSION="Version actuelle"
-GEN_DEBUG_MODE="mode debug"
+GEN_DEBUG_MODE="mode débug"
GEN_INITIALIZE_PROGRAM="Initialisation"
+GEN_LATEST_VERSION="Dernière version"
GEN_PHASE="phase"
GEN_PLUGINS_ENABLED="Plugins activés"
-GEN_VERBOSE_MODE="mode verbeux"
GEN_UPDATE_AVAILABLE="mise à jour disponible"
+GEN_VERBOSE_MODE="mode verbeux"
GEN_WHAT_TO_DO="Que faire"
NOTE_EXCEPTIONS_FOUND="Exceptions trouvées"
NOTE_EXCEPTIONS_FOUND_DETAILED="Des événements ou informations exceptionnels ont été trouvés"
-NOTE_PLUGINS_TAKE_TIME="Note: les plugins ont des tests plus poussés et peuvent prendre plusieurs minutes"
+NOTE_PLUGINS_TAKE_TIME="Note : Les plugins ont des tests plus poussés qui peuvent prendre plusieurs minutes"
NOTE_SKIPPED_TESTS_NON_PRIVILEGED="Tests ignorés faute de privilèges"
-SECTION_CUSTOM_TESTS="Tests Personnalisés"
-SECTION_MALWARE="Malware"
-SECTION_MEMORY_AND_PROCESSES="Mémoire et Processus"
+SECTION_ACCOUNTING="Comptes"
+SECTION_BANNERS_AND_IDENTIFICATION="Bannières et identification"
+SECTION_BASICS="Basics"
+SECTION_BOOT_AND_SERVICES="Démarrage et services"
+SECTION_CONTAINERS="Conteneurs"
+SECTION_CRYPTOGRAPHY="Cryptographie"
+SECTION_CUSTOM_TESTS="Tests personnalisés"
+SECTION_DATA_UPLOAD="Téléchargement de données"
+SECTION_DATABASES="Bases de données"
+SECTION_DOWNLOADS="Téléchargements"
+SECTION_EMAIL_AND_MESSAGING="Logiciel : Email et messagerie"
+SECTION_FILE_INTEGRITY="Logiciel : Intégrité de fichier"
+SECTION_FILE_PERMISSIONS="Permissions de fichier"
+SECTION_FILE_SYSTEMS="Systèmes de fichier"
+SECTION_FIREWALLS="Logiciel : Pare-feux"
+SECTION_GENERAL="Général"
+SECTION_HARDENING="Hardening"
+SECTION_HOME_DIRECTORIES="Home directories"
+SECTION_IMAGE="Image"
+SECTION_INITIALIZING_PROGRAM="Initialisation du programme"
+SECTION_INSECURE_SERVICES="Services non sécurisés"
+SECTION_KERNEL="Noyau"
+SECTION_KERNEL_HARDENING="Kernel Hardening"
+SECTION_LDAP_SERVICES="Services LDAP"
+SECTION_LOGGING_AND_FILES="Journalisation et fichiers"
+SECTION_MALWARE="Logiciel : Malware"
+SECTION_MEMORY_AND_PROCESSES="Mémoire et processus"
+SECTION_NAME_SERVICES="Services de noms"
+SECTION_NETWORKING="Mise en réseau"
+SECTION_PERMISSIONS="Permissions"
+SECTION_PORTS_AND_PACKAGES="Ports et packages"
+SECTION_PRINTERS_AND_SPOOLS="Imprimantes et serveurs d'impression"
+SECTION_PROGRAM_DETAILS="Détails du programme"
+SECTION_SCHEDULED_TASKS="Tâches planifiées"
+SECTION_SECURITY_FRAMEWORKS="Security frameworks"
+SECTION_SHELLS="Shells"
+SECTION_SNMP_SUPPORT="Prise en charge SNMP"
+SECTION_SOFTWARE="Logiciel"
+SECTION_SQUID_SUPPORT="Prise en charge Squid"
+SECTION_SSH_SUPPORT="Prise en charge SSH"
+SECTION_STORAGE="Stockage"
+SECTION_SYSTEM_INTEGRITY="Logiciel : Intégrité du système"
+SECTION_SYSTEM_TOOLING="Logiciel : System tooling"
+SECTION_SYSTEM_TOOLS="Outils système"
+SECTION_TIME_AND_SYNCHRONIZATION="Heure et synchronisation"
+SECTION_USB_DEVICES="Périphériques USB"
+SECTION_USERS_GROUPS_AND_AUTHENTICATION="Utilisateurs, groupes et authentification"
+SECTION_VIRTUALIZATION="Virtualisation"
+SECTION_WEBSERVER="Logiciel : Serveur web"
+STATUS_DISABLED="DÉSACTIVÉ"
STATUS_DONE="FAIT"
+STATUS_ENABLED="ACTIVÉ"
+STATUS_ERROR="ERREUR"
+STATUS_FAILED="ÉCHOUÉ"
STATUS_FOUND="TROUVÉ"
-STATUS_YES="OUI"
STATUS_NO="NON"
-STATUS_OFF="OFF"
-STATUS_OK="OK"
-STATUS_ON="ON"
STATUS_NONE="AUCUN"
+STATUS_NOT_CONFIGURED="NON CONFIGURÉ"
STATUS_NOT_FOUND="NON TROUVÉ"
STATUS_NOT_RUNNING="NON LANCÉ"
-STATUS_RUNNING="EN COURS":
+STATUS_OFF="OFF"
+STATUS_OK="OK"
+STATUS_ON="ON"
+STATUS_RUNNING="EN COURS"
STATUS_SKIPPED="IGNORÉ"
STATUS_SUGGESTION="SUGGESTION"
STATUS_UNKNOWN="INCONNU"
-STATUS_WARNING="ATTENTION"
-TEXT_YOU_CAN_HELP_LOGFILE="Vous pouvez aider en envoyant votre fichier journal"
+STATUS_WARNING="AVERTISSEMENT"
+STATUS_WEAK="FAIBLE"
+STATUS_YES="OUI"
TEXT_UPDATE_AVAILABLE="Mise à jour disponible"
-STATUS_DISABLED="DÉSACTIVÉ"
-STATUS_ENABLED="ACTIVÉ"
-STATUS_ERROR="ERREUR"
-ERROR_NO_LICENSE="Pas de clé de licence configurée"
-ERROR_NO_UPLOAD_SERVER="Pas de serveur de transfert configuré"
+TEXT_YOU_CAN_HELP_LOGFILE="Vous pouvez aider en envoyant votre fichier journal"
diff --git a/db/languages/it b/db/languages/it
index 4ff32699..e22b9837 100644
--- a/db/languages/it
+++ b/db/languages/it
@@ -1,38 +1,48 @@
+ERROR_NO_LICENSE="Nessuna chiave di licenza configurata"
+ERROR_NO_UPLOAD_SERVER="Nessun server di upload configurato"
GEN_CHECKING="Controllo"
GEN_CURRENT_VERSION="Versione corrente"
GEN_DEBUG_MODE="Modalità Debug"
GEN_INITIALIZE_PROGRAM="Inizializzando il programma"
+GEN_LATEST_VERSION="Versione ultima"
GEN_PHASE="fase"
GEN_PLUGINS_ENABLED="Plugin abilitati"
-GEN_VERBOSE_MODE="Modalità Verbose"
GEN_UPDATE_AVAILABLE="aggiornamento disponibile"
+GEN_VERBOSE_MODE="Modalità Verbose"
GEN_WHAT_TO_DO="Cosa fare"
NOTE_EXCEPTIONS_FOUND="Trovate Eccezioni"
NOTE_EXCEPTIONS_FOUND_DETAILED="Sono stati rilevati alcuni eventi o informazioni eccezionali"
NOTE_PLUGINS_TAKE_TIME="Nota: i plugin sono sottoposti a test più estesi e possono richiedere alcuni minuti per il completamento"
+NOTE_SKIPPED_TESTS_NON_PRIVILEGED="Test saltati a causa della modalità di esecuzione non privilegiata"
SECTION_CUSTOM_TESTS="Test su misura (Custom)"
+SECTION_DOWNLOADS="Scaricamenti"
+SECTION_GENERAL="Generale"
+SECTION_INITIALIZING_PROGRAM="Inizializzando il programma"
+SECTION_INSECURE_SERVICES="Service insicuri"
SECTION_MALWARE="Malware"
SECTION_MEMORY_AND_PROCESSES="Memoria e Processi"
+SECTION_STORAGE="Spazio di archiviazione"
+SECTION_TIME_AND_SYNCHRONIZATION="Tempo and Sincronizzazione"
+STATUS_DISABLED="DISABILITATO"
STATUS_DONE="FATTO"
+STATUS_ENABLED="ABILITATO"
+STATUS_ERROR="ERRORE"
+STATUS_FAILED="FALLITO"
STATUS_FOUND="TROVATO"
-STATUS_YES="SI"
STATUS_NO="NO"
-STATUS_OFF="OFF"
-STATUS_OK="OK"
-STATUS_ON="ON"
STATUS_NONE="NESSUNO"
+STATUS_NOT_CONFIGURED="NON CONFIGURATO"
STATUS_NOT_FOUND="NON TROVATO"
STATUS_NOT_RUNNING="NON IN ESECUZIONE"
+STATUS_OFF="OFF"
+STATUS_OK="OK"
+STATUS_ON="ON"
STATUS_RUNNING="IN ESECUZIONE"
STATUS_SKIPPED="SALTATO"
STATUS_SUGGESTION="SUGGERIMENTO"
STATUS_UNKNOWN="SCONOSCIUTO"
STATUS_WARNING="ATTENZIONE"
-TEXT_YOU_CAN_HELP_LOGFILE="Puoi aiutare fornendoci il tuo file di log"
+STATUS_WEAK="DEBOLE"
+STATUS_YES="SI"
TEXT_UPDATE_AVAILABLE="aggiornamento disponibile"
-NOTE_SKIPPED_TESTS_NON_PRIVILEGED="Test saltati a causa della modalità di esecuzione non privilegiata"
-STATUS_DISABLED="DISABILITATO"
-STATUS_ENABLED="ABILITATO"
-STATUS_ERROR="ERRORE"
-ERROR_NO_LICENSE="Nessuna chiave di licenza configurata"
-ERROR_NO_UPLOAD_SERVER="Nessun server di upload configurato"
+TEXT_YOU_CAN_HELP_LOGFILE="Puoi aiutare fornendoci il tuo file di log"
diff --git a/db/software-eol.db b/db/software-eol.db
index 2412a203..0c89b74b 100644
--- a/db/software-eol.db
+++ b/db/software-eol.db
@@ -14,6 +14,14 @@
# For rolling releases or releases that do not (currently have an EOL date, leave field three empty and set field four to -1.
# Full string for CentOS can be something like 'CentOS Linux 8 (Core)'. As this does not correctly match, shorter string is used for matching.
#
+# Alpine - https://wiki.alpinelinux.org/wiki/Alpine_Linux:Releases
+#
+os:Alpine 3.12:2022-05-01:1651377600
+os:Alpine 3.11:2021-11-01:1635739200
+os:Alpine 3.10:2021-05-01:1619841600
+os:Alpine 3.9:2020-11-01:1604203200
+os:Alpine 3.8:2020-05-01:1588305600
+#
# Amazon Linux
#
# Note: shortest entry is listed at end due to regular expression matching being used
@@ -68,6 +76,62 @@ os:Linux Mint 18:2021-04-01:1617228000:
os:Linux Mint 19:2023-04-01:1680300000:
os:Linux Mint 20:2025-04-01:1743458400:
#
+# macOS - https://support.apple.com/en_US/downloads/macos and
+# https://apple.stackexchange.com/a/282788 and
+# https://en.wikipedia.org/wiki/Category:MacOS_versions
+#
+os:Mac OS X 10.0 \(Cheetah\):2002-09-18:1032300000:
+os:Mac OS X 10.1 \(Puma\):2003-11-10:1068418800:
+os:Mac OS X 10.2 \(Jaguar\):2005-05-16:1116194400:
+os:Mac OS X 10.3 \(Panther\):2007-11-15:1195081200:
+os:Mac OS X 10.4 \(Tiger\):2009-09-10:1252533600:
+os:Mac OS X 10.5 \(Leopard\):2011-06-23:1308780000:
+os:Mac OS X 10.6 \(Snow Leopard\):2013-12-16:1387148400:
+os:Mac OS X 10.7 \(Lion\):2014-11-17:1416178800:
+os:Mac OS X 10.8 \(Mountain Lion\):2015-10-21:1445378400:
+os:Mac OS X 10.9 \(Mavericks\):2016-10-24:1477260000:
+os:Mac OS X 10.10 \(Yosemite\):2017-10-31:1509404400:
+os:Mac OS X 10.11 \(El Capitan\):2018-10-30:1540854000:
+os:macOS Sierra \(10.12\):2016-10-24:1477260000:
+os:macOS Sierra \(10.12.1\):2016-12-13:1481583600:
+os:macOS Sierra \(10.12.2\):2017-01-23:1485126000:
+os:macOS Sierra \(10.12.3\):2017-03-27:1490565600:
+os:macOS Sierra \(10.12.4\):2017-05-15:1494799200:
+os:macOS Sierra \(10.12.5\):2017-07-19:1500415200:
+os:macOS Sierra \(10.12.6\):2019-10-29:1572303600:
+os:macOS High Sierra \(10.13\):2017-10-31:1509404400:
+os:macOS High Sierra \(10.13.1\):2017-12-06:1512514800:
+os:macOS High Sierra \(10.13.2\):2018-01-23:1516662000:
+os:macOS High Sierra \(10.13.3\):2018-03-29:1522274400:
+os:macOS High Sierra \(10.13.4\):2018-06-01:1527804000:
+os:macOS High Sierra \(10.13.5\):2018-07-09:1531087200:
+os:macOS High Sierra \(10.13.6\)::-1:
+os:macOS Mojave \(10.14\):2018-10-30:1540854000:
+os:macOS Mojave \(10.14.1\):2018-12-05:1543964400:
+os:macOS Mojave \(10.14.2\):2019-01-22:1548111600:
+os:macOS Mojave \(10.14.3\):2019-03-25:1553468400:
+os:macOS Mojave \(10.14.4\):2019-05-13:1557698400:
+os:macOS Mojave \(10.14.5\):2019-07-22:1563746400:
+os:macOS Mojave \(10.14.6\)::-1:
+os:macOS Catalina \(10.15\):2019-10-29:1572303600:
+os:macOS Catalina \(10.15.1\):2019-12-10:1575932400:
+os:macOS Catalina \(10.15.2\):2020-01-28:1580166000:
+os:macOS Catalina \(10.15.3\):2020-03-24:1585004400:
+os:macOS Catalina \(10.15.4\):2020-05-26:1590444000:
+os:macOS Catalina \(10.15.5\):2020-07-15:1594764000:
+os:macOS Catalina \(10.15.6\):2020-09-24:1600898400:
+os:macOS Catalina \(10.15.7\)::-1:
+#
+# Mageia - https://www.mageia.org/en/support/
+#
+os:Mageia 1:2012-12-01:1354316400
+os:Mageia 2:2013-11-22:1385074800
+os:Mageia 3:2014-11-26:1416956400
+os:Mageia 4:2015-09-19:1442613600
+os:Mageia 5:2017-12-31:1514674800
+os:Mageia 6:2019-09-30:1569794400
+os:Mageia 7:2020-12-30:1609282800
+#
# NetBSD - https://www.netbsd.org/support/security/release.html and
# https://www.netbsd.org/releases/formal.html
#
@@ -173,4 +237,20 @@ os:Ubuntu 18.10:2019-07-18:1563400800:
os:Ubuntu 19.04:2020-01-01:1577833200:
os:Ubuntu 20.04:2025-04-01:1743458400:
#
+# OmniosCE - https://omniosce.org/releasenotes.html
+#
+os:OmniOS Community Edition v11 r151022:2020-05-11:1589148000:
+os:OmniOS Community Edition v11 r151024:2018-11-04:1541286000:
+os:OmniOS Community Edition v11 r151026:2019-05-05:1557007200:
+os:OmniOS Community Edition v11 r151028:2019-11-04:1572822000:
+os:OmniOS Community Edition v11 r151030::-1:
+os:OmniOS Community Edition v11 r151032:2020-11-03:1604358000:
+os:OmniOS Community Edition v11 r151034::-1:
+#
+## Oracle Solaris - https://www.oracle.com/us/support/library/lifetime-support-hardware-301321.pdf (p. 34)
+# The list below contains Premier Support End only
+#
+os:Oracle Solaris 11.3:2021-01-01:1609455600:
+os:Oracle Solaris 11.4:2031-11-01:1951254000:
+#
# EOF
diff --git a/db/tests.db b/db/tests.db
index 1e13efd9..85bcb6c9 100644
--- a/db/tests.db
+++ b/db/tests.db
@@ -37,6 +37,7 @@ AUTH-9268:test:security:authentication::Checking presence pam.d files:
AUTH-9278:test:security:authentication::Checking LDAP pam status:
AUTH-9282:test:security:authentication::Checking password protected account without expire date:
AUTH-9283:test:security:authentication::Checking accounts without password:
+AUTH-9284:test:security:authentication::Checking locked user accounts in /etc/passwd:
AUTH-9286:test:security:authentication::Checking user password aging:
AUTH-9288:test:security:authentication::Checking for expired passwords:
AUTH-9304:test:security:authentication:Solaris:Check single user login configuration:
@@ -282,7 +283,7 @@ NAME-4210:test:security:nameservices::Check DNS banner:
NAME-4230:test:security:nameservices::Check PowerDNS status:
NAME-4232:test:security:nameservices::Search PowerDNS configuration file:
NAME-4236:test:security:nameservices::Check PowerDNS backends:
-NAME-4238:test:security:nameservices::Check PowerDNS authoritive status:
+NAME-4238:test:security:nameservices::Check PowerDNS authoritative status:
NAME-4304:test:security:nameservices::Check NIS ypbind status:
NAME-4306:test:security:nameservices::Check NIS domain:
NAME-4402:test:security:nameservices::Check duplicate line in /etc/hosts:
@@ -426,6 +427,7 @@ TOOL-5102:test:security:tooling::Check for presence of Fail2ban:
TOOL-5104:test:security:tooling::Enabled tests for Fail2ban:
TOOL-5120:test:security:tooling::Presence of Snort IDS:
TOOL-5122:test:security:tooling::Snort IDS configuration file:
+TOOL-5130:test:security:tooling::Check for active Suricata daemon:
TOOL-5160:test:security:tooling::Check for active OSSEC daemon:
TOOL-5190:test:security:tooling::Check presence of available IDS/IPS tooling:
USB-1000:test:security:storage:Linux:Check if USB storage is disabled:
diff --git a/extras/bash_completion.d/lynis b/extras/bash_completion.d/lynis
index 7eee7375..5c816aea 100644
--- a/extras/bash_completion.d/lynis
+++ b/extras/bash_completion.d/lynis
@@ -126,7 +126,7 @@ _lynis()
report)
return 0
;;
- settiings)
+ settings)
return 0
;;
tests)
diff --git a/include/binaries b/include/binaries
index b7c7d7e9..95d56c3d 100644
--- a/include/binaries
+++ b/include/binaries
@@ -30,7 +30,7 @@
#################################################################################
#
if [ ${CHECK_BINARIES} -eq 1 ]; then
- InsertSection "System Tools"
+ InsertSection "${SECTION_SYSTEM_TOOLS}"
Display --indent 2 --text "- Scanning available tools..."
LogText "Start scanning for available audit binaries and tools..."
@@ -119,11 +119,11 @@
COUNT=$((COUNT + 1))
BINARY="${SCANDIR}/${FILENAME}"
DISCOVERED_BINARIES="${DISCOVERED_BINARIES}${BINARY} "
- if [ -u ${BINARY} ]; then
+ if [ -u "${BINARY}" ]; then
NSUID_BINARIES=$((NSUID_BINARIES + 1))
SUID_BINARIES="${SUID_BINARIES}${BINARY} "
fi
- if [ -g ${BINARY} ]; then
+ if [ -g "${BINARY}" ]; then
NSGID_BINARIES=$((NSGID_BINARIES + 1))
SGID_BINARIES="${SGID_BINARIES}${BINARY} "
fi
@@ -288,6 +288,7 @@
swapon) SWAPONBINARY="${BINARY}"; LogText " Found known binary: swapon (swap device tool) - ${BINARY}" ;;
svcs) SVCSBINARY="${BINARY}" ; LogText " Found known binary: svcs (service manager) - ${BINARY}" ;;
swupd) SWUPDBINARY="${BINARY}"; LogText " Found known binary: swupd (package manager) - ${BINARY}" ;;
+ synoavd) SYNOAVDBINARY=${BINARY}; LogText " Found known binary: synoavd (Synology AV scanner) - ${BINARY}" ;;
sysctl) SYSCTLBINARY="${BINARY}"; LogText " Found known binary: sysctl (kernel parameters) - ${BINARY}" ;;
syslog-ng) SYSLOGNGBINARY="${BINARY}"; SYSLOGNGVERSION=$(${BINARY} -V 2>&1 | grep "^syslog-ng" | awk '{ print $2 }'); LogText "Found ${BINARY} (version ${SYSLOGNGVERSION})" ;;
systemctl) SYSTEMCTLBINARY="${BINARY}"; LogText " Found known binary: systemctl (client to systemd) - ${BINARY}" ;;
diff --git a/include/consts b/include/consts
index 053147a4..bb1d63ff 100644
--- a/include/consts
+++ b/include/consts
@@ -58,6 +58,7 @@ ETC_PATHS="/etc /usr/local/etc"
APPLICATION_FIREWALL_ACTIVE=0
BINARY_SCAN_FINISHED=0
BLKIDBINARY=""
+ BOOTCTLBINARY=""
CAT_BINARY=""
CFAGENTBINARY=""
CHECK=0
@@ -81,6 +82,7 @@ ETC_PATHS="/etc /usr/local/etc"
CONTROL_URL_PROTOCOL=""
CONTAINER_TYPE=""
CREATE_REPORT_FILE=1
+ CRYPTSETUPBINARY=""
CSUMBINARY=""
CURRENT_TS=0
CUSTOM_URL_APPEND=""
@@ -99,12 +101,14 @@ ETC_PATHS="/etc /usr/local/etc"
DISCOVERED_BINARIES=""
DMIDECODEBINARY=""
DNFBINARY=""
+ DNSDOMAINNAMEBINARY=""
DOCKERBINARY=""
DOCKER_DAEMON_RUNNING=0
DPKGBINARY=""
ECHOCMD=""
ERROR_ON_WARNINGS=0
EQUERYBINARY=""
+ EVMCTLBINARY=""
EXIMBINARY=""
FAIL2BANBINARY=""
FILEBINARY=""
@@ -130,6 +134,7 @@ ETC_PATHS="/etc /usr/local/etc"
HTTPDBINARY=""
IDS_IPS_TOOL_FOUND=0
IFCONFIGBINARY=""
+ INTEGRITYSETUPBINARY=""
IPBINARY=""
IPFBINARY=""
IPTABLESBINARY=""
@@ -148,6 +153,7 @@ ETC_PATHS="/etc /usr/local/etc"
LOGDIR=""
LOGROTATEBINARY=""
LOGTEXT=1
+ LSBLKBINARY=""
LSMODBINARY=""
LSOFBINARY=""
LSOF_EXTRA_OPTIONS=""
@@ -191,6 +197,7 @@ ETC_PATHS="/etc /usr/local/etc"
NGINX_RETURN_FOUND=0
NGINX_ROOT_FOUND=0
NGINX_WEAK_SSL_PROTOCOL_FOUND=0
+ NTPCTLBINARY=""
NTPD_ROLE=""
NTPQBINARY=""
OPENSSLBINARY=""
@@ -204,6 +211,7 @@ ETC_PATHS="/etc /usr/local/etc"
OS_REDHAT_OR_CLONE=0
OSIRISBINARY=""
PACMANBINARY=""
+ PAM_PASSWORD_PWHISTORY_AMOUNT=""
PASSWORD_MAXIMUM_DAYS=-1
PASSWORD_MINIMUM_DAYS=-1
PAM_2F_AUTH_ENABLED=0
@@ -238,6 +246,7 @@ ETC_PATHS="/etc /usr/local/etc"
REFRESH_REPOSITORIES=1
REMOTE_LOGGING_ENABLED=0
RESOLV_DOMAINNAME=""
+ RESOLVECTLBINARY=""
RKHUNTERBINARY=""
ROOTDIR="/"
ROOTSHBINARY=""
@@ -276,6 +285,7 @@ ETC_PATHS="/etc /usr/local/etc"
SLOW_TEST_THRESHOLD=10
SMTPCTLBINARY=""
SNORTBINARY=""
+ SSBINARY=""
SSHKEYSCANBINARY=""
SSHKEYSCANFOUND=0
SSL_CERTIFICATE_INCLUDE_PACKAGES=0
@@ -285,6 +295,7 @@ ETC_PATHS="/etc /usr/local/etc"
SWUPDBINARY=""
SYSLOGNGBINARY=""
SYSTEMCTLBINARY=""
+ SYSTEMDANALYZEBINARY=""
SYSTEM_IS_NOTEBOOK=255
TEMP_FILE=""
TEMP_FILES=""
@@ -294,6 +305,7 @@ ETC_PATHS="/etc /usr/local/etc"
TEST_GROUP_TO_CHECK="all"
TESTS_EXECUTED=""
TESTS_SKIPPED=""
+ TIMEDATECTL=""
TMPFILE=""
TOMOYOINITBINARY=""
TOOLTIP_SHOWED=0
@@ -319,6 +331,7 @@ ETC_PATHS="/etc /usr/local/etc"
USBGUARD_ROOT=""
VALUE=""
VERBOSE=0
+ VERITYSETUPBINARY=""
VGDISPLAYBINARY=""
VMTYPE=""
VULNERABLE_PACKAGES_FOUND=0
diff --git a/include/functions b/include/functions
index e0f75a64..c88674ba 100644
--- a/include/functions
+++ b/include/functions
@@ -38,7 +38,7 @@
# DigitsOnly Return only the digits from a string
# DirectoryExists Check if a directory exists on the disk
# DiscoverProfiles Determine available profiles on system
-# Display Output text to screen with colors and identation
+# Display Output text to screen with colors and indentation
# DisplayError Show an error on screen
# DisplayException Show an exception on screen
# DisplayManual Output text to screen without any layout
@@ -1089,12 +1089,13 @@
;;
"Solaris")
- INTERFACES_TO_TEST="e1000g1 net0"
+ INTERFACES_TO_TEST="net0 e1000g1 e1000g0"
FOUND=0
for I in ${INTERFACES_TO_TEST}; do
FIND=$(${IFCONFIGBINARY} -a | grep "^${I}")
if [ ! "${FIND}" = "" ]; then
FOUND=1; LogText "Found interface ${I} on Solaris"
+ break
fi
done
if [ ${FOUND} -eq 1 ]; then
@@ -1107,7 +1108,7 @@
ReportException "GetHostID" "Can not find sha1/sha1sum or openssl"
fi
else
- ReportException "GetHostID" "No interface found op Solaris to create HostID"
+ ReportException "GetHostID" "No interface found on Solaris to create HostID"
fi
;;
@@ -1547,8 +1548,7 @@
if [ -z "${search}" ]; then ExitFatal "Missing process to search for when using IsRunning function"; fi
RUNNING=0
- # AIX does not fully support pgrep options, so using ps instead
- if [ "${OS}" != "AIX" ]; then
+ if [ -x "${PGREPBINARY}" ] && [ "${OS}" != "AIX" ]; then
# When --user is used, perform a search using the -u option
# Initialize users for strict mode
if [ -n "${users:-}" ]; then
@@ -2180,7 +2180,8 @@
for I in ${FIND}; do
I=$(echo ${I} | sed 's/:space:/ /g' | sed 's/;$//' | sed 's/ #.*$//')
OPTION=$(echo ${I} | awk '{ print $1 }')
- VALUE=$(echo ${I}| cut -d' ' -f2-)
+ # Use quotes here to prevent wildcard expansion
+ VALUE=$(echo "${I}"| cut -d' ' -f2-)
LogText "Result: found option ${OPTION} in ${CONFIG_FILE} with value '${VALUE}'"
STORE_SETTING=1
case ${OPTION} in
@@ -2303,9 +2304,25 @@
done
if [ ${FOUND} -eq 0 ]; then NGINX_CONF_FILES_ADDITIONS="${NGINX_CONF_FILES_ADDITIONS} ${VALUE}"; fi
# Check for additional config files included as follows
- # "include sites-enabled/*.conf"
- elif [ $(echo ${VALUE} | grep -F -c "*.conf") -gt 0 ]; then
- for FOUND_CONF in $(ls ${CONFIG_FILE%nginx.conf}${VALUE%;*}); do
+ # "include sites-enabled/*.conf" (relative path)
+ # "include /etc/nginx/sites-enabled/*.conf" (absolute path)
+ elif [ $(echo "${VALUE}" | grep -F -c "*.conf") -gt 0 ]; then
+ # Check if path is absolute or relative
+ case $VALUE in
+ /*)
+ # Absolute path, so wildcard pattern is already correct
+ CONF_WILDCARD=${VALUE%;*}
+ ;;
+ *)
+ # Relative path, so construct absolute path for wildcard pattern
+ CONF_WILDCARD=${CONFIG_FILE%nginx.conf}${VALUE%;*}
+ ;;
+ esac
+ for FOUND_CONF in ${CONF_WILDCARD}; do
+ if [ "${FOUND_CONF}" = "${CONF_WILDCARD}" ]; then
+ LogText "Found no match for wildcard pattern: ${CONF_WILDCARD}"
+ break
+ fi
FOUND=0
for CONF in ${NGINX_CONF_FILES}; do
if [ "${CONF}" = "${FOUND_CONF}" ]; then FOUND=1; LogText "Found this file already in our configuration files array, not adding to queue"; fi
diff --git a/include/helper_audit_dockerfile b/include/helper_audit_dockerfile
index 05d24c24..a71326ee 100644
--- a/include/helper_audit_dockerfile
+++ b/include/helper_audit_dockerfile
@@ -44,7 +44,7 @@ fi
##################################################################################################
#
- InsertSection "Image"
+ InsertSection "${SECTION_IMAGE}"
PKGMGR=""
FIND=$(grep "^FROM" ${AUDIT_FILE} | sed 's/ /:space:/g')
@@ -93,7 +93,7 @@ fi
#
##################################################################################################
#
- InsertSection "Basics"
+ InsertSection "${SECTION_BASICS}"
MAINTAINER=$(grep -E -i "*MAINTAINER" ${AUDIT_FILE} | sed 's/=/ /g' | cut -d'"' -f 2)
if [ -z "${MAINTAINER}" ]; then
@@ -127,7 +127,7 @@ fi
#
##################################################################################################
#
- InsertSection "Software"
+ InsertSection "${SECTION_SOFTWARE}"
case $PKGMGR in
"apt")
@@ -166,7 +166,7 @@ fi
#
##################################################################################################
#
- InsertSection "Downloads"
+ InsertSection "${SECTION_DOWNLOADS}"
FILE_DOWNLOAD=0
@@ -217,7 +217,7 @@ fi
#
##################################################################################################
#
- InsertSection "Permissions"
+ InsertSection "${SECTION_PERMISSIONS}"
FIND=$(grep -i "chmod 777" ${AUDIT_FILE})
if HasData "${FIND}"; then
diff --git a/include/helper_configure b/include/helper_configure
index ebd7f706..029ab4f7 100644
--- a/include/helper_configure
+++ b/include/helper_configure
@@ -72,7 +72,7 @@
ExitFatal
fi
- FIND=$(echo ${HELPER_PARAMERS} | grep " ")
+ FIND=$(echo ${HELPER_PARAMS} | grep " ")
if [ ! "${FIND}" = "" ]; then ${ECHOCMD} "Found invalid character (space) in configuration string"; ExitFatal; fi
CONFIGURE_SETTINGS=$(echo $2 | sed 's/:/ /g')
diff --git a/include/osdetection b/include/osdetection
index c2726d31..36dc47a3 100644
--- a/include/osdetection
+++ b/include/osdetection
@@ -173,6 +173,12 @@
OS_REDHAT_OR_CLONE=1
OS_VERSION="Rolling release"
;;
+ "cloudlinux")
+ LINUX_VERSION="CloudLinux"
+ OS_NAME="CloudLinux"
+ OS_REDHAT_OR_CLONE=1
+ OS_VERSION=$(grep "^VERSION_ID=" /etc/os-release | awk -F= '{print $2}' | tr -d '"')
+ ;;
"coreos")
LINUX_VERSION="CoreOS"
OS_NAME="CoreOS Linux"
@@ -184,17 +190,34 @@
OS_VERSION=$(grep "^VERSION_ID=" /etc/os-release | awk -F= '{print $2}' | tr -d '"')
OS_VERSION_FULL=$(grep "^VERSION=" /etc/os-release | awk -F= '{print $2}' | tr -d '"')
;;
+ "endeavouros")
+ LINUX_VERSION="EndeavourOS"
+ OS_NAME="EndeavourOS"
+ OS_VERSION="Rolling release"
+ OS_VERSION_FULL="Rolling release"
+ ;;
"fedora")
LINUX_VERSION="Fedora"
OS_NAME="Fedora Linux"
OS_REDHAT_OR_CLONE=1
OS_VERSION=$(grep "^VERSION_ID=" /etc/os-release | awk -F= '{print $2}' | tr -d '"')
;;
+ "flatcar")
+ LINUX_VERSION="Flatcar"
+ LINUX_VERSION_LIKE="CoreOS"
+ OS_NAME="Flatcar Linux"
+ OS_VERSION=$(grep "^VERSION_ID=" /etc/os-release | awk -F= '{print $2}' | tr -d '"')
+ ;;
"gentoo")
LINUX_VERSION="Gentoo"
OS_NAME="Gentoo Linux"
OS_VERSION="Rolling release"
;;
+ "ipfire")
+ LINUX_VERSION="IPFire"
+ OS_NAME="IPFire"
+ OS_VERSION=$(grep "^VERSION=" /etc/os-release | awk -F= '{print $2}' | tr -d '"')
+ ;;
"kali")
LINUX_VERSION="Kali"
OS_NAME="Kali Linux"
@@ -206,12 +229,24 @@
OS_VERSION=$(grep "^VERSION_ID=" /etc/os-release | awk -F= '{print $2}' | tr -d '"')
OS_VERSION_FULL=$(grep "^VERSION=" /etc/os-release | awk -F= '{print $2}' | tr -d '"')
;;
+ "mageia")
+ LINUX_VERSION="Mageia"
+ OS_NAME="Mageia"
+ OS_VERSION=$(grep "^VERSION_ID=" /etc/os-release | awk -F= '{print $2}' | tr -d '"')
+ OS_VERSION_FULL=$(grep "^VERSION=" /etc/os-release | awk -F= '{print $2}' | tr -d '"')
+ ;;
"manjaro")
LINUX_VERSION="Manjaro"
OS_FULLNAME="Manjaro Linux"
OS_NAME="Manjaro"
OS_VERSION="Rolling release"
;;
+ "nixos")
+ LINUX_VERSION="NixOS"
+ OS_NAME="NixOS"
+ OS_VERSION=$(grep "^VERSION_ID=" /etc/os-release | awk -F= '{print $2}' | tr -d '"')
+ OS_VERSION_FULL=$(grep "^VERSION=" /etc/os-release | awk -F= '{print $2}' | tr -d '"')
+ ;;
"ol")
LINUX_VERSION="Oracle Linux"
OS_NAME="Oracle Linux"
@@ -249,24 +284,47 @@
;;
"rhel")
LINUX_VERSION="RHEL"
- OS_NAME=$(grep "^PRETTY_NAME=" /etc/os-release | awk -F= '{print $2}' | tr -d '"')
+ OS_NAME="RHEL"
OS_VERSION=$(grep "^VERSION_ID=" /etc/os-release | awk -F= '{print $2}' | tr -d '"')
OS_VERSION_FULL=$(grep "^VERSION=" /etc/os-release | awk -F= '{print $2}' | tr -d '"')
OS_FULLNAME="${OS_NAME} ${OS_VERSION_FULL}"
OS_REDHAT_OR_CLONE=1
;;
+ "rosa")
+ LINUX_VERSION="ROSA Linux"
+ OS_VERSION=$(grep "^VERSION_ID=" /etc/os-release | awk -F= '{print $2}' | tr -d '"')
+ OS_VERSION_FULL=$(grep "^VERSION=" /etc/os-release | awk -F= '{print $2}' | tr -d '"')
+ OS_NAME="ROSA Linux"
+ ;;
"slackware")
LINUX_VERSION="Slackware"
OS_NAME="Slackware Linux"
OS_VERSION=$(grep "^VERSION_ID=" /etc/os-release | awk -F= '{print $2}' | tr -d '"')
OS_VERSION_FULL=$(grep "^VERSION=" /etc/os-release | awk -F= '{print $2}' | tr -d '"')
;;
+ "sles")
+ LINUX_VERSION="SLES"
+ OS_NAME="openSUSE"
+ OS_VERSION=$(grep "^VERSION_ID=" /etc/os-release | awk -F= '{print $2}' | tr -d '"')
+ OS_VERSION_FULL=$(grep "^PRETTY_NAME=" /etc/os-release | awk -F= '{print $2}' | tr -d '"')
+ ;;
"ubuntu")
LINUX_VERSION="Ubuntu"
OS_VERSION=$(grep "^VERSION_ID=" /etc/os-release | awk -F= '{print $2}' | tr -d '"')
OS_VERSION_FULL=$(grep "^VERSION=" /etc/os-release | awk -F= '{print $2}' | tr -d '"')
OS_NAME="Ubuntu"
;;
+ "void")
+ LINUX_VERSION="Void Linux"
+ OS_VERSION="Rolling release"
+ OS_NAME="Void Linux"
+ ;;
+ "zorin")
+ LINUX_VERSION="Zorin OS"
+ OS_NAME="Zorin OS"
+ OS_VERSION=$(grep "^VERSION_ID=" /etc/os-release | awk -F= '{print $2}' | tr -d '"')
+ OS_VERSION_FULL=$(grep "^VERSION=" /etc/os-release | awk -F= '{print $2}' | tr -d '"')
+ ;;
*)
ReportException "OS Detection" "Unknown OS found in /etc/os-release - Please create issue on GitHub project page: ${PROGRAM_SOURCE}"
;;
@@ -378,13 +436,6 @@
LINUX_VERSION="Fedora"
fi
- # Mageia (has also /etc/megaia-release)
- FIND=$(grep "Mageia" /etc/redhat-release)
- if [ ! "${FIND}" = "" ]; then
- OS_FULLNAME=$(grep "^Mageia" /etc/redhat-release)
- OS_VERSION=$(grep "^Mageia" /etc/redhat-release | awk '{ if ($2=="release") { print $3 } }')
- LINUX_VERSION="Mageia"
- fi
# Oracle Enterprise Linux
FIND=$(grep "Enterprise Linux Enterprise Linux Server" /etc/redhat-release)
@@ -522,12 +573,89 @@
SYSCTL_READKEY=""
;;
- # Solaris / OpenSolaris
+ # Solaris / OpenSolaris / Ilumos ...
SunOS)
OS="Solaris"
- OS_NAME="Sun Solaris"
- OS_FULLNAME=$(uname -s -r)
- OS_VERSION=$(uname -r)
+ OS_KERNELVERSION=$(uname -v)
+ OPENSOLARIS=0
+
+ if [ -f /etc/os-release ]; then
+ OS_ID=$(grep "^ID=" /etc/os-release | awk -F= '{print $2}' | tr -d '"')
+ OS_VERSION=$(grep "^VERSION=" /etc/os-release | awk -F= '{print $2}' | tr -d '"')
+ OS_FULLNAME=$(awk -F= '/^PRETTY_NAME=/ {print substr($2,2,length($2)-2)}' /etc/os-release)
+ case "${OS_ID}" in
+ "solaris")
+ OS_NAME="Oracle Solaris"
+ ;;
+ "omnios")
+ OS_NAME="OmniOS"
+ OPENSOLARIS=1
+ ;;
+ "tribblix")
+ OS_NAME="Tribblix"
+ OS_FULLNAME="Tribblix ${OS_VERSION}"
+ OPENSOLARIS=1
+ ;;
+ "*")
+ ReportException "OS Detection" "Unknown OS found in /etc/os-release - Please create issue on GitHub project page: ${PROGRAM_SOURCE}"
+ ;;
+ esac
+ elif [ "$(uname -o 2> /dev/null)" == "illumos" ]; then
+ OPENSOLARIS=1
+
+ # Solaris has a free form text file with release information
+ if grep "OpenIndiana" /etc/release > /dev/null; then
+ OS_NAME="OpenIndiana"
+ if grep "Hipster" /etc/release > /dev/null; then
+ OS_VERSION="$(tr ' ' '\n' < /etc/release | grep '[[:digit:]]\.[[:digit:]]')"
+ OS_FULLNAME="OpenIndiana Hipster $OS_VERSION"
+ else
+ OS_VERSION="Unknown"
+ OS_FULLNAME="OpenIndiana (unknown edition)"
+ fi
+ elif grep "OmniOS" /etc/release > /dev/null; then
+ OS_NAME="OmniOS"
+ OS_VERSION="$(tr ' ' '\n' < /etc/release | grep 'r[[:digit:]]')"
+ if grep "Community Edition" /etc/release > /dev/null; then
+ OS_FULLNAME="OmniOS Community Edition v11 $OS_VERSION"
+ fi
+ elif grep "SmartOS" /etc/release > /dev/null; then
+ OS_NAME="SmartOS"
+ OS_VERSION="-"
+ OS_FULLNAME="SmartOS"
+ else
+ OS_NAME="Unknown Illumos"
+ fi
+ elif grep "SchilliX" /etc/release > /dev/null; then
+ OS_NAME="SchilliX"
+ OS_FULLNAME="$(head -n 1 /etc/release | xargs)"
+ OS_VERSION="$(echo "$OS_FULLNAME" | cut -d '-' -f 2)"
+
+ OPENSOLARIS=1
+ elif head -n 1 < /etc/release | grep "Oracle Solaris" > /dev/null; then
+ OS_NAME="Oracle Solaris"
+ OS_FULLNAME="$(head -n 1 /etc/release | xargs)"
+ OS_VERSION="$(head -n 1 < /etc/release | xargs | cut -d ' ' -f 3)"
+ elif head -n 1 < /etc/release | xargs | grep "^Solaris " > /dev/null; then
+ OS_NAME="Sun Solaris"
+ # Example of /etc/release:
+ # Solaris 10 5/08
+ # ...
+ # Solaris 10 10/09 (Update 8)
+ # The first line does not contain the "Update" number,
+ # only if present.
+ if tail -1 < /etc/release | xargs | grep "^Solaris " > /dev/null; then
+ OS_FULLNAME=$(tail -1 < /etc/release | xargs)
+ else
+ OS_FULLNAME=$(head -1 < /etc/release | xargs)
+ fi
+ OS_VERSION=$(echo "$OS_FULLNAME" | cut -d ' ' -f 2,3)
+ else # Old behaviour
+ OS_NAME="Sun Solaris"
+ OS_FULLNAME=$(uname -s -r)
+ OS_VERSION=$(uname -r)
+ fi
+
HARDWARE=$(uname -m)
if [ -x /usr/bin/isainfo ]; then
# Returns 32, 64
diff --git a/include/profiles b/include/profiles
index 2b0885ce..e7a25670 100644
--- a/include/profiles
+++ b/include/profiles
@@ -35,7 +35,7 @@
# Show deprecation message for old config entries such as 'config:' and 'apache:'
FOUND=0
- DATA=$(grep -E "^[a-z-]{1,}:" ${PROFILE} | od -An -ta | sed 's/ /!space!/g') # od -An (no file offset), -ta (named character, to be on safe side)
+ DATA=$(grep -E "^[a-z-]{1,}:" ${PROFILE})
if ! IsEmpty "${DATA}"; then FOUND=1; fi
if [ ${FOUND} -eq 1 ]; then
@@ -50,18 +50,17 @@
Display --text " "
Display --text "=================================================================================================="
Display --text " "
- LogText "Insight: Profile '${PROFILE}' contians one or more old-style configuration entries"
+ LogText "Insight: Profile '${PROFILE}' contains one or more old-style configuration entries"
ReportWarning "GEN-0020" "Your profile contains one or more old-style configuration entries"
sleep 10
fi
# Security check for unexpected and possibly harmful escape characters (hyphen should be listed as first or last character)
- DATA=$(grep -Ev '^$|^ |^#|^config:' "${PROFILE}" | tr -d '[:alnum:]/\[\]\(\)_\|,\.:;= \n\r-' | od -An -ta | sed 's/ /!space!/g')
+ DATA=$(grep -Ev '^$|^ |^#|^config:' "${PROFILE}" | tr -d '[:alnum:]/\[\]\(\)_\|,\.:;= \n\r-')
if ! IsEmpty "${DATA}"; then
DisplayWarning "Your profile '${PROFILE}' contains unexpected characters. See the log file for more information."
LogText "Found unexpected or possibly harmful characters in profile '${PROFILE}'. See which characters matched in the output below and compare them with your profile."
- for I in ${DATA}; do
- I=$(echo ${I} | sed 's/!space!/ /g')
+ for I in $(printf ${DATA} | od -An -ta); do
LogText "Output: ${I}"
done
LogText "Suggestion: comment incorrect lines with a '#' and try again. Open a GitHub issue if valid characters are blocked"
diff --git a/include/report b/include/report
index 29f45643..3d0c7fdf 100644
--- a/include/report
+++ b/include/report
@@ -151,14 +151,14 @@
fi
# Show suggestions from logfile
- SSUGGESTIONS=$(${GREPBINARY} 'Suggestion: ' ${LOGFILE} | sed 's/ /!space!/g')
+ SUGGESTIONS=$(${GREPBINARY} 'Suggestion: ' ${LOGFILE} | sed 's/ /!space!/g')
- if [ -z "${SSUGGESTIONS}" ]; then
+ if [ -z "${SUGGESTIONS}" ]; then
echo " ${OK}No suggestions${NORMAL}"; echo ""
else
echo " ${YELLOW}Suggestions${NORMAL} (${TOTAL_SUGGESTIONS}):"
echo " ${WHITE}----------------------------${NORMAL}"
- for SUGGESTION in ${SSUGGESTIONS}; do
+ for SUGGESTION in ${SUGGESTIONS}; do
SOLUTION=""
SHOWSUGGESTION=$(echo ${SUGGESTION} | sed 's/!space!/ /g' | sed 's/^.* Suggestion: //' | sed 's/\[details:\(.*\)\] \[solution:\(.*\)\]//' | sed 's/test://')
ADDLINK=$(echo ${SUGGESTION} | sed 's/!space!/ /g' | sed 's/^.* Suggestion: \(.*\)\[test://' | sed 's/\]\(.*\)]//' | ${AWKBINARY} -F: '{print $1}')
@@ -183,7 +183,7 @@
done
fi
# Show tip on how to continue (next steps)
- if [ ! "${SWARNINGS}" = "" -o ! "${SSUGGESTIONS}" = "" ]; then
+ if [ ! "${SWARNINGS}" = "" -o ! "${SUGGESTIONS}" = "" ]; then
echo " ${CYAN}Follow-up${NORMAL}:"
echo " ${WHITE}----------------------------${NORMAL}"
echo " ${WHITE}-${NORMAL} Show details of a test (lynis show details TEST-ID)"
diff --git a/include/tests_accounting b/include/tests_accounting
index 91fca1a0..dd1ef2a8 100644
--- a/include/tests_accounting
+++ b/include/tests_accounting
@@ -18,7 +18,7 @@
#
#################################################################################
#
- InsertSection "Accounting"
+ InsertSection "${SECTION_ACCOUNTING}"
#
#################################################################################
#
@@ -123,8 +123,19 @@
Display --indent 2 --text "- Checking sysstat accounting data" --result "${STATUS_DISABLED}" --color WHITE
ReportSuggestion "${TEST_NO}" "Enable sysstat to collect accounting (cron disabled)"
fi
+ elif [ -f "${ROOTDIR}lib/systemd/system/sysstat.service" ] || [ -f "${ROOTDIR}etc/systemd/system/sysstat.service" ]; then
+ LogText "Result: sysstat systemd unit found"
+ if [ -L "${ROOTDIR}etc/systemd/system/multi-user.target.wants/sysstat.service" ]; then
+ # Assuming -collect.timer and -summary.timer are enabled as well,
+ # as they are usually in the install section.
+ LogText "Result: sysstat enabled via systemd"
+ Display --indent 2 --text "- Checking sysstat accounting data" --result "${STATUS_ENABLED}" --color GREEN
+ else
+ LogText "Result: sysstat disabled via systemd"
+ Display --indent 2 --text "- Checking sysstat accounting data" --result "${STATUS_DISABLED}" --color WHITE
+ fi
else
- LogText "Result: sysstat not found via ${ROOTDIR}etc/default/sysstat or ${ROOTDIR}etc/cron.d/sysstat"
+ LogText "Result: sysstat not found via ${ROOTDIR}etc/default/sysstat or ${ROOTDIR}etc/cron.d/sysstat or as a systemd unit"
Display --indent 2 --text "- Checking sysstat accounting data" --result "${STATUS_NOT_FOUND}" --color YELLOW
ReportSuggestion "${TEST_NO}" "Enable sysstat to collect accounting (no results)"
fi
diff --git a/include/tests_authentication b/include/tests_authentication
index 3dbe08f7..ce2205ca 100644
--- a/include/tests_authentication
+++ b/include/tests_authentication
@@ -31,7 +31,7 @@
#
#################################################################################
#
- InsertSection "Users, Groups and Authentication"
+ InsertSection "${SECTION_USERS_GROUPS_AND_AUTHENTICATION}"
# Test : AUTH-9204
# Description : Check users with UID zero (0)
@@ -502,7 +502,7 @@
FIND=$(${EGREPBINARY} "^passwd" /etc/nsswitch.conf | ${EGREPBINARY} "compat|nisplus")
if [ -z "${FIND}" ]; then
LogText "Result: NIS+ authentication not enabled"
- Display --indent 2 --text "- NIS+ authentication support" --result "NOT ENABLED" --color WHITE
+ Display --indent 2 --text "- NIS+ authentication support" --result "${STATUS_NOT_ENABLED}" --color WHITE
else
FIND2=$(${EGREPBINARY} "^passwd_compat" ${ROOTDIR}etc/nsswitch.conf | ${GREPBINARY} "nisplus")
FIND3=$(${EGREPBINARY} "^passwd" ${ROOTDIR}etc/nsswitch.conf | ${GREPBINARY} "nisplus")
@@ -511,7 +511,7 @@
Display --indent 2 --text "- NIS+ authentication support" --result "${STATUS_ENABLED}" --color GREEN
else
LogText "Result: NIS+ authentication not enabled"
- Display --indent 2 --text "- NIS+ authentication support" --result "NOT ENABLED" --color WHITE
+ Display --indent 2 --text "- NIS+ authentication support" --result "${STATUS_NOT_ENABLED}" --color WHITE
fi
fi
else
@@ -529,7 +529,7 @@
FIND=$(${EGREPBINARY} "^passwd" /etc/nsswitch.conf | ${EGREPBINARY} "compat|nis" | ${GREPBINARY} -v "nisplus")
if [ -z "${FIND}" ]; then
LogText "Result: NIS authentication not enabled"
- Display --indent 2 --text "- NIS authentication support" --result "NOT ENABLED" --color WHITE
+ Display --indent 2 --text "- NIS authentication support" --result "${STATUS_NOT_ENABLED}" --color WHITE
else
FIND2=$(${EGREPBINARY} "^passwd_compat" /etc/nsswitch.conf | ${GREPBINARY} "nis" | ${GREPBINARY} -v "nisplus")
FIND3=$(${EGREPBINARY} "^passwd" /etc/nsswitch.conf | ${GREPBINARY} "nis" | ${GREPBINARY} -v "nisplus")
@@ -538,7 +538,7 @@
Display --indent 2 --text "- NIS authentication support" --result "${STATUS_ENABLED}" --color GREEN
else
LogText "Result: NIS authentication not enabled"
- Display --indent 2 --text "- NIS authentication support" --result "NOT ENABLED" --color WHITE
+ Display --indent 2 --text "- NIS authentication support" --result "${STATUS_NOT_ENABLED}" --color WHITE
fi
fi
else
@@ -849,7 +849,7 @@
#
#################################################################################
#
- # Test : AUTH-9282 and AUTH-9283
+ # Test : AUTH-9282, AUTH-9283, and AUTH-9284
# Note : Every Linux based operating system seem to have different passwd
# options, so we have to check the version first.
if [ "${OS}" = "Linux" ]; then
@@ -859,25 +859,29 @@
PREQS_MET="YES"
FIND_P=$(passwd -a -S 2> /dev/null | ${AWKBINARY} '{ if ($2=="P" && $5=="99999") print $1 }')
FIND2=$(passwd -a -S 2> /dev/null | ${AWKBINARY} '{ if ($2=="NP") print $1 }')
+ FIND3=$(passwd -a -S 2> /dev/null | ${AWKBINARY} '{ if ($2=="L") print $1 }' | sort | uniq)
;;
*)
PREQS_MET="YES"
FIND_P=$(passwd --all --status 2> /dev/null | ${AWKBINARY} '{ if ($2=="P" && $5=="99999") print $1 }')
FIND2=$(passwd --all --status 2> /dev/null | ${AWKBINARY} '{ if ($2=="NP") print $1 }')
+ FIND3=$(passwd --all --status 2> /dev/null | ${AWKBINARY} '{ if ($2=="L") print $1 }' | sort | uniq)
;;
esac
elif [ "${OS_REDHAT_OR_CLONE}" -eq 1 ]; then
PREQS_MET="YES"
FIND_P=$(for I in $(${AWKBINARY} -F: '{print $1}' "${ROOTDIR}etc/passwd") ; do passwd -S "$I" | ${AWKBINARY} '{ if ($2=="PS" && $5=="99999") print $1 }' ; done)
FIND2=$(for I in $(${AWKBINARY} -F: '{print $1}' "${ROOTDIR}etc/passwd") ; do passwd -S "$I" | ${AWKBINARY} '{ if ($2=="NP") print $1 }' ; done)
+ FIND3=$(for I in $(${AWKBINARY} -F: '{print $1}' "${ROOTDIR}etc/passwd") ; do passwd -S "$I" | ${AWKBINARY} '{ if ($2=="L" || $2=="LK") print $1 }' | sort | uniq ; done)
else
LogText "Result: skipping test for this Linux version"
ReportManual "AUTH-9282:01"
PREQS_MET="NO"
FIND_P=""
FIND2=""
+ FIND3=""
fi
- else
+ else
PREQS_MET="NO"
fi
@@ -898,11 +902,10 @@
ReportSuggestion "${TEST_NO}" "When possible set expire dates for all password protected accounts"
fi
fi
-#
-#################################################################################
-#
+
# Test : AUTH-9283
# Description : Search passwordless accounts
+ # Notes : requires FIND2 variable
Register --test-no AUTH-9283 --preqs-met ${PREQS_MET} --weight L --network NO --category security --description "Checking accounts without password"
if [ "${SKIPTEST}" -eq 0 ]; then
LogText "Test: Checking passwordless accounts"
@@ -919,6 +922,38 @@
ReportWarning "${TEST_NO}" "Found accounts without password"
fi
fi
+
+ # Test : AUTH-9284
+ # Description : Check locked user accounts in /etc/passwd
+ # Notes : requires FIND3 variable
+ Register --test-no AUTH-9284 --preqs-met ${PREQS_MET} --weight L --network NO --category security --description "Check locked user accounts in /etc/passwd"
+ if [ "${SKIPTEST}" -eq 0 ]; then
+ LogText "Test: Checking locked accounts"
+ NON_SYSTEM_ACCOUNTS=$(${AWKBINARY} -F : '$3 > 999 && $3 != 65534 {print $1}' ${ROOTDIR}etc/passwd | ${SORTBINARY} | ${UNIQBINARY})
+ LOCKED_NON_SYSTEM_ACCOUNTS=0
+ for account in ${FIND3}; do
+ if echo "${NON_SYSTEM_ACCOUNTS}" | ${GREPBINARY} -w "${account}" > /dev/null ; then
+ LOCKED_NON_SYSTEM_ACCOUNTS=$((LOCKED_NON_SYSTEM_ACCOUNTS + 1))
+ fi
+ done
+ if [ ${LOCKED_NON_SYSTEM_ACCOUNTS} -eq 0 ]; then
+ LogText "Result: all accounts seem to be unlocked"
+ Display --indent 2 --text "- Locked accounts" --result "${STATUS_OK}" --color GREEN
+ else
+ LogText "Result: found one or more locked accounts"
+ for account in ${FIND3}; do
+ if echo "${NON_SYSTEM_ACCOUNTS}" | ${GREPBINARY} -w "${account}" > /dev/null ; then
+ LogText "Locked account: ${account}"
+ Report "locked_account[]=${account}"
+ fi
+ done
+ Display --indent 2 --text "- Locked accounts" --result "${STATUS_FOUND}" --color RED
+ ReportSuggestion "${TEST_NO}" "Look at the locked accounts and consider removing them"
+ fi
+ unset account LOCKED_NON_SYSTEM_ACCOUNTS NON_SYSTEM_ACCOUNTS
+ fi
+
+ unset FIND1 FIND2 FIND3
#
#################################################################################
#
@@ -1033,7 +1068,7 @@
# Test : AUTH-9306
# Description : Check if authentication is needed to boot the system
# Notes : :d_boot_authenticate: is a good option for production machines to
- # avoid unauthorized booting of systems. Option :d_boot_autentication@:
+ # avoid unauthorized booting of systems. Option :d_boot_authentication@:
# disabled a required login.
Register --test-no AUTH-9306 --os HP-UX --weight L --network NO --category security --description "Check single boot authentication"
if [ ${SKIPTEST} -eq 0 ]; then
@@ -1440,7 +1475,7 @@
if [ ${FOUND} -eq 1 ]; then
Display --indent 2 --text "- Checking account locking" --result "${STATUS_ENABLED}" --color GREEN
else
- Display --indent 2 --text "- Checking account locking" --result "NOT ENABLED" --color YELLOW
+ Display --indent 2 --text "- Checking account locking" --result "${STATUS_NOT_ENABLED}" --color YELLOW
fi
fi
#
@@ -1454,7 +1489,7 @@
FIND=$(${EGREPBINARY} "^passwd" ${ROOTDIR}etc/nsswitch.conf | ${GREPBINARY} "ldap")
if [ "${FIND}" = "" ]; then
LogText "Result: LDAP authentication not enabled"
- Display --indent 2 --text "- LDAP authentication support" --result "NOT ENABLED" --color WHITE
+ Display --indent 2 --text "- LDAP authentication support" --result "${STATUS_NOT_ENABLED}" --color WHITE
else
LogText "Result: LDAP authentication enabled"
Display --indent 2 --text "- LDAP authentication support" --result "${STATUS_ENABLED}" --color GREEN
diff --git a/include/tests_banners b/include/tests_banners
index 60fa3c2e..f7e4d7e9 100644
--- a/include/tests_banners
+++ b/include/tests_banners
@@ -22,7 +22,7 @@
#
#################################################################################
#
- InsertSection "Banners and identification"
+ InsertSection "${SECTION_BANNERS_AND_IDENTIFICATION}"
#
#################################################################################
#
diff --git a/include/tests_boot_services b/include/tests_boot_services
index 474c04c2..7d6feeec 100644
--- a/include/tests_boot_services
+++ b/include/tests_boot_services
@@ -22,7 +22,7 @@
#
#################################################################################
#
- InsertSection "Boot and services"
+ InsertSection "${SECTION_BOOT_AND_SERVICES}"
#
#################################################################################
#
@@ -339,7 +339,7 @@
if [ ${SKIPTEST} -eq 0 ]; then
FOUND=0
- if [ "${ROOTDIR}etc/grub.d" ]; then
+ if [ -d "${ROOTDIR}etc/grub.d" ]; then
CONF_FILES=$(${FINDBINARY} "${ROOTDIR}etc/grub.d" -type f -name "[0-9][0-9]*" -print0 | ${TRBINARY} '\0' ' ' | ${TRBINARY} -d '[:cntrl:]')
CONF_FILES="${GRUBCONFFILE} ${ROOTDIR}boot/grub/custom.cfg ${CONF_FILES}"
else
diff --git a/include/tests_containers b/include/tests_containers
index a9a18836..78c12c50 100644
--- a/include/tests_containers
+++ b/include/tests_containers
@@ -22,7 +22,7 @@
#
#################################################################################
#
- InsertSection "Containers"
+ InsertSection "${SECTION_CONTAINERS}"
#
#################################################################################
#
diff --git a/include/tests_crypto b/include/tests_crypto
index 437c9b54..af63d21a 100644
--- a/include/tests_crypto
+++ b/include/tests_crypto
@@ -22,7 +22,11 @@
#
#################################################################################
#
- InsertSection "Cryptography"
+ RNG_FOUND=0
+#
+#################################################################################
+#
+ InsertSection "${SECTION_CRYPTOGRAPHY}"
#
#################################################################################
#
@@ -188,20 +192,28 @@
if [ ${SKIPTEST} -eq 0 ]; then
ENCRYPTED_SWAPS=0
UNENCRYPTED_SWAPS=0
- SWAPS=$(${SWAPONBINARY} --show=NAME --noheadings)
- for BLOCK_DEV in ${SWAPS}; do
- if ${CRYPTSETUPBINARY} isLuks "${BLOCK_DEV}" 2> /dev/null; then
- LogText "Result: Found LUKS encrypted swap device: ${BLOCK_DEV}"
- ENCRYPTED_SWAPS=$((ENCRYPTED_SWAPS +1))
- elif ${CRYPTSETUPBINARY} status "${BLOCK_DEV}" 2> /dev/null | ${GREPBINARY} --quiet "cipher:"; then
- LogText "Result: Found non-LUKS encrypted swap device: ${BLOCK_DEV}"
- ENCRYPTED_SWAPS=$((ENCRYPTED_SWAPS +1))
- else
- LogText "Result: Found unencrypted swap device: ${BLOCK_DEV}"
- UNENCRYPTED_SWAPS=$((UNENCRYPTED_SWAPS +1))
- fi
- done
- Display --indent 2 --text "- Found ${ENCRYPTED_SWAPS} encrypted and ${UNENCRYPTED_SWAPS} unencrypted swap devices in use." --result OK --color WHITE
+ # Redirect errors, as RHEL 5/6 and others don't have the --show option
+ SWAPS=$(${SWAPONBINARY} --show=NAME --noheadings 2> /dev/null)
+ if [ $? -eq 0 ]; then
+ for BLOCK_DEV in ${SWAPS}; do
+ if ${CRYPTSETUPBINARY} isLuks "${BLOCK_DEV}" 2> /dev/null; then
+ LogText "Result: Found LUKS encrypted swap device: ${BLOCK_DEV}"
+ ENCRYPTED_SWAPS=$((ENCRYPTED_SWAPS + 1))
+ Report "encrypted_swap[]=${BLOCK_DEV},LUKS"
+ elif ${CRYPTSETUPBINARY} status "${BLOCK_DEV}" 2> /dev/null | ${GREPBINARY} --quiet "cipher:"; then
+ LogText "Result: Found non-LUKS encrypted swap device: ${BLOCK_DEV}"
+ ENCRYPTED_SWAPS=$((ENCRYPTED_SWAPS + 1))
+ Report "encrypted_swap[]=${BLOCK_DEV},other"
+ else
+ LogText "Result: Found unencrypted swap device: ${BLOCK_DEV}"
+ UNENCRYPTED_SWAPS=$((UNENCRYPTED_SWAPS +1))
+ Report "non_encrypted_swap[]=${BLOCK_DEV}"
+ fi
+ done
+ Display --indent 2 --text "- Found ${ENCRYPTED_SWAPS} encrypted and ${UNENCRYPTED_SWAPS} unencrypted swap devices in use." --result OK --color WHITE
+ else
+ LogText "Result: skipping testing as swapon returned an error."
+ fi
fi
#
#################################################################################
@@ -233,12 +245,13 @@
if [ ${SKIPTEST} -eq 0 ]; then
LogText "Test: looking for ${ROOTDIR}sys/class/misc/hw_random/rng_current"
if [ -f "${ROOTDIR}sys/class/misc/hw_random/rng_current" ]; then
- DATA=$(${HEADBINARY} --lines=1 ${ROOTDIR}sys/class/misc/hw_random/rng_current | ${TRBINARY} -d '[[:cntrl:]]')
+ DATA=$(${HEADBINARY} -n 1 ${ROOTDIR}sys/class/misc/hw_random/rng_current | ${TRBINARY} -d '[[:cntrl:]]')
if [ "${DATA}" != "none" ]; then
LogText "Result: positive match, found RNG: ${DATA}"
if IsRunning "rngd"; then
Display --indent 2 --text "- HW RNG & rngd" --result "${STATUS_YES}" --color GREEN
LogText "Result: rngd is running"
+ RNG_FOUND=1
else
Display --indent 2 --text "- HW RNG & rngd" --result "${STATUS_NO}" --color YELLOW
# TODO - enable suggestion when website has listing for this control
@@ -270,8 +283,9 @@
done
if [ -z "${FOUND}" ]; then
Display --indent 2 --text "- SW prng" --result "${STATUS_NO}" --color YELLOW
- ReportSuggestion "${TEST_NO}" "Utilize software pseudo random number generators"
+ # ReportSuggestion "${TEST_NO}" "Utilize software pseudo random number generators"
else
+ RNG_FOUND=1
Display --indent 2 --text "- SW prng" --result "${STATUS_YES}" --color GREEN
LogText "Result: found ${FOUND} running"
fi
@@ -279,6 +293,10 @@
#
#################################################################################
#
+ Report "rng_found=${RNG_FOUND}"
+#
+#################################################################################
+#
WaitForKeyPress
diff --git a/include/tests_databases b/include/tests_databases
index ace3fd67..fc44d690 100644
--- a/include/tests_databases
+++ b/include/tests_databases
@@ -39,7 +39,7 @@
#
#################################################################################
#
- InsertSection "Databases"
+ InsertSection "${SECTION_DATABASES}"
# Test : DBS-1804
# Description : Check if MySQL is being used
diff --git a/include/tests_dns b/include/tests_dns
index e21a2aef..085168d4 100644
--- a/include/tests_dns
+++ b/include/tests_dns
@@ -45,11 +45,11 @@
#
# if [ "${GOOD}" = "${TIMEOUT}" -a "${BAD}" = "${TIMEOUT}" ]; then
# LogText "Result: received timeout, can't determine DNSSEC validation"
-# Display --indent 4 --text "- Checking DNSSEC validation" --result "${STATUS_UNKOWN}" --color YELLOW
+# Display --indent 4 --text "- Checking DNSSEC validation" --result "${STATUS_UNKNOWN}" --color YELLOW
# #ReportException "${TEST_NO}" "Exception found, both query failed, due to connection timeout"
# elif [ -z "${GOOD}" -a -n "${BAD}" ]; then
# LogText "Result: good signature failed, yet bad signature was accepted"
-# Display --indent 4 --text "- Checking DNSSEC validation" --result "${STATUS_UNKOWN}" --color YELLOW
+# Display --indent 4 --text "- Checking DNSSEC validation" --result "${STATUS_UNKNOWN}" --color YELLOW
# #ReportException "${TEST_NO}" "Exception found, OK failed, bad signature was accepted"
# elif [ -n "${GOOD}" -a -n "${BAD}" ]; then
# Display --indent 4 --text "- Checking DNSSEC validation" --result "${STATUS_SUGGESTION}" --color YELLOW
diff --git a/include/tests_file_integrity b/include/tests_file_integrity
index 728c2616..c06b1703 100644
--- a/include/tests_file_integrity
+++ b/include/tests_file_integrity
@@ -25,7 +25,7 @@
#
#################################################################################
#
- InsertSection "Software: file integrity"
+ InsertSection "${SECTION_FILE_INTEGRITY}"
Display --indent 2 --text "- Checking file integrity tools"
#
#################################################################################
diff --git a/include/tests_file_permissions b/include/tests_file_permissions
index e9e859fd..50ccdeee 100644
--- a/include/tests_file_permissions
+++ b/include/tests_file_permissions
@@ -22,7 +22,7 @@
#
#################################################################################
#
- InsertSection "File Permissions"
+ InsertSection "${SECTION_FILE_PERMISSIONS}"
#
#################################################################################
#
diff --git a/include/tests_filesystems b/include/tests_filesystems
index bfe451ab..0de387f7 100644
--- a/include/tests_filesystems
+++ b/include/tests_filesystems
@@ -28,7 +28,7 @@
#
#################################################################################
#
- InsertSection "File systems"
+ InsertSection "${SECTION_FILE_SYSTEMS}"
#
#################################################################################
#
@@ -629,11 +629,11 @@
fi
done
fi
- NMOUNTS=$(mount | ${WCBINARY} --lines)
- NDEVMOUNTS=$(mount | ${AWKBINARY} '{print $6}' | ${GREPBINARY} -v nodev | ${WCBINARY} --lines)
- NEXECMOUNTS=$(mount | ${AWKBINARY} '{print $6}' | ${GREPBINARY} -v noexec | ${WCBINARY} --lines)
- NSUIDMOUNTS=$(mount | ${AWKBINARY} '{print $6}' | ${GREPBINARY} -v nosuid | ${WCBINARY} --lines)
- NWRITEANDEXECMOUNTS=$(mount | ${AWKBINARY} '{print $6}' | ${GREPBINARY} -v noexec | ${EGREPBINARY} -v '^\(ro[,)]' | ${WCBINARY} --lines)
+ NMOUNTS=$(mount | ${WCBINARY} -l)
+ NDEVMOUNTS=$(mount | ${AWKBINARY} '{print $6}' | ${GREPBINARY} -v nodev | ${WCBINARY} -l)
+ NEXECMOUNTS=$(mount | ${AWKBINARY} '{print $6}' | ${GREPBINARY} -v noexec | ${WCBINARY} -l)
+ NSUIDMOUNTS=$(mount | ${AWKBINARY} '{print $6}' | ${GREPBINARY} -v nosuid | ${WCBINARY} -l)
+ NWRITEANDEXECMOUNTS=$(mount | ${AWKBINARY} '{print $6}' | ${GREPBINARY} -v noexec | ${EGREPBINARY} -v '^\(ro[,)]' | ${WCBINARY} -l)
LogText "Result: Total without nodev:${NDEVMOUNTS} noexec:${NEXECMOUNTS} nosuid:${NSUIDMOUNTS} ro or noexec (W^X): ${NWRITEANDEXECMOUNTS}, of total ${NMOUNTS}"
Display --indent 2 --text "- Total without nodev:${NDEVMOUNTS} noexec:${NEXECMOUNTS} nosuid:${NSUIDMOUNTS} ro or noexec (W^X): ${NWRITEANDEXECMOUNTS} of total ${NMOUNTS}"
fi
diff --git a/include/tests_firewalls b/include/tests_firewalls
index d3ff1e3d..685f2452 100644
--- a/include/tests_firewalls
+++ b/include/tests_firewalls
@@ -22,7 +22,7 @@
#
#################################################################################
#
- InsertSection "Software: firewalls"
+ InsertSection "${SECTION_FIREWALLS}"
#
#################################################################################
#
@@ -539,7 +539,7 @@
Register --test-no FIRE-4590 --weight L --network NO --category security --description "Check firewall status"
if [ ${SKIPTEST} -eq 0 ]; then
if [ ${FIREWALL_ACTIVE} -eq 1 ]; then
- Display --indent 2 --text "- Checking host based firewall" --result "ACTIVE" --color GREEN
+ Display --indent 2 --text "- Checking host based firewall" --result "${STATUS_ACTIVE}" --color GREEN
LogText "Result: host based firewall or packet filter is active"
Report "manual[]=Verify if there is a formal process for testing and applying firewall rules"
Report "manual[]=Verify all traffic is filtered the right way between the different security zones"
@@ -548,7 +548,7 @@
Report "manual[]=Make sure an explicit deny all is the default policy for all unmatched traffic"
AddHP 5 5
else
- Display --indent 2 --text "- Checking host based firewall" --result "NOT ACTIVE" --color YELLOW
+ Display --indent 2 --text "- Checking host based firewall" --result "${STATUS_NOT_ACTIVE}" --color YELLOW
LogText "Result: no host based firewall/packet filter found or configured"
ReportSuggestion "${TEST_NO}" "Configure a firewall/packet filter to filter incoming and outgoing traffic"
AddHP 0 5
diff --git a/include/tests_hardening b/include/tests_hardening
index 2f88b179..4feff7c6 100644
--- a/include/tests_hardening
+++ b/include/tests_hardening
@@ -18,7 +18,7 @@
#
#################################################################################
#
- InsertSection "Hardening"
+ InsertSection "${SECTION_HARDENING}"
# COMPILER_INSTALLED is initialized before
HARDEN_COMPILERS_NEEDED=0
diff --git a/include/tests_homedirs b/include/tests_homedirs
index 09f4601c..c896bf86 100644
--- a/include/tests_homedirs
+++ b/include/tests_homedirs
@@ -22,7 +22,7 @@
#
#################################################################################
#
- InsertSection "Home directories"
+ InsertSection "${SECTION_HOME_DIRECTORIES}"
#
#################################################################################
#
diff --git a/include/tests_insecure_services b/include/tests_insecure_services
index d6d87245..2ba308b3 100644
--- a/include/tests_insecure_services
+++ b/include/tests_insecure_services
@@ -22,7 +22,7 @@
#
#################################################################################
#
- InsertSection "Insecure services"
+ InsertSection "${SECTION_INSECURE_SERVICES}"
#
#################################################################################
#
@@ -63,11 +63,11 @@
LogText "Test: Searching for active inet daemon"
if IsRunning "inetd"; then
LogText "Result: inetd is running"
- Display --indent 4 --text "- inetd status" --result "ACTIVE" --color GREEN
+ Display --indent 4 --text "- inetd status" --result "${STATUS_ACTIVE}" --color GREEN
INETD_ACTIVE=1
else
LogText "Result: inetd is NOT running"
- Display --indent 4 --text "- inetd status" --result "NOT ACTIVE" --color GREEN
+ Display --indent 4 --text "- inetd status" --result "${STATUS_NOT_ACTIVE}" --color GREEN
fi
fi
#
@@ -158,11 +158,11 @@
LogText "Test: Searching for active extended internet services daemon (xinetd)"
if IsRunning "xinetd"; then
LogText "Result: xinetd is running"
- Display --indent 4 --text "- xinetd status" --result "ACTIVE" --color GREEN
+ Display --indent 4 --text "- xinetd status" --result "${STATUS_ACTIVE}" --color GREEN
XINETD_ACTIVE=1
else
LogText "Result: xinetd is NOT running"
- Display --indent 4 --text "- xinetd status" --result "NOT ACTIVE" --color GREEN
+ Display --indent 4 --text "- xinetd status" --result "${STATUS_NOT_ACTIVE}" --color GREEN
fi
fi
#
diff --git a/include/tests_kernel b/include/tests_kernel
index 011d02c6..3d3ac339 100644
--- a/include/tests_kernel
+++ b/include/tests_kernel
@@ -22,7 +22,7 @@
#
#################################################################################
#
- InsertSection "Kernel"
+ InsertSection "${SECTION_KERNEL}"
#
#################################################################################
#
@@ -485,7 +485,7 @@
( [ ${SYSD_CORED_BASE_PROCSIZEMAX_NR_ENABLED} -ge 1 ] && [ ${SYSD_CORED_SUB_STORAGE_NR_ENABLED} -ge 1 ] ) || \
( [ ${SYSD_CORED_BASE_STORAGE_NR_ENABLED} -ge 1 ] && [ ${SYSD_CORED_SUB_PROCSIZEMAX_NR_ENABLED} -ge 1 ] ) || \
( [ ${SYSD_CORED_SUB_PROCSIZEMAX_NR_ENABLED} -ge 1 ] && [ ${SYSD_CORED_SUB_STORAGE_NR_ENABLED} -ge 1 ] ); then
- LogText "Result: core dumps are explicitely enabled in systemd configuration files"
+ LogText "Result: core dumps are explicitly enabled in systemd configuration files"
ReportSuggestion "${TEST_NO}" "If not required, consider explicit disabling of core dump in ${ROOTDIR}etc/systemd/coredump.conf ('ProcessSizeMax=0', 'Storage=none')"
Display --indent 4 --text "- configuration in systemd conf files" --result "${STATUS_ENABLED}" --color RED
AddHP 0 1
@@ -664,9 +664,13 @@
elif [ -f ${ROOTDIR}boot/vmlinuz-linux-lts ]; then
LogText "Result: found ${ROOTDIR}boot/vmlinuz-linux-lts"
FOUND_VMLINUZ=${ROOTDIR}boot/vmlinuz-linux-lts
+ elif [ -f ${ROOTDIR}boot/vmlinuz-lts ]; then
+ LogText "Result: found ${ROOTDIR}boot/vmlinuz-lts"
+ FOUND_VMLINUZ=${ROOTDIR}boot/vmlinuz-lts
else
- # Match on /boot/vm5.3.7 or /boot/vmlinuz-5.3.7-1-default
- FOUND_VMLINUZ=$(${LSBINARY} -t ${ROOTDIR}boot/vm[l0-9]* 2> /dev/null | ${HEADBINARY} -1)
+ # Match on items like /boot/vm5.3.7 or /boot/vmlinuz-5.3.7-1-default. Get newest file (ls -t and pipe into head)
+ # Note: ignore a rescue kernel (e.g. CentOS)
+ FOUND_VMLINUZ=$(${LSBINARY} -t ${ROOTDIR}boot/vm[l0-9]* 2> /dev/null | ${GREPBINARY} -v '\-rescue\-' | ${HEADBINARY} -1)
LogText "Result: found ${FOUND_VMLINUZ}"
fi
@@ -678,10 +682,21 @@
VERSION_ON_DISK=$(echo ${FOUND_VMLINUZ} | ${SEDBINARY} 's#^/boot/##' | ${SEDBINARY} 's/^vmlinuz-//')
LogText "Result: version derived from file name is '${VERSION_ON_DISK}'"
elif [ -f "${FOUND_VMLINUZ}" ]; then
- VERSION_ON_DISK=$(echo ${FOUND_VMLINUZ} | ${SEDBINARY} 's#^/boot/##' | ${SEDBINARY} 's/^vmlinuz-//')
+ VERSION_ON_DISK=$(echo ${FOUND_VMLINUZ} | ${SEDBINARY} 's#^/boot/##' | ${SEDBINARY} 's/^vmlinuz-//' | ${SEDBINARY} '$s/-\?\(linux\)\?-\?\(lts\)\?//')
LogText "Result: version derived from file name is '${VERSION_ON_DISK}'"
+
fi
+ # Data check: perform reset if we found a version but looks incomplete
+ # Example: Arch Linux will return only 'linux' as its version after it discovered /boot/vmlinuz-linux
+ case ${VERSION_ON_DISK} in
+ "linux" | "linux-lts")
+ LogText "Result: reset of version (${VERSION_ON_DISK}) as it looks incomplete"
+ VERSION_ON_DISK=""
+ ;;
+ esac
+
+ # If we did not find the version yet, see if we can extract it from the magic data that 'file' returns
if [ -z "${VERSION_ON_DISK}" ]; then
LogText "Test: checking kernel version on disk"
NEXTLINE=0
@@ -697,6 +712,7 @@
done
fi
+ # Last check if we finally got a version or not
if [ -z "${VERSION_ON_DISK}" ]; then
LogText "Result: could not find the version on disk"
ReportException "${TEST_NO}:4" "Could not find the kernel version"
@@ -780,7 +796,7 @@
# Attempt to check for Raspbian if reboot is needed
# This check searches for apt package "raspberrypi-kernel-[package-date]", trys to extract the date of packaging from the filename
# and compares that date with the currently running kernel's build date (uname -v).
- # Of course there can be a time difference between kernel build and kernel packaging, therefor a time difference of
+ # Of course there can be a time difference between kernel build and kernel packaging, therefore a time difference of
# 3 days is accepted and it is assumed with only 3 days apart, this must be the same kernel version.
if [ ${REBOOT_NEEDED} -eq 2 ] && [ -d "${APT_ARCHIVE_DIRECTORY}" ]; then
LogText "Result: found folder ${APT_ARCHIVE_DIRECTORY}; assuming this is a debian based distribution"
diff --git a/include/tests_kernel_hardening b/include/tests_kernel_hardening
index 59a5f846..e117a704 100644
--- a/include/tests_kernel_hardening
+++ b/include/tests_kernel_hardening
@@ -22,13 +22,13 @@
#
#################################################################################
#
- InsertSection "Kernel Hardening"
+ InsertSection "${SECTION_KERNEL_HARDENING}"
#
#################################################################################
#
# Test : KRNL-6000
# Description : Check sysctl parameters
- # Sysctl : net.ipv4.icmp_ingore_bogus_error_responses (=1)
+ # Sysctl : net.ipv4.icmp_ignore_bogus_error_responses (=1)
if [ ! "${SYSCTL_READKEY}" = "" ]; then PREQS_MET="YES"; else PREQS_MET="NO"; fi
Register --test-no KRNL-6000 --preqs-met ${PREQS_MET} --weight L --network NO --category security --description "Check sysctl key pairs in scan profile"
if [ ${SKIPTEST} -eq 0 ]; then
diff --git a/include/tests_ldap b/include/tests_ldap
index 26d11965..7558d491 100644
--- a/include/tests_ldap
+++ b/include/tests_ldap
@@ -22,7 +22,7 @@
#
#################################################################################
#
- InsertSection "LDAP Services"
+ InsertSection "${SECTION_LDAP_SERVICES}"
#
#################################################################################
#
diff --git a/include/tests_logging b/include/tests_logging
index 292940e3..b6110263 100644
--- a/include/tests_logging
+++ b/include/tests_logging
@@ -36,7 +36,7 @@
#
#################################################################################
#
- InsertSection "Logging and files"
+ InsertSection "${SECTION_LOGGING_AND_FILES}"
# Test : LOGG-2130
# Description : Check for a running syslog daemon
diff --git a/include/tests_mac_frameworks b/include/tests_mac_frameworks
index 3f23c77e..5c55e8f5 100644
--- a/include/tests_mac_frameworks
+++ b/include/tests_mac_frameworks
@@ -24,7 +24,7 @@
SELINUXFOUND=0
TOMOYOFOUND=0
- InsertSection "Security frameworks"
+ InsertSection "${SECTION_SECURITY_FRAMEWORKS}"
#
#################################################################################
#
@@ -76,7 +76,7 @@
Report "apparmor_policy_loaded=1"
AddHP 3 3
# ignore kernel threads (Parent PID = 2 [kthreadd])
- NUNCONFINED=$(${PSBINARY} -N --ppid 2 -o label | ${GREPBINARY} '^unconfined' | ${WCBINARY} --lines)
+ NUNCONFINED=$(${PSBINARY} -N --ppid 2 -o label | ${GREPBINARY} '^unconfined' | ${WCBINARY} -l)
Display --indent 8 --text "Found ${NUNCONFINED} unconfined processes"
for PROCESS in $(${PSBINARY} -N --ppid 2 -o label:1,pid,comm | ${GREPBINARY} '^unconfined' | ${TRBINARY} ' ' ':'); do
LogText "Result: Unconfined process: ${PROCESS}"
@@ -159,13 +159,13 @@
fi
Display --indent 8 --text "Current SELinux mode: ${FIND}"
PERMISSIVE=$(${SEMANAGEBINARY} permissive --list --noheading | ${TRBINARY} '\n' ' ')
- NPERMISSIVE=$(${SEMANAGEBINARY} permissive --list --noheading | ${WCBINARY} --lines)
+ NPERMISSIVE=$(${SEMANAGEBINARY} permissive --list --noheading | ${WCBINARY} -l)
Display --indent 8 --text "Found ${NPERMISSIVE} permissive SELinux object types"
LogText "Permissive SELinux object types: ${PERMISSIVE}"
UNCONFINED=$(${PSBINARY} -eo label,pid,command | ${GREPBINARY} '[u]nconfined_t' | ${TRBINARY} '\n' ' ')
INITRC=$(${PSBINARY} -eo label,pid,command | ${GREPBINARY} '[i]nitrc_t' | ${TRBINARY} '\n' ' ')
- NUNCONFINED=$(${PSBINARY} -eo label | ${GREPBINARY} '[u]nconfined_t' | ${WCBINARY} --lines)
- NINITRC=$(${PSBINARY} -eo label | ${GREPBINARY} '[i]nitrc_t' | ${WCBINARY} --lines)
+ NUNCONFINED=$(${PSBINARY} -eo label | ${GREPBINARY} '[u]nconfined_t' | ${WCBINARY} -l)
+ NINITRC=$(${PSBINARY} -eo label | ${GREPBINARY} '[i]nitrc_t' | ${WCBINARY} -l)
Display --indent 8 --text "Found ${NUNCONFINED} unconfined and ${NINITRC} initrc_t processes"
LogText "Unconfined processes: ${UNCONFINED}"
LogText "Processes with initrc_t type: ${INITRC}"
@@ -207,7 +207,7 @@
Display --indent 4 --text "- Checking TOMOYO Linux status" --result "${STATUS_ENABLED}" --color GREEN
Report "tomoyo_enabled=1"
if [ ! -z ${TOMOYOPSTREEBINARY} ]; then
- NUNCONFINED=$(${TOMOYOPSTREEBINARY} | ${GREPBINARY} -v '^ 3 ' | ${WCBINARY} --lines)
+ NUNCONFINED=$(${TOMOYOPSTREEBINARY} | ${GREPBINARY} -v '^ 3 ' | ${WCBINARY} -l)
Display --indent 8 --text "Found ${NUNCONFINED} unconfined (not profile 3) processes"
for PROCESS in $(${TOMOYOPSTREEBINARY} | ${GREPBINARY} -v '^ 3 ' | ${SEDBINARY} -e 's/+-//g' -e 's/^ *//g' -e 's/ \+/:/g' | ${SORTBINARY}); do
LogText "Result: Unconfined process: ${PROCESS}"
diff --git a/include/tests_mail_messaging b/include/tests_mail_messaging
index 3a65765c..cbbde8a0 100644
--- a/include/tests_mail_messaging
+++ b/include/tests_mail_messaging
@@ -22,7 +22,7 @@
#
#################################################################################
#
- InsertSection "Software: e-mail and messaging"
+ InsertSection "${SECTION_EMAIL_AND_MESSAGING}"
#
#################################################################################
#
diff --git a/include/tests_malware b/include/tests_malware
index 5e3c6fca..3c2cd72d 100644
--- a/include/tests_malware
+++ b/include/tests_malware
@@ -22,7 +22,7 @@
#
#################################################################################
#
- InsertSection "Software: ${SECTION_MALWARE}"
+ InsertSection "${SECTION_MALWARE}"
#
#################################################################################
#
@@ -39,6 +39,7 @@
MALWARE_SCANNER_INSTALLED=0
SOPHOS_SCANNER_RUNNING=0
SYMANTEC_SCANNER_RUNNING=0
+ SYNOLOGY_DAEMON_RUNNING=0
#
#################################################################################
#
@@ -239,6 +240,17 @@
Report "malware_scanner[]=symantec"
fi
+ # Synology Antivirus Essential
+ LogText "Test: checking process synoavd"
+ if IsRunning "synoavd"; then
+ FOUND=1
+ SYNOLOGY_DAEMON_RUNNING=1
+ MALWARE_SCANNER_INSTALLED=1
+ if IsVerbose; then Display --indent 2 --text "- ${GEN_CHECKING} Synology Antivirus Essential" --result "${STATUS_FOUND}" --color GREEN; fi
+ LogText "Result: found Synology Antivirus Essential"
+ Report "malware_scanner[]=synoavd"
+ fi
+
# TrendMicro (macOS)
LogText "Test: checking process TmccMac to test for Trend Micro anti-virus (macOS)"
if IsRunning "TmccMac"; then
diff --git a/include/tests_nameservices b/include/tests_nameservices
index df41fbc9..46f4f1fb 100644
--- a/include/tests_nameservices
+++ b/include/tests_nameservices
@@ -22,7 +22,7 @@
#
#################################################################################
#
- InsertSection "Name services"
+ InsertSection "${SECTION_NAME_SERVICES}"
#
#################################################################################
#
diff --git a/include/tests_networking b/include/tests_networking
index 420f26ea..9bf5a082 100644
--- a/include/tests_networking
+++ b/include/tests_networking
@@ -31,7 +31,7 @@
#
#################################################################################
#
- InsertSection "Networking"
+ InsertSection "${SECTION_NETWORKING}"
#
#################################################################################
#
@@ -70,7 +70,7 @@
LogText "Result: hostnamed is defined and not longer than 63 characters"
fi
# Test valid characters (normally a dot should not be in the name, but we can't be 100% sure we have short name)
- FIND=$(echo "${HOSTNAME}" | ${TRBINARY} -d '[a-zA-Z0-9\.\-]')
+ FIND=$(echo "${HOSTNAME}" | ${TRBINARY} -d '[:alnum:]\.\-')
if [ -z "${FIND}" ]; then
LogText "Result: good, no unexpected characters discovered in hostname"
if IsVerbose; then Display --indent 2 --text "- Hostname (allowed characters)" --result "${STATUS_OK}" --color GREEN; fi
@@ -683,7 +683,7 @@
Display --indent 2 --text "- Checking status DHCP client" --result "${STATUS_RUNNING}" --color WHITE
DHCP_CLIENT_RUNNING=1
else
- Display --indent 2 --text "- Checking status DHCP client" --result "NOT ACTIVE" --color WHITE
+ Display --indent 2 --text "- Checking status DHCP client" --result "${STATUS_NOT_ACTIVE}" --color WHITE
fi
fi
#
diff --git a/include/tests_ports_packages b/include/tests_ports_packages
index 286da608..2e827813 100644
--- a/include/tests_ports_packages
+++ b/include/tests_ports_packages
@@ -22,7 +22,7 @@
#
#################################################################################
#
- InsertSection "Ports and packages"
+ InsertSection "${SECTION_PORTS_AND_PACKAGES}"
PACKAGE_MGR_PKG=0
PACKAGE_AUDIT_TOOL=""
PACKAGE_AUDIT_TOOL_FOUND=0
@@ -1232,7 +1232,7 @@
ReportSuggestion "${TEST_NO}" "Install a package audit tool to determine vulnerable packages"
LogText "Result: no package audit tool found"
else
- Display --indent 2 --text "- Checking package audit tool" --result INSTALLED --color GREEN
+ Display --indent 2 --text "- Checking package audit tool" --result "${STATUS_INSTALLED}" --color GREEN
Display --indent 4 --text "Found: ${PACKAGE_AUDIT_TOOL}"
LogText "Result: found package audit tool: ${PACKAGE_AUDIT_TOOL}"
fi
@@ -1289,7 +1289,7 @@
KERNELS=$(${ZYPPERBINARY} --non-interactive -n se --type package --match-exact --installed-only "kernel-default" 2> /dev/null | ${GREPBINARY} "kernel-default" | ${WCBINARY} -l)
if [ ${KERNELS} -eq 0 ]; then
LogText "Result: found no kernels from zypper output, which is unexpected."
- ReportException "KRNL-5840:3" "Could not find any kernel packages via package manager. Maybe using a different kernel package?"
+ ReportException "${TEST_NO}" "Could not find any kernel packages via package manager. Maybe using a different kernel package?"
elif [ ${KERNELS} -gt 3 ]; then
LogText "Result: found more than 5 kernel packages on the system, which might indicate lack of regular cleanups"
ReportSuggestion "${TEST_NO}" "Remove any unneeded kernel packages"
@@ -1299,7 +1299,19 @@
fi
if [ ${KERNELS} -eq 0 -a ${TESTED} -eq 1 ]; then
- ReportException "KRNL-5840:1" "Could not find any kernel packages via package manager"
+ # Only report exception if there are kernels actually there. For example, LXC use the kernel of host system
+ case "${OS}" in
+ "Linux")
+ if [ -d "${ROOTDIR}boot" ]; then
+ if [ -z "$(${FINDBINARY} /boot -maxdepth 1 -type f -name 'vmlinuz*' -print -quit)" ]; then
+ ReportException "${TEST_NO}" "Could not find any kernel packages via package manager"
+ fi
+ fi
+ ;;
+ *)
+ ReportException "${TEST_NO}" "Could not find any kernel packages via package manager"
+ ;;
+ esac
fi
Report "installed_kernel_packages=${KERNELS}"
diff --git a/include/tests_printers_spoolers b/include/tests_printers_spoolers
index b8435493..61304f87 100644
--- a/include/tests_printers_spoolers
+++ b/include/tests_printers_spoolers
@@ -34,7 +34,7 @@
#
#################################################################################
#
- InsertSection "Printers and Spools"
+ InsertSection "${SECTION_PRINTERS_AND_SPOOLS}"
#
#################################################################################
#
diff --git a/include/tests_scheduling b/include/tests_scheduling
index a7b3f5c2..b461ba95 100644
--- a/include/tests_scheduling
+++ b/include/tests_scheduling
@@ -22,7 +22,7 @@
#
#################################################################################
#
- InsertSection "Scheduled tasks"
+ InsertSection "${SECTION_SCHEDULED_TASKS}"
#
#################################################################################
#
diff --git a/include/tests_shells b/include/tests_shells
index 6f39e1fd..89be9979 100644
--- a/include/tests_shells
+++ b/include/tests_shells
@@ -23,7 +23,7 @@
#################################################################################
#
IDLE_TIMEOUT=0
- InsertSection "Shells"
+ InsertSection "${SECTION_SHELLS}"
#
#################################################################################
#
diff --git a/include/tests_snmp b/include/tests_snmp
index d8ce450d..0bf785f0 100644
--- a/include/tests_snmp
+++ b/include/tests_snmp
@@ -28,7 +28,7 @@
#
#################################################################################
#
- InsertSection "SNMP Support"
+ InsertSection "${SECTION_SNMP_SUPPORT}"
# Test : SNMP-3302
# Description : Check for a running SNMP daemon
diff --git a/include/tests_squid b/include/tests_squid
index f94befa0..d62310a3 100644
--- a/include/tests_squid
+++ b/include/tests_squid
@@ -29,7 +29,7 @@
#
#################################################################################
#
- InsertSection "Squid Support"
+ InsertSection "${SECTION_SQUID_SUPPORT}"
#
#################################################################################
#
diff --git a/include/tests_ssh b/include/tests_ssh
index bd02440c..43c678b9 100644
--- a/include/tests_ssh
+++ b/include/tests_ssh
@@ -34,7 +34,7 @@
#
#################################################################################
#
- InsertSection "SSH Support"
+ InsertSection "${SECTION_SSH_SUPPORT}"
#
#################################################################################
#
diff --git a/include/tests_storage b/include/tests_storage
index 6de4f15d..89431aa0 100644
--- a/include/tests_storage
+++ b/include/tests_storage
@@ -18,7 +18,7 @@
#
#################################################################################
#
- InsertSection "Storage"
+ InsertSection "${SECTION_STORAGE}"
#
#################################################################################
#
diff --git a/include/tests_system_integrity b/include/tests_system_integrity
index 7a21925b..825f3d70 100644
--- a/include/tests_system_integrity
+++ b/include/tests_system_integrity
@@ -25,7 +25,7 @@
#
#################################################################################
#
- InsertSection "Software: system integrity"
+ InsertSection "${SECTION_SYSTEM_INTEGRITY}"
Display --indent 2 --text "- Checking file integrity tools"
#
#################################################################################
diff --git a/include/tests_time b/include/tests_time
index eda41a6f..0d1d65cb 100644
--- a/include/tests_time
+++ b/include/tests_time
@@ -22,7 +22,7 @@
#
#################################################################################
#
- InsertSection "Time and Synchronization"
+ InsertSection "${SECTION_TIME_AND_SYNCHRONIZATION}"
#
#################################################################################
#
@@ -86,7 +86,7 @@
# Reason: openntpd syncs only if large time corrections are not required or -s is passed.
# This might be not intended by the administrator (-s is NOT the default!)
FIND=$(${PSBINARY} ax | ${GREPBINARY} "ntpd: ntp engine" | ${GREPBINARY} -v "grep")
- # Status code 0 is when communication over the socket is successfull
+ # Status code 0 is when communication over the socket is successful
if ${NTPCTLBINARY} -s status > /dev/null 2> /dev/null; then
FOUND=1; NTP_DAEMON_RUNNING=1; NTP_CONFIG_TYPE_DAEMON=1; NTP_DAEMON="openntpd"
LogText "result: found openntpd (method: ntpctl)"
@@ -97,7 +97,7 @@
FOUND=1; NTP_DAEMON_RUNNING=1; NTP_CONFIG_TYPE_DAEMON=1; NTP_DAEMON="openntpd"
LogText "result: found openntpd (method: ps)"
else
- LogText "result: running openntpd not found, but ntpctl is instaalled"
+ LogText "result: running openntpd not found, but ntpctl is installed"
fi
if [ "${NTP_DAEMON}" = "openntpd" ]; then
@@ -106,7 +106,7 @@
fi
# Check running processes (ntpd from ntp.org)
- # As checking by process name is ambigiouse (openntpd has the same process name),
+ # As checking by process name is ambiguous (openntpd has the same process name),
# this check will be skipped if openntpd has been found.
FIND=$(${PSBINARY} ax | ${GREPBINARY} "ntpd" | ${GREPBINARY} -v "dntpd" | ${GREPBINARY} -v "ntpd: " | ${GREPBINARY} -v "grep")
if [ "${NTP_DAEMON}" != "openntpd" ] && [ -n "${FIND}" ]; then
@@ -575,7 +575,16 @@
Register --test-no TIME-3185 --preqs-met "${PREQS_MET}" --weight L --network NO --category "security" --description "Check systemd-timesyncd synchronized time"
SYNCHRONIZED_FILE="/run/systemd/timesync/synchronized"
+
if [ ${SKIPTEST} -eq 0 ]; then
+ # On earlier systemd versions (237), '/run/systemd/timesync/synchronized' does not exist, so use '/var/lib/systemd/timesync/clock'
+ if [ ! -e "${SYNCHRONIZED_FILE}" ]; then
+ SYNCHRONIZED_FILE="/var/lib/systemd/timesync/clock"
+ fi
+ # DynamicUser=yes moves the clock file to '/var/lib/private/systemd/timesync/clock'
+ if [ ! -e "${SYNCHRONIZED_FILE}" ]; then
+ SYNCHRONIZED_FILE="/var/lib/private/systemd/timesync/clock"
+ fi
if [ -e "${SYNCHRONIZED_FILE}" ]; then
FIND=$(( $(date +%s) - $(${STATBINARY} -L --format %Y "${SYNCHRONIZED_FILE}") ))
# Check if last sync was more than 2048 seconds (= the default of systemd) ago
diff --git a/include/tests_tooling b/include/tests_tooling
index 7fed8460..15475c61 100644
--- a/include/tests_tooling
+++ b/include/tests_tooling
@@ -37,7 +37,7 @@
#
#################################################################################
#
- InsertSection "Software: System tooling"
+ InsertSection "${SECTION_SYSTEM_TOOLING}"
#
#################################################################################
#
@@ -373,6 +373,33 @@
#
#################################################################################
#
+ # Test : TOOL-5130
+ # Description : Check for Suricata
+ Register --test-no TOOL-5130 --weight L --network NO --category security --description "Check for active Suricata daemon"
+ if [ ${SKIPTEST} -eq 0 ]; then
+ # Suricata presence
+ if [ -n "${SURICATABINARY}" ]; then
+ Report "ids_ips_tooling[]=suricata"
+ LogText "Result: Suricata is installed (${SURICATABINARY})"
+ # Suricata status
+ # Suricata sets its process name to Suricata-Main on Linux, but this might differ on other platforms,
+ # so fall back to checking the full commandline instead if the first test fails
+ if IsRunning "Suricata-Main" || IsRunning --full "${SURICATABINARY} "; then
+ # Only satisfy test TOOL-5190 if Suricata is actually running
+ IDS_IPS_TOOL_FOUND=1
+ LogText "Result: Suricata daemon is active"
+ Display --indent 2 --text "- Checking Suricata status" --result "${STATUS_RUNNING}" --color GREEN
+ else
+ LogText "Result: Suricata daemon not active"
+ Display --indent 2 --text "- Checking Suricata status" --result "${STATUS_NOT_RUNNING}" --color YELLOW
+ fi
+ else
+ LogText "Result: Suricata not installed (suricata not found)"
+ fi
+ fi
+#
+#################################################################################
+#
# Test : TOOL-5160
# Description : Check for OSSEC
Register --test-no TOOL-5126 --weight L --network NO --category security --description "Check for active OSSEC daemon"
diff --git a/include/tests_usb b/include/tests_usb
index 1c6cae6d..92c81a32 100644
--- a/include/tests_usb
+++ b/include/tests_usb
@@ -19,7 +19,7 @@
#
#################################################################################
#
- InsertSection "USB Devices"
+ InsertSection "${SECTION_USB_DEVICES}"
#
#################################################################################
#
diff --git a/include/tests_virtualization b/include/tests_virtualization
index 3902defc..e4df170e 100644
--- a/include/tests_virtualization
+++ b/include/tests_virtualization
@@ -22,7 +22,7 @@
#
#################################################################################
#
- InsertSection "Virtualization"
+ InsertSection "${SECTION_VIRTUALIZATION}"
#
#################################################################################
#
diff --git a/include/tests_webservers b/include/tests_webservers
index 188a6031..45588492 100644
--- a/include/tests_webservers
+++ b/include/tests_webservers
@@ -22,7 +22,7 @@
#
#################################################################################
#
- InsertSection "Software: webserver"
+ InsertSection "${SECTION_WEBSERVER}"
#
#################################################################################
#
diff --git a/lynis b/lynis
index 09f6f727..7ea78b0c 100755
--- a/lynis
+++ b/lynis
@@ -43,10 +43,10 @@
PROGRAM_WEBSITE="https://cisofy.com/lynis/"
# Version details
- PROGRAM_RELEASE_DATE="2020-06-26"
- PROGRAM_RELEASE_TIMESTAMP=1593159916
+ PROGRAM_RELEASE_DATE="2020-10-05"
+ PROGRAM_RELEASE_TIMESTAMP=1601896929
PROGRAM_RELEASE_TYPE="pre-release" # pre-release or release
- PROGRAM_VERSION="3.0.1"
+ PROGRAM_VERSION="3.0.2"
# Source, documentation and license
PROGRAM_SOURCE="https://github.com/CISOfy/lynis"
@@ -589,7 +589,7 @@ ${NORMAL}
if [ ${SET_STRICT} -eq 0 ]; then
set +u # Allow uninitialized variables
else
- set -u # Do not allow unitialized variables
+ set -u # Do not allow uninitialized variables
fi
# Import a different language when configured
@@ -862,7 +862,7 @@ ${NORMAL}
#################################################################################
#
if IsVerbose; then
- InsertSection "Program Details"
+ InsertSection "${SECTION_PROGRAM_DETAILS}"
Display --indent 2 --text "- ${GEN_VERBOSE_MODE}" --result "YES" --color GREEN
if IsDebug; then
Display --indent 2 --text "- ${GEN_DEBUG_MODE}" --result "YES" --color GREEN
@@ -1017,7 +1017,7 @@ ${NORMAL}
LogText "Exception: skipping test category ${INCLUDE_TEST}, file ${INCLUDE_FILE} has bad permissions (should be 640, 600 or 400)"
ReportWarning "NONE" "Invalid permissions on tests file tests_${INCLUDE_TEST}"
# Insert a section and warn user also on screen
- InsertSection "General"
+ InsertSection "${SECTION_GENERAL}"
Display --indent 2 --text "- Running test category ${INCLUDE_TEST}... " --result "SKIPPED" --color RED
fi
else