Merci pour cette info (plus qu'une info d'ailleurs ..tout un programme!)
Je vais essayer de décrypter les éléments les plus importants. Je te joins une copie de mon audit lynis non pas pour que tu fasses le boulot à ma place mais pour te donner une idée de la photographie.
Regarder de près les 22 recommandations et voir quelle action je peux prendre.
Encore merci!
[saddak@localhost ~]$ sudo lynis
[sudo] Mot de passe de saddak :
[ Lynis 2.6.5 ]
################################################################################
Lynis comes with ABSOLUTELY NO WARRANTY. This is free software, and you are
welcome to redistribute it under the terms of the GNU General Public License.
See the LICENSE file for details about using this software.
2007-2018, CISOfy - https://cisofy.com/lynis/
Enterprise support available (compliance, plugins, interface and tools)
################################################################################
[+] Initializing program
------------------------------------
Usage: lynis command [options]
Command:
audit
audit system : Perform local security scan
audit system remote <host> : Remote security scan
audit dockerfile <file> : Analyze Dockerfile
show
show : Show all commands
show version : Show Lynis version
show help : Show help
update
update info : Show update details
Options:
--no-log : Don't create a log file
--pentest : Non-privileged scan (useful for pentest)
--profile <profile> : Scan the system with the given profile file
--quick (-Q) : Quick mode, don't wait for user input
Layout options
--no-colors : Don't use colors in output
--quiet (-q) : No output
--reverse-colors : Optimize color display for light backgrounds
Misc options
--debug : Debug logging to screen
--view-manpage (--man) : View man page
--verbose : Show more details on screen
--version (-V) : Display version number and quit
Enterprise options
--plugindir <path> : Define path of available plugins
--upload : Upload data to central node
More options available. Run '/usr/bin/lynis show options', or use the man page.
No command provided. Exiting..
[saddak@localhost ~]$ sudo lynis audit system
[ Lynis 2.6.5 ]
################################################################################
Lynis comes with ABSOLUTELY NO WARRANTY. This is free software, and you are
welcome to redistribute it under the terms of the GNU General Public License.
See the LICENSE file for details about using this software.
2007-2018, CISOfy - https://cisofy.com/lynis/
Enterprise support available (compliance, plugins, interface and tools)
################################################################################
[+] Initializing program
------------------------------------
- Detecting OS... [ DONE ]
- Checking profiles... [ DONE ]
- Detecting language and localization [ fr ]
---------------------------------------------------
Program version: 2.6.5
Operating system: Linux
Operating system name: Fedora
Operating system version: Fedora release 28 (Twenty Eight)
Kernel version: 4.17.3
Hardware platform: x86_64
Hostname: localhost
---------------------------------------------------
Profiles: /etc/lynis/default.prf
Log file: /var/log/lynis.log
Report file: /var/log/lynis-report.dat
Report version: 1.0
Plugin directory: /usr/share/lynis/plugins
---------------------------------------------------
Auditor: [Not Specified]
Language: fr
Test category: all
Test group: all
---------------------------------------------------
- Program update status... [ UPDATE AVAILABLE ]
===============================================================================
Lynis Mise à jour disponible
===============================================================================
Current version : 265 Latest version : 266
Please update to the latest version.
New releases include additional features, bug fixes, tests, and baselines.
Download the latest version:
Packages (DEB/RPM) - https://packages.cisofy.com
Website (TAR) - https://cisofy.com/downloads/
GitHub (source) - https://github.com/CISOfy/lynis
===============================================================================
[+] System Tools
------------------------------------
- Scanning available tools...
- Checking system binaries...
[+] Plugins (phase 1)
------------------------------------
Note: les plugins ont des tests plus poussés et peuvent prendre plusieurs minutes
- Plugins activés [ NONE ]
[+] Boot and services
------------------------------------
- Service Manager [ systemd ]
- Checking UEFI boot [ DÉSACTIVÉ ]
- Checking presence GRUB2 [ TROUVÉ ]
- Checking for password protection [ OK ]
- Check running services (systemctl) [ FAIT ]
Result: found 32 running services
- Check enabled services at boot (systemctl) [ FAIT ]
Result: found 55 enabled services
- Check startup files (permissions) [ OK ]
- Checking sulogin in rescue.service [ NON TROUVÉ ]
[+] Kernel
------------------------------------
- Checking default runlevel [ runlevel 5 ]
- Checking CPU support (NX/PAE)
CPU support: PAE and/or NoeXecute supported [ TROUVÉ ]
- Checking kernel version and release [ FAIT ]
- Checking kernel type [ FAIT ]
- Checking loaded kernel modules [ FAIT ]
Found 103 active modules
- Checking Linux kernel configuration file [ TROUVÉ ]
- Checking default I/O kernel scheduler [ TROUVÉ ]
- Checking core dumps configuration [ DÉSACTIVÉ ]
- Checking setuid core dumps configuration [ DEFAULT ]
- Check if reboot is needed [ NON ]
[+] Mémoire et Processus
------------------------------------
- Checking /proc/meminfo [ TROUVÉ ]
- Searching for dead/zombie processes [ OK ]
- Searching for IO waiting processes [ ATTENTION ]
[+] Users, Groups and Authentication
------------------------------------
- Administrator accounts [ OK ]
- Unique UIDs [ OK ]
- Consistency of group files (grpck) [ OK ]
- Unique group IDs [ OK ]
- Unique group names [ OK ]
- Password file consistency [ OK ]
- Query system users (non daemons) [ FAIT ]
- NIS+ authentication support [ NOT ENABLED ]
- NIS authentication support [ NOT ENABLED ]
- sudoers file [ TROUVÉ ]
- Check sudoers file permissions [ OK ]
- PAM password strength tools [ OK ]
- PAM configuration file (pam.conf) [ NON TROUVÉ ]
- PAM configuration files (pam.d) [ TROUVÉ ]
- PAM modules [ TROUVÉ ]
- Checking user password aging (minimum) [ DÉSACTIVÉ ]
- User password aging (maximum) [ DÉSACTIVÉ ]
- Checking expired passwords [ OK ]
- Checking Linux single user mode authentication [ OK ]
- Determining default umask
- umask (/etc/profile and /etc/profile.d) [ SUGGESTION ]
- umask (/etc/login.defs) [ OK ]
- umask (/etc/init.d/functions) [ SUGGESTION ]
- LDAP authentication support [ NOT ENABLED ]
- Logging failed login attempts [ DÉSACTIVÉ ]
[+] Shells
------------------------------------
- Checking shells from /etc/shells
Result: found 8 shells (valid shells: 8).
- Session timeout settings/tools [ AUCUN ]
- Checking default umask values
- Checking default umask in /etc/bashrc [ WEAK ]
- Checking default umask in /etc/csh.cshrc [ WEAK ]
- Checking default umask in /etc/profile [ WEAK ]
[+] File systems
------------------------------------
- Checking mount points
- Checking /home mount point [ OK ]
- Checking /tmp mount point [ OK ]
- Checking /var mount point [ SUGGESTION ]
- Checking LVM volume groups [ TROUVÉ ]
- Checking LVM volumes [ TROUVÉ ]
- Query swap partitions (fstab) [ OK ]
- Testing swap partitions [ OK ]
- Testing /proc mount (hidepid) [ SUGGESTION ]
- Checking for old files in /tmp [ OK ]
- Checking /tmp sticky bit [ OK ]
- Checking /var/tmp sticky bit [ OK ]
- ACL support root file system [ ACTIVÉ ]
- Mount options of / [ OK ]
- Mount options of /boot [ NON DEFAULT ]
- Mount options of /home [ NON DEFAULT ]
- Checking Locate database [ TROUVÉ ]
- Disable kernel support of some filesystems
- Discovered kernel modules: cramfs hfs hfsplus jffs2 squashfs udf
[+] USB Devices
------------------------------------
- Checking usb-storage driver (modprobe config) [ NOT DISABLED ]
- Checking USB devices authorization [ ACTIVÉ ]
- Checking USBGuard [ NON TROUVÉ ]
[+] Storage
------------------------------------
- Checking firewire ohci driver (modprobe config) [ NOT DISABLED ]
[+] NFS
------------------------------------
- Query rpc registered programs [ FAIT ]
- Query NFS versions [ FAIT ]
- Query NFS protocols [ FAIT ]
- Check running NFS daemon [ NON TROUVÉ ]
[+] Name services
------------------------------------
- Checking search domains [ TROUVÉ ]
- Searching DNS domain name [ TROUVÉ ]
Domain name: localdomain
- Checking /etc/hosts
- Checking /etc/hosts (duplicates) [ OK ]
- Checking /etc/hosts (hostname) [ OK ]
- Checking /etc/hosts (localhost) [ SUGGESTION ]
- Checking /etc/hosts (localhost to IP) [ OK ]
[+] Ports and packages
------------------------------------
- Searching package managers
- Searching DNF package manager [ TROUVÉ ]
- Querying DNF package manager
- Using DNF to find vulnerable packages [ AUCUN ]
- Checking package audit tool [ INSTALLED ]
Found: dnf
[+] Networking
------------------------------------
- Checking IPv6 configuration [ ACTIVÉ ]
Configuration method [ AUTO ]
IPv6 only [ NO ]
- Checking configured nameservers
- Testing nameservers
Nameserver: 192.168.1.1 [ OK ]
- Minimal of 2 responsive nameservers [ ATTENTION ]
- Checking default gateway [ FAIT ]
- Getting listening ports (TCP/UDP) [ FAIT ]
* Found 9 ports
- Checking promiscuous interfaces [ OK ]
- Checking waiting connections [ OK ]
- Checking status DHCP client [ EN COURS: ]
- Checking for ARP monitoring software [ NON TROUVÉ ]
[+] Printers and Spools
------------------------------------
- Checking cups daemon [ EN COURS: ]
- Checking CUPS configuration file [ OK ]
- File permissions [ OK ]
- Checking CUPS addresses/sockets [ TROUVÉ ]
- Checking lp daemon [ NON LANCÉ ]
[+] Software: e-mail and messaging
------------------------------------
[+] Software: firewalls
------------------------------------
- Checking iptables support [ TROUVÉ ]
- Checking iptables policies of chains [ TROUVÉ ]
- Checking for empty ruleset [ OK ]
- Checking for unused rules [ TROUVÉ ]
- Checking host based firewall [ ACTIVE ]
[+] Software: webserver
------------------------------------
- Checking Apache [ NON TROUVÉ ]
- Checking nginx [ NON TROUVÉ ]
[+] SSH Support
------------------------------------
- Checking running SSH daemon [ NON TROUVÉ ]
[+] SNMP Support
------------------------------------
- Checking running SNMP daemon [ NON TROUVÉ ]
[+] Databases
------------------------------------
No database engines found
[+] LDAP Services
------------------------------------
- Checking OpenLDAP instance [ NON TROUVÉ ]
[+] PHP
------------------------------------
- Checking PHP [ NON TROUVÉ ]
[+] Squid Support
------------------------------------
- Checking running Squid daemon [ NON TROUVÉ ]
[+] Logging and files
------------------------------------
- Checking for a running log daemon [ OK ]
- Checking Syslog-NG status [ NON TROUVÉ ]
- Checking systemd journal status [ TROUVÉ ]
- Checking Metalog status [ NON TROUVÉ ]
- Checking RSyslog status [ TROUVÉ ]
- Checking RFC 3195 daemon status [ NON TROUVÉ ]
- Checking minilogd instances [ NON TROUVÉ ]
- Checking logrotate presence [ OK ]
- Checking log directories (static list) [ FAIT ]
- Checking open log files [ FAIT ]
- Checking deleted files in use [ FILES FOUND ]
[+] Insecure services
------------------------------------
- Checking inetd status [ NOT ACTIVE ]
[+] Banners and identification
------------------------------------
- /etc/issue [ SYMLINK ]
- /etc/issue contents [ WEAK ]
- /etc/issue.net [ SYMLINK ]
- /etc/issue.net contents [ WEAK ]
[+] Scheduled tasks
------------------------------------
- Checking crontab/cronjob [ FAIT ]
- Checking atd status [ EN COURS: ]
- Checking at users [ FAIT ]
- Checking at jobs [ AUCUN ]
[+] Accounting
------------------------------------
- Checking accounting information [ OK ]
- Checking sysstat accounting data [ NON TROUVÉ ]
- Checking auditd [ ACTIVÉ ]
- Checking audit rules [ OK ]
- Checking audit configuration file [ OK ]
- Checking auditd log file [ TROUVÉ ]
[+] Time and Synchronization
------------------------------------
- NTP daemon found: chronyd [ TROUVÉ ]
- NTP daemon found: systemd (timesyncd) [ TROUVÉ ]
- Checking for a running NTP daemon or client [ OK ]
[+] Cryptography
------------------------------------
- Checking for expired SSL certificates [0/4] [ AUCUN ]
[+] Virtualization
------------------------------------
[+] Containers
------------------------------------
[+] Security frameworks
------------------------------------
- Checking presence AppArmor [ NON TROUVÉ ]
- Checking presence SELinux [ TROUVÉ ]
- Checking SELinux status [ ACTIVÉ ]
- Checking current mode and config file [ OK ]
Current SELinux mode: enforcing
- Checking presence grsecurity [ NON TROUVÉ ]
- Checking for implemented MAC framework [ OK ]
[+] Software: file integrity
------------------------------------
- Checking file integrity tools
- Checking presence integrity tool [ NON TROUVÉ ]
[+] Software: System tooling
------------------------------------
- Checking automation tooling
- Automation tooling [ NON TROUVÉ ]
- Checking for IDS/IPS tooling [ AUCUN ]
[+] Software: Malware
------------------------------------
[+] File Permissions
------------------------------------
- Starting file permissions check
[+] Home directories
------------------------------------
- Checking shell history files [ OK ]
[+] Kernel Hardening
------------------------------------
- Comparing sysctl key pairs with scan profile
- fs.protected_hardlinks (exp: 1) [ OK ]
- fs.protected_symlinks (exp: 1) [ OK ]
- fs.suid_dumpable (exp: 0) [ OK ]
- kernel.core_uses_pid (exp: 1) [ OK ]
- kernel.ctrl-alt-del (exp: 0) [ OK ]
- kernel.dmesg_restrict (exp: 1) [ DIFFERENT ]
- kernel.kptr_restrict (exp: 2) [ DIFFERENT ]
- kernel.randomize_va_space (exp: 2) [ OK ]
- kernel.sysrq (exp: 0) [ DIFFERENT ]
- kernel.yama.ptrace_scope (exp: 1 2 3) [ DIFFERENT ]
- net.ipv4.conf.all.accept_redirects (exp: 0) [ OK ]
- net.ipv4.conf.all.accept_source_route (exp: 0) [ OK ]
- net.ipv4.conf.all.bootp_relay (exp: 0) [ OK ]
- net.ipv4.conf.all.forwarding (exp: 0) [ OK ]
- net.ipv4.conf.all.log_martians (exp: 1) [ DIFFERENT ]
- net.ipv4.conf.all.mc_forwarding (exp: 0) [ OK ]
- net.ipv4.conf.all.proxy_arp (exp: 0) [ OK ]
- net.ipv4.conf.all.rp_filter (exp: 1) [ OK ]
- net.ipv4.conf.all.send_redirects (exp: 0) [ OK ]
- net.ipv4.conf.default.accept_redirects (exp: 0) [ OK ]
- net.ipv4.conf.default.accept_source_route (exp: 0) [ DIFFERENT ]
- net.ipv4.conf.default.log_martians (exp: 1) [ DIFFERENT ]
- net.ipv4.icmp_echo_ignore_broadcasts (exp: 1) [ OK ]
- net.ipv4.icmp_ignore_bogus_error_responses (exp: 1) [ OK ]
- net.ipv4.tcp_syncookies (exp: 1) [ OK ]
- net.ipv4.tcp_timestamps (exp: 0 1) [ OK ]
- net.ipv6.conf.all.accept_redirects (exp: 0) [ OK ]
- net.ipv6.conf.all.accept_source_route (exp: 0) [ OK ]
- net.ipv6.conf.default.accept_redirects (exp: 0) [ OK ]
- net.ipv6.conf.default.accept_source_route (exp: 0) [ OK ]
[+] Hardening
------------------------------------
- Installed compiler(s) [ TROUVÉ ]
- Installed malware scanner [ NON TROUVÉ ]
[+] Tests Personnalisés
------------------------------------
- Running custom tests... [ NONE ]
[+] Plugins (phase 2)
------------------------------------
================================================================================
-[ Lynis 2.6.5 Results ]-
Warnings (1):
----------------------------
! Couldn't find 2 responsive nameservers [NETW-2705]
https://cisofy.com/controls/NETW-2705/
Suggestions (22):
----------------------------
* Version of Lynis outdated, consider upgrading to the latest version [LYNIS]
https://cisofy.com/controls/LYNIS/
* Protect rescue.service by using sulogin [BOOT-5260]
https://cisofy.com/controls/BOOT-5260/
* Check process listing for processes waiting for IO requests [PROC-3614]
https://cisofy.com/controls/PROC-3614/
* Configure minimum password age in /etc/login.defs [AUTH-9286]
https://cisofy.com/controls/AUTH-9286/
* Configure maximum password age in /etc/login.defs [AUTH-9286]
https://cisofy.com/controls/AUTH-9286/
* Default umask in /etc/profile or /etc/profile.d/custom.sh could be more strict (e.g. 027) [AUTH-9328]
https://cisofy.com/controls/AUTH-9328/
* To decrease the impact of a full /var file system, place /var on a separated partition [FILE-6310]
https://cisofy.com/controls/FILE-6310/
* Disable drivers like USB storage when not used, to prevent unauthorized storage or data theft [STRG-1840]
https://cisofy.com/controls/STRG-1840/
* Disable drivers like firewire storage when not used, to prevent unauthorized storage or data theft [STRG-1846]
https://cisofy.com/controls/STRG-1846/
* Split resolving between localhost and the hostname of the system [NAME-4406]
https://cisofy.com/controls/NAME-4406/
* Check your resolv.conf file and fill in a backup nameserver if possible [NETW-2705]
https://cisofy.com/controls/NETW-2705/
* Consider running ARP monitoring software (arpwatch,arpon) [NETW-3032]
https://cisofy.com/controls/NETW-3032/
* Check iptables rules to see which rules are currently not used [FIRE-4513]
https://cisofy.com/controls/FIRE-4513/
* Check what deleted files are still in use and why. [LOGG-2190]
https://cisofy.com/controls/LOGG-2190/
* Add a legal banner to /etc/issue, to warn unauthorized users [BANN-7126]
https://cisofy.com/controls/BANN-7126/
* Add legal banner to /etc/issue.net, to warn unauthorized users [BANN-7130]
https://cisofy.com/controls/BANN-7130/
* Enable sysstat to collect accounting (no results) [ACCT-9626]
https://cisofy.com/controls/ACCT-9626/
* Install a file integrity tool to monitor changes to critical and sensitive files [FINT-4350]
https://cisofy.com/controls/FINT-4350/
* Determine if automation tools are present for system management [TOOL-5002]
https://cisofy.com/controls/TOOL-5002/
* One or more sysctl values differ from the scan profile and could be tweaked [KRNL-6000]
- Solution : Change sysctl value or disable test (skip-test=KRNL-6000:<sysctl-key>)
https://cisofy.com/controls/KRNL-6000/
* Harden compilers like restricting access to root user only [HRDN-7222]
https://cisofy.com/controls/HRDN-7222/
* Harden the system by installing at least one malware scanner, to perform periodic file system scans [HRDN-7230]
- Solution : Install a tool like rkhunter, chkrootkit, OSSEC
https://cisofy.com/controls/HRDN-7230/
Follow-up:
----------------------------
- Show details of a test (lynis show details TEST-ID)
- Check the logfile for all details (less /var/log/lynis.log)
- Read security controls texts (https://cisofy.com)
- Use --upload to upload data to central system (Lynis Enterprise users)
================================================================================
Lynis security scan details:
Hardening index : 70 [############## ]
Tests performed : 210
Plugins enabled : 0
Components:
- Firewall [V]
- Malware scanner [X]
Lynis Modules:
- Compliance Status [?]
- Security Audit [V]
- Vulnerability Scan [V]
Files:
- Test and debug information : /var/log/lynis.log
- Report data : /var/log/lynis-report.dat
================================================================================
Notice: Lynis mise à jour disponible
Version actuelle : 265 Latest version : 266
================================================================================
Lynis 2.6.5
Auditing, system hardening, and compliance for UNIX-based systems
(Linux, macOS, BSD, and others)
2007-2018, CISOfy - https://cisofy.com/lynis/
Enterprise support available (compliance, plugins, interface and tools)
================================================================================
[TIP]: Enhance Lynis audits by adding your settings to custom.prf (see /etc/lynis/default.prf for all settings)
[saddak@localhost ~]$ sudo dnf update lynis
[sudo] Mot de passe de saddak :
Dernière vérification de l’expiration des métadonnées effectuée il y a 0:17:32 le sam. 07 juil. 2018 18:33:52 WEST.
Dépendances résolues.
Rien à faire.
Terminé !
[saddak@localhost ~]$