[System Installation] Security Revision V25
Tofloor
poster avatar
a***o@it-talent.mx
deepin
2025-05-23 04:37
Author

Hi,

I just want to share a security report I executed on my deepin 23.1 install. I used Lynis app to get the following results:

[ Lynis 3.1.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-2024, CISOfy - https://cisofy.com/lynis/
Enterprise support available (compliance, plugins, interface and tools)
################################################################################

[+] Initializing program

###################################################################

NON-PRIVILEGED SCAN MODE

###################################################################

NOTES:

  • Some tests will be skipped (as they require root permissions)
  • Some tests might fail silently or give different results

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

Exception found!

Function/test: [OS Detection]
Message: Unknown OS found in /etc/os-release - Please create an issue on GitHub and share the contents (cat /etc/os-release): https://github.com/CISOfy/lynis

Help improving the Lynis community with your feedback!

Steps:

  • Ensure you are running the latest version (./lynis update check)
  • If so, create a GitHub issue at https://github.com/CISOfy/lynis
  • Include relevant parts of the log file or configuration file

Thanks!

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

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

Program version: 3.1.5
Operating system: Linux
Operating system name: Debian
Operating system version: bookworm/sid
Kernel version: 6.12.20
Hardware platform: x86_64
Hostname: fountain

Profiles: /home/heifengxi/Documents/Git-Repo/lynis/default.prf
Log file: /home/heifengxi/lynis.log
Report file: /home/heifengxi/lynis-report.dat
Report version: 1.0
Plugin directory: ./plugins

Auditor: [Not Specified]
Language: en
Test category: all
Test group: all

  • Program update status... [ NO UPDATE ]

[+] System tools

  • Scanning available tools...
  • Checking system binaries...
    /usr/bin/mysql: Deprecated program name. It will be removed in a future release, use '/usr/bin/mariadb' instead

[+] Plugins (phase 1)

Note: plugins have more extensive tests and may take several minutes to complete

  • Plugin: pam
    [..]
  • Plugin: systemd
    [.......Hint: You are currently not seeing messages from other users and the system.
    Users in groups 'adm', 'systemd-journal' can see all messages.
    Pass -q to turn off this notice.
    Hint: You are currently not seeing messages from other users and the system.
    Users in groups 'adm', 'systemd-journal' can see all messages.
    Pass -q to turn off this notice.
    ..Hint: You are currently not seeing messages from other users and the system.
    Users in groups 'adm', 'systemd-journal' can see all messages.
    Pass -q to turn off this notice.
    .Hint: You are currently not seeing messages from other users and the system.
    Users in groups 'adm', 'systemd-journal' can see all messages.
    Pass -q to turn off this notice.
    ......]

[+] Boot and services

  • Service Manager [ systemd ]

    • Boot loader [ NONE FOUND ]
  • Check running services (systemctl) [ DONE ]
    Result: found 35 running services

  • Check enabled services at boot (systemctl) [ DONE ]
    Result: found 45 enabled services

  • Check startup files (permissions) [ OK ]

  • Running 'systemd-analyze security'
    Unit name (exposure value) and predicate

    • ModemManager.service (value=6.3) [ MEDIUM ]
    • NetworkManager.service (value=8.0) [ EXPOSED ]
    • accounts-daemon.service (value=5.5) [ MEDIUM ]
    • acpid.service (value=9.6) [ UNSAFE ]
    • alsa-state.service (value=9.6) [ UNSAFE ]
    • apache2.service (value=9.2) [ UNSAFE ]
    • avahi-daemon.service (value=9.6) [ UNSAFE ]
    • bluetooth.service (value=6.0) [ MEDIUM ]
    • cron.service (value=9.6) [ UNSAFE ]
    • cups.service (value=9.6) [ UNSAFE ]
    • dbus.service (value=9.6) [ UNSAFE ]
    • dde-api-dbus-proxy-v1.service (value=4.9) [ PROTECTED ]
    • dde-dconfig-daemon.service (value=4.9) [ PROTECTED ]
    • deepin-accounts1-daemon.service (value=9.6) [ UNSAFE ]
    • deepin-authenticate.service (value=6.2) [ MEDIUM ]
    • deepin-service-group@app.service (value=9.6) [ UNSAFE ]
    • deepin-service-manager.service (value=9.6) [ UNSAFE ]
    • deepin-service-plugin@org.deepin.Filemanager.UserShareManager.service (value=9.6) [ UNSAFE ]
    • deepin-shutdown-sound.service (value=7.7) [ EXPOSED ]
    • dm-event.service (value=9.5) [ UNSAFE ]
    • emergency.service (value=9.5) [ UNSAFE ]
    • fprintd.service (value=5.2) [ MEDIUM ]
    • getty@tty1.service (value=9.6) [ UNSAFE ]
    • iio-sensor-proxy.service (value=7.6) [ EXPOSED ]
    • ipwatchd.service (value=9.6) [ UNSAFE ]
    • lastoreAutoCheck.service (value=9.6) [ UNSAFE ]
    • lightdm.service (value=9.6) [ UNSAFE ]
    • lvm2-lvmpolld.service (value=9.5) [ UNSAFE ]
    • mariadb.service (value=8.8) [ EXPOSED ]
    • nmbd.service (value=9.6) [ UNSAFE ]
    • open-vm-tools.service (value=9.5) [ UNSAFE ]
    • org.deepin.linglong.PackageManager.service (value=9.2) [ UNSAFE ]
    • plymouth-start.service (value=9.5) [ UNSAFE ]
    • polkit.service (value=1.2) [ PROTECTED ]
    • rc-local.service (value=9.6) [ UNSAFE ]
    • rescue.service (value=9.5) [ UNSAFE ]
    • samba-ad-dc.service (value=9.6) [ UNSAFE ]
    • smartmontools.service (value=9.6) [ UNSAFE ]
    • smbd.service (value=9.6) [ UNSAFE ]
    • systemd-ask-password-console.service (value=9.4) [ UNSAFE ]
    • systemd-ask-password-plymouth.service (value=9.5) [ UNSAFE ]
    • systemd-ask-password-wall.service (value=9.4) [ UNSAFE ]
    • systemd-bsod.service (value=9.5) [ UNSAFE ]
    • systemd-fsckd.service (value=9.5) [ UNSAFE ]
    • systemd-initctl.service (value=9.4) [ UNSAFE ]
    • systemd-journald.service (value=4.3) [ PROTECTED ]
    • systemd-logind.service (value=2.8) [ PROTECTED ]
    • systemd-networkd.service (value=2.6) [ PROTECTED ]
    • systemd-rfkill.service (value=9.4) [ UNSAFE ]
    • systemd-timesyncd.service (value=2.1) [ PROTECTED ]
    • systemd-udevd.service (value=7.1) [ MEDIUM ]
    • udisks2.service (value=9.6) [ UNSAFE ]
    • uos-ste-resourced.service (value=8.5) [ EXPOSED ]
    • upower.service (value=2.4) [ PROTECTED ]
    • user@1000.service (value=9.4) [ UNSAFE ]
    • vboxautostart-service.service (value=9.6) [ UNSAFE ]
    • vboxballoonctrl-service.service (value=9.6) [ UNSAFE ]
    • vboxdrv.service (value=9.6) [ UNSAFE ]
    • vboxweb-service.service (value=9.6) [ UNSAFE ]
    • vgauth.service (value=9.5) [ UNSAFE ]
    • watchOsVersion.service (value=9.6) [ UNSAFE ]
    • watchUpdateInfo.service (value=9.6) [ UNSAFE ]
    • winbind.service (value=9.6) [ UNSAFE ]
    • wpa_supplicant.service (value=9.6) [ UNSAFE ]

[+] Kernel

  • Checking default runlevel [ runlevel 5 ]
  • Checking CPU support (NX/PAE)
    CPU support: PAE and/or NoeXecute supported [ FOUND ]
  • Checking kernel version and release [ DONE ]
  • Checking kernel type [ DONE ]
  • Checking loaded kernel modules [ DONE ]
    Found 225 active modules
  • Checking Linux kernel configuration file [ FOUND ]
  • Checking default I/O kernel scheduler [ NOT FOUND ]
    /usr/bin/grep: /etc/kernel-img.conf: No such file or directory
  • Checking core dumps configuration
    • configuration in systemd conf files [ DEFAULT ]
    • configuration in /etc/profile [ DEFAULT ]
    • 'hard' configuration in /etc/security/limits.conf [ DEFAULT ]
    • 'soft' configuration in /etc/security/limits.conf [ DEFAULT ]
    • Checking setuid core dumps configuration [ DISABLED ]
  • Check if reboot is needed [ UNKNOWN ]

[+] Memory and Processes

  • Checking /proc/meminfo [ FOUND ]
  • Searching for dead/zombie processes [ FOUND ]
  • Searching for IO waiting processes [ NOT FOUND ]
  • Search prelink tooling [ NOT FOUND ]

[+] Users, Groups and Authentication

  • Administrator accounts [ OK ]
  • Unique UIDs [ OK ]
  • Unique group IDs [ OK ]
  • Unique group names [ OK ]
  • Password file consistency [ SUGGESTION ]
  • Checking password hashing rounds [ DISABLED ]
  • Query system users (non daemons) [ DONE ]
  • NIS+ authentication support [ NOT ENABLED ]
  • NIS authentication support [ NOT ENABLED ]
  • Sudoers file(s) [ FOUND ]
  • PAM password strength tools [ SUGGESTION ]
  • PAM configuration files (pam.conf) [ FOUND ]
  • PAM configuration files (pam.d) [ FOUND ]
  • PAM modules [ FOUND ]
  • LDAP module in PAM [ NOT FOUND ]
  • Accounts without expire date [ OK ]
  • Accounts without password [ OK ]
  • Locked accounts [ OK ]
  • Checking user password aging (minimum) [ DISABLED ]
  • User password aging (maximum) [ DISABLED ]
  • Checking Linux single user mode authentication [ OK ]
  • Determining default umask
    • umask (/etc/profile) [ NOT FOUND ]
    • umask (/etc/login.defs) [ SUGGESTION ]
    • umask (/etc/init.d/rc) [ SUGGESTION ]
  • LDAP authentication support [ NOT ENABLED ]
  • Logging failed login attempts [ DISABLED ]

[+] Kerberos

  • Check for Kerberos KDC and principals [ NOT FOUND ]

[+] Shells

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

[+] File systems

  • Checking mount points
    • Checking /home mount point [ OK ]
    • Checking /tmp mount point [ SUGGESTION ]
    • Checking /var mount point [ SUGGESTION ]
  • 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 ]
  • Mount options of / [ NON DEFAULT ]
  • Mount options of /boot [ NON DEFAULT ]
  • Mount options of /dev [ PARTIALLY HARDENED ]
  • Mount options of /dev/shm [ PARTIALLY HARDENED ]
  • Mount options of /home [ NON DEFAULT ]
  • Mount options of /run [ HARDENED ]
  • Total without nodev:8 noexec:14 nosuid:6 ro or noexec (W^X): 14 of total 30
  • Disable kernel support of some filesystems

[+] USB Devices

  • Checking usb-storage driver (modprobe config) [ NOT DISABLED ]
  • Checking USB devices authorization [ ENABLED ]
  • Checking USBGuard [ NOT FOUND ]

[+] Storage

  • Checking firewire ohci driver (modprobe config) [ NOT DISABLED ]

[+] NFS

  • Check running NFS daemon [ NOT FOUND ]

[+] Name services

  • Checking search domains [ FOUND ]
  • Searching DNS domain name [ FOUND ]
    Domain name: abode
  • Checking /etc/hosts
    • Duplicate entries in hosts file [ NONE ]
    • Presence of configured hostname in /etc/hosts [ FOUND ]
    • Hostname mapped to localhost [ NOT FOUND ]
    • Localhost mapping to IP address [ OK ]

[+] Ports and packages

  • Searching package managers
    • Searching dpkg package manager [ FOUND ]
      • Querying package manager

[WARNING]: Test PKGS-7345 had a long execution: 11.355881 seconds

- Query unpurged packages                                 [ FOUND ]
  • Checking security repository in sources.list file or directory [ WARNING ]
  • Checking upgradeable packages [ SKIPPED ]
  • Checking package audit tool [ NONE ]
  • Toolkit for automatic upgrades [ NOT FOUND ]

[+] Networking

  • Checking IPv6 configuration [ ENABLED ]
    Configuration method [ AUTO ]
    IPv6 only [ NO ]
  • Checking configured nameservers
    • Testing nameservers
      Nameserver: 162.252.172.57 [ OK ]
      Nameserver: 149.154.159.92 [ OK ]
      Nameserver: 192.168.0.1 [ OK ]
    • Minimal of 2 responsive nameservers [ OK ]
  • Checking default gateway [ DONE ]
  • Getting listening ports (TCP/UDP) [ DONE ]
  • Checking promiscuous interfaces [ OK ]
  • Checking waiting connections [ OK ]
  • Checking status DHCP client [ NOT ACTIVE ]
  • Checking for ARP monitoring software [ NOT FOUND ]
  • Uncommon network protocols [ 0 ]

[+] Printers and Spools

  • Checking cups daemon [ RUNNING ]
  • Checking CUPS configuration file [ OK ]
    • File permissions [ WARNING ]
  • Checking CUPS addresses/sockets [ FOUND ]
  • Checking lp daemon [ NOT RUNNING ]

[+] Software: e-mail and messaging

[+] Software: firewalls

  • Checking iptables kernel module [ FOUND ]
  • Checking host based firewall [ ACTIVE ]

[+] Software: webserver

  • Checking Apache (binary /usr/sbin/apache2) [ FOUND ]
    Info: Configuration file found (/etc/apache2/apache2.conf)
    Info: No virtual hosts found
    • Loadable modules [ FOUND (118) ]
      • Found 118 loadable modules
        mod_evasive: anti-DoS/brute force [ NOT FOUND ]
        mod_reqtimeout/mod_qos [ FOUND ]
        ModSecurity: web application firewall [ NOT FOUND ]
  • Checking TraceEnable setting in:
    /etc/apache2/mods-enabled/mime.conf [ NOT FOUND ]
    /etc/apache2/mods-enabled/reqtimeout.conf [ NOT FOUND ]
    /etc/apache2/mods-enabled/alias.conf [ NOT FOUND ]
    /etc/apache2/mods-enabled/setenvif.conf [ NOT FOUND ]
    /etc/apache2/mods-enabled/deflate.conf [ NOT FOUND ]
    /etc/apache2/mods-enabled/mpm_prefork.conf [ NOT FOUND ]
    /etc/apache2/mods-enabled/negotiation.conf [ NOT FOUND ]
    /etc/apache2/mods-enabled/dir.conf [ NOT FOUND ]
    /etc/apache2/mods-enabled/autoindex.conf [ NOT FOUND ]
    /etc/apache2/mods-enabled/status.conf [ NOT FOUND ]
    /etc/apache2/mods-enabled/php8.4.conf [ NOT FOUND ]
    /etc/apache2/sites-available/default-ssl.conf [ NOT FOUND ]
    /etc/apache2/sites-available/000-default.conf [ NOT FOUND ]
    /etc/apache2/ports.conf [ NOT FOUND ]
    /etc/apache2/mods-available/proxy.conf [ NOT FOUND ]
    /etc/apache2/mods-available/mime_magic.conf [ NOT FOUND ]
    /etc/apache2/mods-available/dav_fs.conf [ NOT FOUND ]
    /etc/apache2/mods-available/mime.conf [ NOT FOUND ]
    /etc/apache2/mods-available/cgid.conf [ NOT FOUND ]
    /etc/apache2/mods-available/reqtimeout.conf [ NOT FOUND ]
    /etc/apache2/mods-available/userdir.conf [ NOT FOUND ]
    /etc/apache2/mods-available/alias.conf [ NOT FOUND ]
    /etc/apache2/mods-available/php8.3.conf [ NOT FOUND ]
    /etc/apache2/mods-available/proxy_html.conf [ NOT FOUND ]
    /etc/apache2/mods-available/setenvif.conf [ NOT FOUND ]
    /etc/apache2/mods-available/info.conf [ NOT FOUND ]
    /etc/apache2/mods-available/http2.conf [ NOT FOUND ]
    /etc/apache2/mods-available/ldap.conf [ NOT FOUND ]
    /etc/apache2/mods-available/deflate.conf [ NOT FOUND ]
    /etc/apache2/mods-available/mpm_prefork.conf [ NOT FOUND ]
    /etc/apache2/mods-available/cache_disk.conf [ NOT FOUND ]
    /etc/apache2/mods-available/mpm_worker.conf [ NOT FOUND ]
    /etc/apache2/mods-available/proxy_balancer.conf [ NOT FOUND ]
    /etc/apache2/mods-available/ssl.conf [ NOT FOUND ]
    /etc/apache2/mods-available/proxy_ftp.conf [ NOT FOUND ]
    /etc/apache2/mods-available/negotiation.conf [ NOT FOUND ]
    /etc/apache2/mods-available/dir.conf [ NOT FOUND ]
    /etc/apache2/mods-available/autoindex.conf [ NOT FOUND ]
    /etc/apache2/mods-available/mpm_event.conf [ NOT FOUND ]
    /etc/apache2/mods-available/status.conf [ NOT FOUND ]
    /etc/apache2/mods-available/actions.conf [ NOT FOUND ]
    /etc/apache2/mods-available/php8.4.conf [ NOT FOUND ]
    /etc/apache2/conf-enabled/localized-error-pages.conf [ NOT FOUND ]
    /etc/apache2/conf-enabled/other-vhosts-access-log.conf [ NOT FOUND ]
    /etc/apache2/conf-enabled/serve-cgi-bin.conf [ NOT FOUND ]
    /etc/apache2/conf-enabled/charset.conf [ NOT FOUND ]
    /etc/apache2/conf-enabled/security.conf [ FOUND ]
    /etc/apache2/sites-enabled/000-default.conf [ NOT FOUND ]
    /etc/apache2/apache2.conf [ NOT FOUND ]
    /etc/apache2/conf-available/localized-error-pages.conf [ NOT FOUND ]
    /etc/apache2/conf-available/other-vhosts-access-log.conf [ NOT FOUND ]
    /etc/apache2/conf-available/serve-cgi-bin.conf [ NOT FOUND ]
    /etc/apache2/conf-available/charset.conf [ NOT FOUND ]
    /etc/apache2/conf-available/security.conf [ FOUND ]
  • Checking nginx [ NOT FOUND ]

[+] SSH Support

  • Checking running SSH daemon [ NOT FOUND ]

[+] SNMP Support

  • Checking running SNMP daemon [ NOT FOUND ]

[+] Databases

  • MySQL process status [ FOUND ]

[+] LDAP Services

  • Checking OpenLDAP instance [ NOT FOUND ]

[+] PHP

  • Checking PHP [ FOUND ]
    • Checking PHP disabled functions [ FOUND ]
    • Checking expose_php option [ OFF ]
    • Checking enable_dl option [ OFF ]
    • Checking allow_url_fopen option [ ON ]
    • Checking allow_url_include option [ OFF ]
    • Checking listen option [ OK ]

[+] Squid Support

  • Checking running Squid daemon [ NOT FOUND ]

[+] Logging and files

  • Checking for a running log daemon [ OK ]
    • Checking Syslog-NG status [ NOT FOUND ]
    • Checking systemd journal status [ FOUND ]
    • Checking RSyslog status [ NOT FOUND ]
    • Checking RFC 3195 daemon status [ NOT FOUND ]
    • Checking minilogd instances [ NOT FOUND ]
    • Checking wazuh-agent daemon status [ NOT FOUND ]
  • Checking logrotate presence [ OK ]
  • Checking remote logging [ NOT ENABLED ]
  • Checking log directories (static list) [ DONE ]
  • Checking open log files [ DONE ]
  • Checking deleted files in use [ FILES FOUND ]

[+] Insecure services

  • Installed inetd package [ NOT FOUND ]
  • Installed xinetd package [ OK ]
    • xinetd status [ NOT ACTIVE ]
  • Installed rsh client package [ OK ]
  • Installed rsh server package [ OK ]
  • Installed telnet client package [ OK ]
  • Installed telnet server package [ NOT FOUND ]
  • Checking NIS client installation [ OK ]
  • Checking NIS server installation [ OK ]
  • Checking TFTP client installation [ OK ]
  • Checking TFTP server installation [ OK ]

[+] Banners and identification

  • /etc/issue [ FOUND ]
    • /etc/issue contents [ WEAK ]
  • /etc/issue.net [ FOUND ]
    • /etc/issue.net contents [ WEAK ]

[+] Scheduled tasks

  • Checking crontab and cronjob files [ DONE ]

[+] Accounting

  • Checking accounting information [ NOT FOUND ]
  • Checking sysstat accounting data [ NOT FOUND ]
  • Checking auditd [ NOT FOUND ]

[+] Time and Synchronization

  • NTP daemon found: systemd (timesyncd) [ FOUND ]
  • Checking for a running NTP daemon or client [ OK ]
  • Last time synchronization [ 4830s ]

[+] Cryptography

  • Checking for expired SSL certificates [0/149] [ NONE ]

[WARNING]: Test CRYP-7902 had a long execution: 29.940190 seconds

  • Kernel entropy is sufficient [ YES ]
  • HW RNG & rngd [ NO ]
  • SW prng [ NO ]
    MOR-bit set [ YES ]

[+] Virtualization

[+] Containers

[+] Security frameworks

  • Checking presence AppArmor [ FOUND ]
    • Checking AppArmor status [ UNKNOWN ]
  • Checking presence SELinux [ NOT FOUND ]
  • Checking presence TOMOYO Linux [ NOT FOUND ]
  • Checking presence grsecurity [ NOT FOUND ]
  • Checking for implemented MAC framework [ NONE ]

[+] Software: file integrity

  • Checking file integrity tools
    Cannot initialize device-mapper, running as non-root user.
  • dm-integrity (status) [ DISABLED ]
    Cannot initialize device-mapper, running as non-root user.
  • dm-verity (status) [ DISABLED ]
  • Checking presence integrity tool [ NOT FOUND ]

[+] Software: System tooling

  • Checking automation tooling
  • Automation tooling [ NOT FOUND ]
  • Checking for IDS/IPS tooling [ NONE ]

[+] Software: Malware

  • Malware software components [ NOT FOUND ]

[+] File Permissions

  • Starting file permissions check
    File: /etc/crontab [ SUGGESTION ]
    File: /etc/group [ OK ]
    File: /etc/group- [ OK ]
    File: /etc/hosts.allow [ OK ]
    File: /etc/hosts.deny [ OK ]
    File: /etc/issue [ OK ]
    File: /etc/issue.net [ OK ]
    File: /etc/motd [ OK ]
    File: /etc/passwd [ OK ]
    File: /etc/passwd- [ OK ]
    Directory: /etc/cron.d [ SUGGESTION ]
    Directory: /etc/cron.daily [ SUGGESTION ]
    Directory: /etc/cron.hourly [ SUGGESTION ]
    Directory: /etc/cron.weekly [ SUGGESTION ]
    Directory: /etc/cron.monthly [ SUGGESTION ]

[+] Home directories

  • Permissions of home directories [ WARNING ]
  • Ownership of home directories [ OK ]
  • Checking shell history files [ OK ]

[+] Kernel Hardening

  • Comparing sysctl key pairs with scan profile
    • dev.tty.ldisc_autoload (exp: 0) [ DIFFERENT ]
    • fs.protected_fifos (exp: 2) [ DIFFERENT ]
    • fs.protected_hardlinks (exp: 1) [ DIFFERENT ]
    • fs.protected_regular (exp: 2) [ DIFFERENT ]
    • fs.protected_symlinks (exp: 1) [ DIFFERENT ]
    • fs.suid_dumpable (exp: 0) [ OK ]
    • kernel.core_uses_pid (exp: 1) [ DIFFERENT ]
    • kernel.ctrl-alt-del (exp: 0) [ OK ]
    • kernel.dmesg_restrict (exp: 1) [ DIFFERENT ]
    • kernel.kptr_restrict (exp: 2) [ DIFFERENT ]
    • kernel.modules_disabled (exp: 1) [ DIFFERENT ]
    • kernel.perf_event_paranoid (exp: 2 3 4) [ OK ]
    • kernel.randomize_va_space (exp: 2) [ OK ]
    • kernel.sysrq (exp: 0) [ DIFFERENT ]
    • kernel.unprivileged_bpf_disabled (exp: 1) [ DIFFERENT ]
    • kernel.yama.ptrace_scope (exp: 1 2 3) [ OK ]
    • 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) [ DIFFERENT ]
    • net.ipv4.conf.all.send_redirects (exp: 0) [ DIFFERENT ]
    • 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)                                   [ FOUND ]
- Installed malware scanner                               [ NOT FOUND ]
- Non-native binary formats                               [ FOUND ]

[+] Custom tests

  • Running custom tests... [ NONE ]

[+] Plugins (phase 2)

  • Plugins (phase 2) [ DONE ]

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

-[ Lynis 3.1.5 Results ]-

Warnings (2):

! Can't find any security repository in /etc/apt/sources.list or sources.list.d directory [PKGS-7388]
https://cisofy.com/lynis/controls/PKGS-7388/

! systemd-timesyncd did not synchronized the time recently. [TIME-3185]
https://cisofy.com/lynis/controls/TIME-3185/

Suggestions (43):

  • Consider hardening system services [BOOT-5264]

    • Details : Run '/usr/bin/systemd-analyze security SERVICE' for each service
    • Related resources
      • Article: Systemd features to secure service files: https://linux-audit.com/systemd/systemd-features-to-secure-units-and-services/
      • Website: https://cisofy.com/lynis/controls/BOOT-5264/
  • Determine why /vmlinuz or /boot/vmlinuz is missing on this Debian/Ubuntu system. [KRNL-5788]

    • Details : /vmlinuz or /boot/vmlinuz
    • Related resources
      • Website: https://cisofy.com/lynis/controls/KRNL-5788/
  • If not required, consider explicit disabling of core dump in /etc/security/limits.conf file [KRNL-5820]

    • Related resources
      • Article: Understand and configure core dumps on Linux: https://linux-audit.com/software/understand-and-configure-core-dumps-work-on-linux/
      • Website: https://cisofy.com/lynis/controls/KRNL-5820/
  • Check the output of ps for dead or zombie processes [PROC-3612]

    • Related resources
      • Website: https://cisofy.com/lynis/controls/PROC-3612/
  • Run pwck manually and correct any errors in the password file [AUTH-9228]

    • Related resources
      • Article: File integrity of password files: https://linux-audit.com/authentication/file-integrity-of-password-files/
      • Website: https://cisofy.com/lynis/controls/AUTH-9228/
  • Configure password hashing rounds in /etc/login.defs [AUTH-9230]

    • Related resources
      • Article: Linux password security: hashing rounds: https://linux-audit.com/authentication/configure-the-minimum-password-length-on-linux-systems/
      • Website: https://cisofy.com/lynis/controls/AUTH-9230/
  • Install a PAM module for password strength testing like pam_cracklib or pam_passwdqc or libpam-passwdqc [AUTH-9262]

    • Related resources
      • Article: Configure minimum password length for Linux systems: https://linux-audit.com/configure-the-minimum-password-length-on-linux-systems/
      • Website: https://cisofy.com/lynis/controls/AUTH-9262/
  • Configure minimum password age in /etc/login.defs [AUTH-9286]

    • Related resources
      • Article: Configure minimum password length for Linux systems: https://linux-audit.com/configure-the-minimum-password-length-on-linux-systems/
      • Website: https://cisofy.com/lynis/controls/AUTH-9286/
  • Configure maximum password age in /etc/login.defs [AUTH-9286]

    • Related resources
      • Article: Configure minimum password length for Linux systems: https://linux-audit.com/configure-the-minimum-password-length-on-linux-systems/
      • Website: https://cisofy.com/lynis/controls/AUTH-9286/
  • Default umask in /etc/login.defs could not be found and defaults usually to 022, which could be more strict like 027 [AUTH-9328]

    • Related resources
      • Article: Set default file permissions on Linux with umask: https://linux-audit.com/filesystems/file-permissions/set-default-file-permissions-with-umask/
      • Website: https://cisofy.com/lynis/controls/AUTH-9328/
  • Default umask in /etc/init.d/rc could be more strict like 027 [AUTH-9328]

    • Related resources
      • Article: Set default file permissions on Linux with umask: https://linux-audit.com/filesystems/file-permissions/set-default-file-permissions-with-umask/
      • Website: https://cisofy.com/lynis/controls/AUTH-9328/
  • To decrease the impact of a full /tmp file system, place /tmp on a separate partition [FILE-6310]

    • Related resources
      • Website: https://cisofy.com/lynis/controls/FILE-6310/
  • To decrease the impact of a full /var file system, place /var on a separate partition [FILE-6310]

    • Related resources
      • Website: https://cisofy.com/lynis/controls/FILE-6310/
  • Disable drivers like USB storage when not used, to prevent unauthorized storage or data theft [USB-1000]

    • Related resources
      • Website: https://cisofy.com/lynis/controls/USB-1000/
  • Disable drivers like firewire storage when not used, to prevent unauthorized storage or data theft [STRG-1846]

    • Related resources
      • Website: https://cisofy.com/lynis/controls/STRG-1846/
  • Purge old/removed packages (15 found) with aptitude purge or dpkg --purge command. This will cleanup old configuration files, cron jobs and startup scripts. [PKGS-7346]

    • Related resources
      • Website: https://cisofy.com/lynis/controls/PKGS-7346/
  • Install debsums utility for the verification of packages with known good database. [PKGS-7370]

    • Related resources
      • Website: https://cisofy.com/lynis/controls/PKGS-7370/
  • Install package apt-show-versions for patch management purposes [PKGS-7394]

    • Related resources
      • Website: https://cisofy.com/lynis/controls/PKGS-7394/
  • Install a package audit tool to determine vulnerable packages [PKGS-7398]

    • Related resources
      • Website: https://cisofy.com/lynis/controls/PKGS-7398/
  • Consider using a tool to automatically apply upgrades [PKGS-7420]

    • Related resources
      • Website: https://cisofy.com/lynis/controls/PKGS-7420/
  • Determine if protocol 'dccp' is really needed on this system [NETW-3200]

    • Related resources
      • Website: https://cisofy.com/lynis/controls/NETW-3200/
  • Determine if protocol 'sctp' is really needed on this system [NETW-3200]

    • Related resources
      • Website: https://cisofy.com/lynis/controls/NETW-3200/
  • Determine if protocol 'rds' is really needed on this system [NETW-3200]

    • Related resources
      • Website: https://cisofy.com/lynis/controls/NETW-3200/
  • Determine if protocol 'tipc' is really needed on this system [NETW-3200]

    • Related resources
      • Website: https://cisofy.com/lynis/controls/NETW-3200/
  • Access to CUPS configuration could be more strict. [PRNT-2307]

    • Related resources
      • Website: https://cisofy.com/lynis/controls/PRNT-2307/
  • Install Apache mod_evasive to guard webserver against DoS/brute force attempts [HTTP-6640]

    • Related resources
      • Website: https://cisofy.com/lynis/controls/HTTP-6640/
  • Install Apache modsecurity to guard webserver against web application attacks [HTTP-6643]

    • Related resources
      • Website: https://cisofy.com/lynis/controls/HTTP-6643/
  • Change the allow_url_fopen line to: allow_url_fopen = Off, to disable downloads via PHP [PHP-2376]

    • Related resources
      • Website: https://cisofy.com/lynis/controls/PHP-2376/
  • Enable logging to an external logging host for archiving purposes and additional protection [LOGG-2154]

    • Related resources
      • Website: https://cisofy.com/lynis/controls/LOGG-2154/
  • Check what deleted files are still in use and why. [LOGG-2190]

    • Related resources
      • Website: https://cisofy.com/lynis/controls/LOGG-2190/
  • Add a legal banner to /etc/issue, to warn unauthorized users [BANN-7126]

    • Related resources
      • Article: The real purpose of login banners: https://linux-audit.com/the-real-purpose-of-login-banners-on-linux/
      • Website: https://cisofy.com/lynis/controls/BANN-7126/
  • Add legal banner to /etc/issue.net, to warn unauthorized users [BANN-7130]

    • Related resources
      • Article: The real purpose of login banners: https://linux-audit.com/the-real-purpose-of-login-banners-on-linux/
      • Website: https://cisofy.com/lynis/controls/BANN-7130/
  • Enable process accounting [ACCT-9622]

    • Related resources
      • Website: https://cisofy.com/lynis/controls/ACCT-9622/
  • Enable sysstat to collect accounting (no results) [ACCT-9626]

    • Related resources
      • Website: https://cisofy.com/lynis/controls/ACCT-9626/
  • Enable auditd to collect audit information [ACCT-9628]

    • Related resources
      • Article: Linux audit framework 101: basic rules for configuration: https://linux-audit.com/linux-audit-framework/linux-audit-framework-101-basic-rules-for-configuration/
      • Article: Monitoring Linux file access, changes and data modifications: https://linux-audit.com/monitoring-linux-file-access-changes-and-modifications/
      • Website: https://cisofy.com/lynis/controls/ACCT-9628/
  • Check output of aa-status [MACF-6208]

    • Details : /sys/kernel/security/apparmor/profiles
    • Solution : Run aa-status
    • Related resources
      • Article: AppArmor: https://linux-audit.com/security-frameworks/apparmor/
      • Website: https://cisofy.com/lynis/controls/MACF-6208/
  • Install a file integrity tool to monitor changes to critical and sensitive files [FINT-4350]

    • Related resources
      • Article: Monitoring Linux file access, changes and data modifications: https://linux-audit.com/monitoring-linux-file-access-changes-and-modifications/
      • Article: Monitor for file changes on Linux: https://linux-audit.com/monitor-for-file-system-changes-on-linux/
      • Website: https://cisofy.com/lynis/controls/FINT-4350/
  • Determine if automation tools are present for system management [TOOL-5002]

    • Related resources
      • Website: https://cisofy.com/lynis/controls/TOOL-5002/
  • Consider restricting file permissions [FILE-7524]

    • Details : See screen output or log file
    • Solution : Use chmod to change file permissions
    • Related resources
      • Website: https://cisofy.com/lynis/controls/FILE-7524/
  • Double check the permissions of home directories as some might be not strict enough. [HOME-9304]

    • Related resources
      • Website: https://cisofy.com/lynis/controls/HOME-9304/
  • 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:)
    • Related resources
      • Article: Linux hardening with sysctl settings: https://linux-audit.com/linux-hardening-with-sysctl/
      • Article: Overview of sysctl options and values: https://linux-audit.com/kernel/sysctl/
      • Website: https://cisofy.com/lynis/controls/KRNL-6000/
  • Harden compilers like restricting access to root user only [HRDN-7222]

    • Related resources
      • Article: Why remove compilers from your system?: https://linux-audit.com/software/why-remove-compilers-from-your-system/
      • Website: https://cisofy.com/lynis/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, Wazuh
    • Related resources
      • Article: Antivirus for Linux: is it really needed?: https://linux-audit.com/malware/antivirus-for-linux-really-needed/
      • Article: Monitoring Linux Systems for Rootkits: https://linux-audit.com/monitoring-linux-systems-for-rootkits/
      • Website: https://cisofy.com/lynis/controls/HRDN-7230/

Follow-up:

  • Show details of a test (lynis show details TEST-ID)
  • Check the logfile for all details (less /home/heifengxi/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 : 62 [############ ]
Tests performed : 266
Plugins enabled : 2

Components:

  • Firewall [V]
  • Malware scanner [X]

Scan mode:
Normal [ ] Forensics [ ] Integration [ ] Pentest [V] (running non-privileged)

Lynis modules:

  • Compliance status [?]
  • Security audit [V]
  • Vulnerability scan [V]

Files:

  • Test and debug information : /home/heifengxi/lynis.log
  • Report data : /home/heifengxi/lynis-report.dat

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

Skipped tests due to non-privileged mode
BOOT-5108 - Check Syslinux as bootloader
BOOT-5109 - Check rEFInd as bootloader
BOOT-5116 - Check if system is booted in UEFI mode
BOOT-5140 - Check for ELILO boot loader presence
AUTH-9216 - Check group and shadow group files
AUTH-9229 - Check password hashing methods
AUTH-9252 - Check ownership and permissions for sudo configuration files
AUTH-9288 - Checking for expired passwords
FILE-6368 - Checking ACL support on root file system
PKGS-7390 - Check Ubuntu database consistency
PKGS-7392 - Check for Debian/Ubuntu security updates
FIRE-4508 - Check used policies of iptables chains
FIRE-4512 - Check iptables for empty ruleset
FIRE-4513 - Check iptables for unused rules
FIRE-4540 - Check for empty nftables configuration
FIRE-4586 - Check firewall logging
CRYP-7930 - Determine if system uses LUKS block device encryption
CRYP-7931 - Determine if system uses encrypted swap

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

Lynis 3.1.5

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

2007-2024, 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 /home/heifengxi/Documents/Git-Repo/lynis/default.prf for all settings)

Reply Favorite View the author
All Replies

No replies yet