Outils pour utilisateurs

Système électronique embarqué

OS

Construction/Applications

lUCI Theme

Infos

NumWorks/Epsilon

Brique Internet

OLinuxino

WiFi

Connexion série

Easy Share

USB deporté

Performance

Sécurité

IPtables

Minimal rules iptables-persistent /etc/iptables/rules.v4

# Generated by iptables-save v1.4.21 on Sat Mar 10 07:07:47 2018
*filter
:INPUT DROP [0:0]
:FORWARD DROP [0:0]
:OUTPUT ACCEPT [0:0]
-A INPUT -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT
-A INPUT -i lo -j ACCEPT
-A INPUT -p ipv6 -j ACCEPT
-A INPUT -m conntrack --ctstate INVALID -j DROP
-A INPUT -p icmp -m icmp --icmp-type 8 -m conntrack --ctstate NEW,RELATED,ESTABLISHED -j ACCEPT
-A INPUT -p tcp -m tcp --dport 22 -j ACCEPT
-A INPUT -p tcp -m tcp --dport 80 -j ACCEPT
-A INPUT -p tcp -m tcp --dport 443 -j ACCEPT
-A INPUT -p tcp -m state --state NEW -m tcp --dport 139 -j ACCEPT
-A INPUT -p tcp -m state --state NEW -m tcp --dport 445 -j ACCEPT
-A INPUT -p udp -m udp --dport 53 -j ACCEPT
-A INPUT -p udp -m udp --dport 137 -j ACCEPT
-A INPUT -p udp -m udp --dport 138 -j ACCEPT
-A INPUT -p udp -m udp --dport 5353 -j ACCEPT
-A INPUT -p udp -m udp --dport 60000:61000 -j ACCEPT
COMMIT
# Completed on Sat Mar 10 07:07:47 2018

Restricted User

Restricted Menu

Mode kiosk

Hardening

Security audit your ARM board with Lynis

Be it powerful production servers, or humble home hosted ARM boards, an internet facing system requires that we take security very seriously.

But security is hard. No matter how much we try to secure our systems, any small detail we oversee can ruin all our efforts.

In the same way that intruders make use of automated scanning tools to detect vulnerabilities, we also have some tools at our hand to help secure our systems and try to validate that we are not missing anything.

Lynis is an open source security auditing tool. It is really simple to use and allows us to perform a thorough security analysis.

Installation

Install not only the lynis package, but also some other helpful tools

# apt-get install lynis debian-goodies needrestart debsums debsecan

Probably too much for an ARM board, but in a production server we can also afford to include

# apt-get install apt-listbugs samhain tripwire

We will cover those other tools in another post.

Usage

Just

# lynis audit system

You can run a non privileged scan for pentesting

# lynis audit --pentest

These examples run with the default profile, which you can find in /etc/lynis/default.prf. It is recommended that add your modifications to custom.prf instead of modifying default.prf directly.

Your modifications to custom.prf will be picked up automatically. If we want to run from another custom profile we can indicate it with

# lynis audit system --profile /myprofile.prf

Warnings will have an explanation and a code, such as ACCT-9628. Also, we will receive suggestions on how to solve, and a link to their extensive documentation, in our example this link.

As we try to fix issues, it is handy to see how Lynis checks for a particular warning to be issued. We can do this by inspecting the log /var/log/lynis.log, or with the command

# lynis show details ACCT-9628
2017-12-23 11:42:10 Performing test ID ACCT-9628 (Check for auditd)
2017-12-23 11:42:10 Test: Check auditd status
2017-12-23 11:42:10 IsRunning: process 'auditd' not found
2017-12-23 11:42:10 Result: auditd not active
2017-12-23 11:42:10 Suggestion: Enable auditd to collect audit information [test:ACCT-9628] [details:-] [solution:-]
2017-12-23 11:42:10 Hardening: assigned partial number of hardening points (0 of 1). Currently having 139 points (out of 227)

Lynis in ARM boards

The output of the above commands will provide us with very valuable information to improve our security and the configuration of our system.

For instance, this is the output after installing on plain Raspbian


  1. Checking IPv6 configuration [ ENABLED ]

Configuration method [ AUTO ]

      IPv6 only [ NO ]
  - Checking configured nameservers
    - Testing nameservers
      Nameserver: 192.168.0.5 [ SKIPPED ]
    - Minimal of 2 responsive nameservers [ SKIPPED ]
  - Checking default gateway [ DONE ]
  - Getting listening ports (TCP/UDP) [ DONE ]
      * Found 7 ports
  - Checking promiscuous interfaces [ OK ]
  - Checking waiting connections [ OK ]
  - Checking status DHCP client [ NOT ACTIVE ]
  - Checking for ARP monitoring software [ NOT FOUND ]

[+] Printers and Spools


  1. Checking cups daemon [ NOT FOUND ]
  2. Checking lp daemon [ NOT RUNNING ]

[+] Software: e-mail and messaging


  1. Checking Exim status [ NOT FOUND ]
  2. Checking Postfix status [ NOT FOUND ]
  3. Checking Dovecot status [ NOT FOUND ]
  4. Checking Qmail status [ NOT FOUND ]
  5. Checking Sendmail status [ NOT FOUND ]

[+] Software: firewalls


  1. Checking iptables kernel module [ FOUND ]
    1. Checking iptables policies of chains [ FOUND ]

INVALID OPTION (Display): YELLOW

  1. Checking for empty ruleset [ WARNING ]
  2. Checking for unused rules [ OK ]
  3. Checking host based firewall [ ACTIVE ]

[+] Software: webserver


  1. Checking Apache [ NOT FOUND ]
  2. Checking nginx [ NOT FOUND ]

[+] SSH Support


  1. Checking running SSH daemon [ FOUND ]
    1. Searching SSH configuration [ FOUND ]
    2. SSH option: AllowTcpForwarding [ SUGGESTION ]
    3. SSH option: ClientAliveCountMax [ SUGGESTION ]
    4. SSH option: ClientAliveInterval [ OK ]
    5. SSH option: Compression [ SUGGESTION ]
    6. SSH option: FingerprintHash [ OK ]
    7. SSH option: GatewayPorts [ OK ]
    8. SSH option: IgnoreRhosts [ OK ]
    9. SSH option: LoginGraceTime [ OK ]
    10. SSH option: LogLevel [ SUGGESTION ]
    11. SSH option: MaxAuthTries [ SUGGESTION ]
    12. SSH option: MaxSessions [ SUGGESTION ]
    13. SSH option: PermitRootLogin [ SUGGESTION ]
    14. SSH option: PermitUserEnvironment [ OK ]
    15. SSH option: PermitTunnel [ OK ]
    16. SSH option: Port [ SUGGESTION ]
    17. SSH option: PrintLastLog [ OK ]
    18. SSH option: Protocol [ NOT FOUND ]
    19. SSH option: StrictModes [ OK ]
    20. SSH option: TCPKeepAlive [ SUGGESTION ]
    21. SSH option: UseDNS [ OK ]
    22. SSH option: UsePrivilegeSeparation [ OK ]
    23. SSH option: VerifyReverseMapping [ NOT FOUND ]
    24. SSH option: X11Forwarding [ SUGGESTION ]
    25. SSH option: AllowAgentForwarding [ SUGGESTION ]
    26. SSH option: AllowUsers [ NOT FOUND ]
    27. SSH option: AllowGroups [ NOT FOUND ]

[+] SNMP Support


  1. Checking running SNMP daemon [ NOT FOUND ]

[+] Databases


    No database engines found

[+] LDAP Services


  1. Checking OpenLDAP instance [ NOT FOUND ]

[+] PHP


  1. Checking PHP [ NOT FOUND ]

[+] Squid Support


  1. Checking running Squid daemon [ NOT FOUND ]

[+] Logging and files


  1. Checking for a running log daemon [ OK ]
    1. Checking Syslog-NG status [ NOT FOUND ]
    2. Checking systemd journal status [ FOUND ]
    3. Checking Metalog status [ NOT FOUND ]
    4. Checking RSyslog status [ FOUND ]
    5. Checking RFC 3195 daemon status [ NOT FOUND ]
    6. Checking minilogd instances [ NOT FOUND ]
  2. Checking logrotate presence [ OK ]
  3. Checking log directories (static list) [ DONE ]
  4. Checking open log files [ SKIPPED ]

[+] Insecure services


  1. Checking inetd status [ NOT ACTIVE ]

[+] Banners and identification


  1. /etc/issue [ FOUND ]
    1. /etc/issue contents [ WEAK ]
  2. /etc/issue.net [ FOUND ]
    1. /etc/issue.net contents [ WEAK ]

[+] Scheduled tasks


  1. Checking crontab/cronjob [ DONE ]

[+] Accounting


  1. Checking accounting information [ NOT FOUND ]
  2. Checking sysstat accounting data [ NOT FOUND ]
  3. Checking auditd [ NOT FOUND ]

[+] Time and Synchronization


  1. NTP daemon found: systemd (timesyncd) [ FOUND ]
  2. Checking for a running NTP daemon or client [ OK ]

[+] Cryptography


  1. Checking for expired SSL certificates [ NONE ]

[+] Virtualization


[+] Containers


[+] Security frameworks


  1. Checking presence AppArmor [ NOT FOUND ]
  2. Checking presence SELinux [ NOT FOUND ]
  3. Checking presence grsecurity [ NOT FOUND ]
  4. Checking for implemented MAC framework [ NONE ]

[+] Software: file integrity


  1. Checking file integrity tools
  2. Checking presence integrity tool [ NOT FOUND ]

[+] Software: System tooling


  1. Checking automation tooling
  2. Automation tooling [ NOT FOUND ]
  3. Checking for IDS/IPS tooling [ NONE ]

[+] Software: Malware


[+] File Permissions


  1. Starting file permissions check

/etc/lilo.conf [ NOT FOUND ]

    /root/.ssh [ NOT FOUND ]

[+] Home directories


  1. Checking shell history files [ OK ]

[+] Kernel Hardening


  1. Comparing sysctl key pairs with scan profile
    1. kernel.core_uses_pid (exp: 1) [ DIFFERENT ]
    2. kernel.ctrl-alt-del (exp: 0) [ OK ]
    3. kernel.kptr_restrict (exp: 2) [ DIFFERENT ]
    4. kernel.randomize_va_space (exp: 2) [ OK ]
    5. kernel.sysrq (exp: 0) [ DIFFERENT ]
    6. net.ipv4.conf.all.accept_redirects (exp: 0) [ DIFFERENT ]
    7. net.ipv4.conf.all.accept_source_route (exp: 0) [ OK ]
    8. net.ipv4.conf.all.bootp_relay (exp: 0) [ OK ]
    9. net.ipv4.conf.all.forwarding (exp: 0) [ OK ]
    10. net.ipv4.conf.all.log_martians (exp: 1) [ DIFFERENT ]
    11. net.ipv4.conf.all.mc_forwarding (exp: 0) [ OK ]
    12. net.ipv4.conf.all.proxy_arp (exp: 0) [ OK ]
    13. net.ipv4.conf.all.rp_filter (exp: 1) [ DIFFERENT ]
    14. net.ipv4.conf.all.send_redirects (exp: 0) [ DIFFERENT ]
    15. net.ipv4.conf.default.accept_redirects (exp: 0) [ DIFFERENT ]
    16. net.ipv4.conf.default.accept_source_route (exp: 0) [ DIFFERENT ]
    17. net.ipv4.conf.default.log_martians (exp: 1) [ DIFFERENT ]
    18. net.ipv4.icmp_echo_ignore_broadcasts (exp: 1) [ OK ]
    19. net.ipv4.icmp_ignore_bogus_error_responses (exp: 1) [ OK ]
    20. net.ipv4.tcp_syncookies (exp: 1) [ OK ]
    21. net.ipv4.tcp_timestamps (exp: 0) [ DIFFERENT ]
    22. net.ipv6.conf.all.accept_redirects (exp: 0) [ DIFFERENT ]
    23. net.ipv6.conf.all.accept_source_route (exp: 0) [ OK ]
    24. net.ipv6.conf.default.accept_redirects (exp: 0) [ DIFFERENT ]
    25. net.ipv6.conf.default.accept_source_route (exp: 0) [ OK ]

[+] Hardening


  1. Installed compiler(s) [ FOUND ]
  2. Installed malware scanner [ NOT FOUND ]
  3. Installed malware scanner [ NOT FOUND ]

[+] Custom Tests


  1. Running custom tests… [ NONE ]

[+] Plugins (phase 2)


  1. [ Lynis 2.4.0 Results ]-
Warnings (3):
----------------------------
! Version of Lynis is very old and should be updated [LYNIS] 
    https://cisofy.com/controls/LYNIS/
! Can't find any security repository in /etc/apt/sources.list or sources.list.d directory [PKGS-7388] 
    https://cisofy.com/controls/PKGS-7388/
! iptables module(s) loaded, but no rules active [FIRE-4512] 
    https://cisofy.com/controls/FIRE-4512/
Suggestions (43):
----------------------------
* Install libpam-tmpdir to set $TMP and $TMPDIR for PAM sessions [CUST-0280] 
    https://your-domain.example.org/controls/CUST-0280/
  • Install libpam-usb to enable multi-factor authentication for PAM sessions [CUST-0285]

https://your-domain.example.org/controls/CUST-0285/

  • Install apt-listbugs to display a list of critical bugs prior to each APT installation. [CUST-0810]

https://your-domain.example.org/controls/CUST-0810/

  • Install debian-goodies so that you can run checkrestart after upgrades to determine which services are using old versions of libraries and need restarting. [CUST-0830]

https://your-domain.example.org/controls/CUST-0830/

  • Install needrestart, alternatively to debian-goodies, so that you can run needrestart after upgrades to determine which daemons are using old versions of libraries and need restarting. [CUST-0831]

https://your-domain.example.org/controls/CUST-0831/

  • Install debsecan to generate lists of vulnerabilities which affect this installation. [CUST-0870]

https://your-domain.example.org/controls/CUST-0870/

  • Install debsums for the verification of installed package files against MD5 checksums. [CUST-0875]

https://your-domain.example.org/controls/CUST-0875/

  • Install fail2ban to automatically ban hosts that commit multiple authentication errors. [DEB-0880]

https://cisofy.com/controls/DEB-0880/

  • Use a PAE enabled kernel when possible to gain native No eXecute/eXecute Disable support [KRNL-5677]

https://cisofy.com/controls/KRNL-5677/

  • Discover why /vmlinuz is missing. Consider manually re-linking. [KRNL-5788]

https://cisofy.com/controls/KRNL-5788/

  • Check the output of apt-cache policy manually to determine why output is empty [KRNL-5788]

https://cisofy.com/controls/KRNL-5788/

  • Install a PAM module for password strength testing like pam_cracklib or pam_passwdqc [AUTH-9262]

https://cisofy.com/controls/AUTH-9262/

  • Configure minimum password age in /etc/login.defs [AUTH-9286]

https://cisofy.com/controls/AUTH-9286/

  • Configure maximum password age in /etc/login.defs [AUTH-9286]

https://cisofy.com/controls/AUTH-9286/

  • Default umask in /etc/login.defs could be more strict like 027 [AUTH-9328]

https://cisofy.com/controls/AUTH-9328/

  • To decrease the impact of a full /home file system, place /home on a separated partition [FILE-6310]

https://cisofy.com/controls/FILE-6310/

  • To decrease the impact of a full /tmp file system, place /tmp on a separated partition [FILE-6310]

https://cisofy.com/controls/FILE-6310/

  • To decrease the impact of a full /var file system, place /var on a separated partition [FILE-6310]

https://cisofy.com/controls/FILE-6310/

  • 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/

  • Install debsums utility for the verification of packages with known good database. [PKGS-7370]

https://cisofy.com/controls/PKGS-7370/

  • Consider running ARP monitoring software (arpwatch,arpon) [NETW-3032]

https://cisofy.com/controls/NETW-3032/

  • Consider hardening SSH configuration [SSH-7408]
    1. Details : AllowTcpForwarding (YES –> NO)

https://cisofy.com/controls/SSH-7408/

  • Consider hardening SSH configuration [SSH-7408]
    1. Details : ClientAliveCountMax (3 –> 2)

https://cisofy.com/controls/SSH-7408/

  • Consider hardening SSH configuration [SSH-7408]
    1. Details : Compression (YES –> NO)

https://cisofy.com/controls/SSH-7408/

  • Consider hardening SSH configuration [SSH-7408]
    1. Details : LogLevel (INFO –> VERBOSE)

https://cisofy.com/controls/SSH-7408/

  • Consider hardening SSH configuration [SSH-7408]
    1. Details : MaxAuthTries (6 –> 1)

https://cisofy.com/controls/SSH-7408/

  • Consider hardening SSH configuration [SSH-7408]
    1. Details : MaxSessions (10 –> 2)

https://cisofy.com/controls/SSH-7408/

  • Consider hardening SSH configuration [SSH-7408]
    1. Details : PermitRootLogin (WITHOUT-PASSWORD –> NO)

https://cisofy.com/controls/SSH-7408/

  • Consider hardening SSH configuration [SSH-7408]
    1. Details : Port (22 –> )

https://cisofy.com/controls/SSH-7408/

  • Consider hardening SSH configuration [SSH-7408]
    1. Details : TCPKeepAlive (YES –> NO)

https://cisofy.com/controls/SSH-7408/

  • Consider hardening SSH configuration [SSH-7408]
    1. Details : X11Forwarding (YES –> NO)

https://cisofy.com/controls/SSH-7408/

  • Consider hardening SSH configuration [SSH-7408]
    1. Details : AllowAgentForwarding (YES –> NO)

https://cisofy.com/controls/SSH-7408/

  • Add a legal banner to /etc/issue, to warn unauthorized users [BANN-7126]

https://cisofy.com/controls/BANN-7126/

  • Add legal banner to /etc/issue.net, to warn unauthorized users [BANN-7130]

https://cisofy.com/controls/BANN-7130/

  • Enable process accounting [ACCT-9622]

https://cisofy.com/controls/ACCT-9622/ # Won't install apt-listbugs and all its ruby dependencies skip-test=CUST-0810

# Won't install puppet or similar skip-test=TOOL-5002

# Raspbian doesn't have security sources ( https://www.raspberrypi.org/forums/viewtopic.php?t=98006&p=680175 ) skip-test=PKGS-7388

# We have a preset partition scheme in the SD card skip-test=FILE-6310

# We don't use firewire skip-test=STRG-1846

# We use USB in NCP skip-test=STRG-1840

# Won't recompile kernel to support auditd skip-test=ACCT-9628

# Won't be protected against DDOS in self-hosting, will save the resources skip-test=HTTP-6640 skip-test=HTTP-6641

# vmlinuz missing at least in Raspbian skip-test=KRNL-5788

# won't recompile kernels for PAE NX skip-test=KRNL-5677

  • Enable sysstat to collect accounting (no results) [ACCT-9626]

https://cisofy.com/controls/ACCT-9626/

  • Enable auditd to collect audit information [ACCT-9628]

https://cisofy.com/controls/ACCT-9628/

  • Install a file integrity tool to monitor changes to critical and sensitive files [FINT-4350]

https://cisofy.com/controls/FINT-4350/

  • 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]

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]
    1. 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 : 57 [###########         ]
Tests performed : 203
Plugins enabled : 1
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 update available
Current version : 240    Latest version : 257
Lynis 2.4.0
Auditing, system hardening, and compliance for UNIX-based systems
(Linux, macOS, BSD, and others)
2007-2016, CISOfy - https://cisofy.com/lynis/
Enterprise support available (compliance, plugins, interface and tools)
[TIP]: Enhance Lynis audits by adding your settings to custom.prf (see /etc/lynis/default.prf for all settings)

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634

[ Lynis 2.4.0 ]
 
################################################################################
  Lynis comes with ABSOLUTELY NO WARRANTY. This is free software, and you are
  welcome to redistribute it under the terms of the GNU General Public License.
  See the LICENSE file for details about using this software.
 
  2007-2016, CISOfy - https://cisofy.com/lynis/
  Enterprise support available (compliance, plugins, interface and tools)
################################################################################
 
 
[+] Initializing program
------------------------------------
    - Detecting OS...  [ DONE ]
    - Checking profiles... [ DONE ]
 
  ---------------------------------------------------
  Program version:           2.4.0
  Operating system:          Linux
  Operating system name:     Debian
  Operating system version:  9.1
  Kernel version:            4.9.59
  Hardware platform:         armv7l
  Hostname:                  raspberrypi
  ---------------------------------------------------
  Profiles:                  /etc/lynis/default.prf
  Log file:                  /var/log/lynis.log
  Report file:               /var/log/lynis-report.dat
  Report version:            1.0
  Plugin directory:          /etc/lynis/plugins
  ---------------------------------------------------
  Auditor:                   [Not Specified]
  Test category:             all
  Test group:                all
  ---------------------------------------------------
    - Program update status...  [ WARNING ]
 
      ===============================================================================
        Lynis update available
      ===============================================================================
 
        Current version is more than 4 months old
 
        Current version : 240   Latest version : 257
 
        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            -  https://cisofy.com/downloads/
        GitHub             -  https://github.com/CISOfy/lynis
 
      ===============================================================================
 
 
[+] System Tools
------------------------------------
    - Scanning available tools...
    - Checking system binaries...
 
[+] Plugins (phase 1)
------------------------------------
Note: plugins have more extensive tests and may take several minutes to complete
 
    - Plugin: debian
    [
[+] Debian Tests
------------------------------------
    - Checking for system binaries that are required by Debian Tests...
      - Checking /bin...  [ FOUND ]
      - Checking /sbin...  [ FOUND ]
      - Checking /usr/bin...  [ FOUND ]
      - Checking /usr/sbin...  [ FOUND ]
      - Checking /usr/local/bin...  [ FOUND ]
      - Checking /usr/local/sbin...  [ FOUND ]
    - Authentication:
      - PAM (Pluggable Authentication Modules):
        - libpam-tmpdir [ Not Installed ]
        - libpam-usb [ Not Installed ]
    - File System Checks:
      - DM-Crypt, Cryptsetup & Cryptmount:
    - Software:
      - apt-listbugs [ Not Installed ]
      - apt-listchanges [ Installed and enabled for apt ]
      - checkrestart [ Not Installed ]
      - needrestart [ Not Installed ]
      - debsecan [ Not Installed ]
      - debsums [ Not Installed ]
      - fail2ban [ Not Installed ]
]
 
[+] Boot and services
------------------------------------
    - Service Manager [ systemd ]
    - Checking UEFI boot [ DISABLED ]
      - Boot loader [ NONE FOUND ]
    - Check running services (systemctl) [ DONE ]
Result: found 15 running services
    - Check enabled services at boot (systemctl) [ DONE ]
Result: found 23 enabled services
    - Check startup files (permissions) [ OK ]
 
[+] Kernel
------------------------------------
    - Checking default run level [ RUNLEVEL 5 ]
    - Checking CPU support (NX/PAE)
      CPU support: No PAE or NoeXecute supported [ NONE ]
    - Checking kernel version and release [ DONE ]
    - Checking kernel type [ DONE ]
    - Checking loaded kernel modules [ DONE ]
        Found 20 active modules
    - Checking Linux kernel configuration file [ NOT FOUND ]
    - Checking for available kernel update [ UNKNOWN ]
    - Checking core dumps configuration [ DISABLED ]
      - Checking setuid core dumps configuration [ DEFAULT ]
    - Check if reboot is needed [ UNKNOWN ]
 
[+] Memory and Processes
------------------------------------
    - Checking /proc/meminfo [ FOUND ]
    - Searching for dead/zombie processes [ OK ]
    - Searching for IO waiting processes [ OK ]
 
[+] Users, Groups and Authentication
------------------------------------
    - Administrator accounts [ OK ]
    - Unique UIDs [ OK ]
    - Consistency of group files (grpck) [ OK ]
    - Unique group IDs [ OK ]
    - Unique group names [ OK ]
    - Password file consistency [ OK ]
    - Query system users (non daemons) [ DONE ]
    - NIS+ authentication support [ NOT ENABLED ]
    - NIS authentication support [ NOT ENABLED ]
    - sudoers file [ FOUND ]
      - Check sudoers file permissions [ OK ]
    - PAM password strength tools [ SUGGESTION ]
    - PAM configuration files (pam.conf) [ FOUND ]
    - PAM configuration files (pam.d) [ FOUND ]
    - PAM modules [ NOT FOUND ]
    - LDAP module in PAM [ NOT FOUND ]
    - Accounts without expire date [ OK ]
    - Accounts without password [ OK ]
    - Checking user password aging (minimum) [ DISABLED ]
    - User password aging (maximum) [ DISABLED ]
    - Checking expired passwords [ OK ]
    - Checking Linux single user mode authentication [ OK ]
    - Determining default umask
      - umask (/etc/profile) [ NOT FOUND ]
      - umask (/etc/login.defs) [ SUGGESTION ]
    - LDAP authentication support [ NOT ENABLED ]
    - Logging failed login attempts [ ENABLED ]
 
[+] Shells
------------------------------------
    - Checking shells from /etc/shells
      Result: found 4 shells (valid shells: 4).
      - Session timeout settings/tools [ NONE ]
    - Checking default umask values
      - Checking default umask in /etc/bash.bashrc [ NONE ]
      - Checking default umask in /etc/profile [ NONE ]
 
[+] File systems
------------------------------------
    - Checking mount points
      - Checking /home mount point [ SUGGESTION ]
      - Checking /tmp mount point [ SUGGESTION ]
      - Checking /var mount point [ SUGGESTION ]
    - Query swap partitions (fstab) [ NONE ]
    - Testing swap partitions [ OK ]
    - Testing /proc mount (hidepid) [ SUGGESTION ]
    - Checking for old files in /tmp [ OK ]
    - Checking /tmp sticky bit [ OK ]
    - ACL support root file system [ ENABLED ]
    - Mount options of / [ NON DEFAULT ]
    - Mount options of /boot [ NON DEFAULT ]
    - Disable kernel support of some filesystems
      - Discovered kernel modules: hfs hfsplus jffs2 squashfs udf 
 
[+] Storage
------------------------------------
    - Checking usb-storage driver (modprobe config) [ NOT DISABLED ]
    - Checking USB devices authorization [ ENABLED ]
    - Checking firewire ohci driver (modprobe config) [ NOT DISABLED ]
 
[+] NFS
------------------------------------
    - Query rpc registered programs [ DONE ]
    - Query NFS versions [ DONE ]
    - Query NFS protocols [ DONE ]
    - Check running NFS daemon [ NOT FOUND ]
 
[+] Name services
------------------------------------
    - Checking default DNS search domain [ FOUND ]
    - Searching DNS domain name [ FOUND ]
        Domain name: Home
    - Checking /etc/hosts
      - Checking /etc/hosts (duplicates) [ OK ]
      - Checking /etc/hosts (hostname) [ OK ]
      - Checking /etc/hosts (localhost) [ OK ]
 
[+] Ports and packages
------------------------------------
    - Searching package managers
      - Searching dpkg package manager [ FOUND ]
        - Querying package manager
      - Query unpurged packages [ NONE ]
    - Checking security repository in sources.list file or directory [ WARNING ]
    - Checking vulnerable packages (apt-get only) [ DONE ]
    - Checking package audit tool [ INSTALLED ]
      Found: apt-get
 
[+] Networking
------------------------------------
    - Checking IPv6 configuration [ ENABLED ]
        Configuration method [ AUTO ]
        IPv6 only [ NO ]
    - Checking configured nameservers
      - Testing nameservers
        Nameserver: 192.168.0.5 [ SKIPPED ]
      - Minimal of 2 responsive nameservers [ SKIPPED ]
    - Checking default gateway [ DONE ]
    - Getting listening ports (TCP/UDP) [ DONE ]
        * Found 7 ports
    - Checking promiscuous interfaces [ OK ]
    - Checking waiting connections [ OK ]
    - Checking status DHCP client [ NOT ACTIVE ]
    - Checking for ARP monitoring software [ NOT FOUND ]
 
[+] Printers and Spools
------------------------------------
    - Checking cups daemon [ NOT FOUND ]
    - Checking lp daemon [ NOT RUNNING ]
 
[+] Software: e-mail and messaging
------------------------------------
    - Checking Exim status [ NOT FOUND ]
    - Checking Postfix status [ NOT FOUND ]
    - Checking Dovecot status [ NOT FOUND ]
    - Checking Qmail status [ NOT FOUND ]
    - Checking Sendmail status [ NOT FOUND ]
 
[+] Software: firewalls
------------------------------------
    - Checking iptables kernel module [ FOUND ]
      - Checking iptables policies of chains [ FOUND ]
INVALID OPTION (Display): YELLOW
      - Checking for empty ruleset [ WARNING ]
      - Checking for unused rules [ OK ]
    - Checking host based firewall [ ACTIVE ]
 
[+] Software: webserver
------------------------------------
    - Checking Apache [ NOT FOUND ]
    - Checking nginx [ NOT FOUND ]
 
[+] SSH Support
------------------------------------
    - Checking running SSH daemon [ FOUND ]
      - Searching SSH configuration [ FOUND ]
      - SSH option: AllowTcpForwarding [ SUGGESTION ]
      - SSH option: ClientAliveCountMax [ SUGGESTION ]
      - SSH option: ClientAliveInterval [ OK ]
      - SSH option: Compression [ SUGGESTION ]
      - SSH option: FingerprintHash [ OK ]
      - SSH option: GatewayPorts [ OK ]
      - SSH option: IgnoreRhosts [ OK ]
      - SSH option: LoginGraceTime [ OK ]
      - SSH option: LogLevel [ SUGGESTION ]
      - SSH option: MaxAuthTries [ SUGGESTION ]
      - SSH option: MaxSessions [ SUGGESTION ]
      - SSH option: PermitRootLogin [ SUGGESTION ]
      - SSH option: PermitUserEnvironment [ OK ]
      - SSH option: PermitTunnel [ OK ]
      - SSH option: Port [ SUGGESTION ]
      - SSH option: PrintLastLog [ OK ]
      - SSH option: Protocol [ NOT FOUND ]
      - SSH option: StrictModes [ OK ]
      - SSH option: TCPKeepAlive [ SUGGESTION ]
      - SSH option: UseDNS [ OK ]
      - SSH option: UsePrivilegeSeparation [ OK ]
      - SSH option: VerifyReverseMapping [ NOT FOUND ]
      - SSH option: X11Forwarding [ SUGGESTION ]
      - SSH option: AllowAgentForwarding [ SUGGESTION ]
      - SSH option: AllowUsers [ NOT FOUND ]
      - SSH option: AllowGroups [ NOT FOUND ]
 
[+] SNMP Support
------------------------------------
    - Checking running SNMP daemon [ NOT FOUND ]
 
[+] Databases
------------------------------------
      No database engines found
 
[+] LDAP Services
------------------------------------
    - Checking OpenLDAP instance [ NOT FOUND ]
 
[+] PHP
------------------------------------
    - Checking PHP [ NOT FOUND ]
 
[+] Squid Support
------------------------------------
    - Checking running Squid daemon [ NOT FOUND ]
 
[+] Logging and files
------------------------------------
    - Checking for a running log daemon [ OK ]
      - Checking Syslog-NG status [ NOT FOUND ]
      - Checking systemd journal status [ FOUND ]
      - Checking Metalog status [ NOT FOUND ]
      - Checking RSyslog status [ FOUND ]
      - Checking RFC 3195 daemon status [ NOT FOUND ]
      - Checking minilogd instances [ NOT FOUND ]
    - Checking logrotate presence [ OK ]
    - Checking log directories (static list) [ DONE ]
    - Checking open log files [ SKIPPED ]
 
[+] Insecure services
------------------------------------
    - Checking inetd status [ NOT ACTIVE ]
 
[+] Banners and identification
------------------------------------
    - /etc/issue [ FOUND ]
      - /etc/issue contents [ WEAK ]
    - /etc/issue.net [ FOUND ]
      - /etc/issue.net contents [ WEAK ]
 
[+] Scheduled tasks
------------------------------------
    - Checking crontab/cronjob [ 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 ]
 
[+] Cryptography
------------------------------------
    - Checking for expired SSL certificates [ NONE ]
 
[+] Virtualization
------------------------------------
 
[+] Containers
------------------------------------
 
[+] Security frameworks
------------------------------------
    - Checking presence AppArmor [ NOT FOUND ]
    - Checking presence SELinux [ NOT FOUND ]
    - Checking presence grsecurity [ NOT FOUND ]
    - Checking for implemented MAC framework [ NONE ]
 
[+] Software: file integrity
------------------------------------
    - Checking file integrity tools
    - Checking presence integrity tool [ NOT FOUND ]
 
[+] Software: System tooling
------------------------------------
    - Checking automation tooling
    - Automation tooling [ NOT FOUND ]
    - Checking for IDS/IPS tooling [ NONE ]
 
[+] Software: Malware
------------------------------------
 
[+] File Permissions
------------------------------------
    - Starting file permissions check
      /etc/lilo.conf [ NOT FOUND ]
      /root/.ssh [ NOT FOUND ]
 
[+] Home directories
------------------------------------
    - Checking shell history files [ OK ]
 
[+] Kernel Hardening
------------------------------------
    - Comparing sysctl key pairs with scan profile
      - kernel.core_uses_pid (exp: 1) [ DIFFERENT ]
      - kernel.ctrl-alt-del (exp: 0) [ OK ]
      - kernel.kptr_restrict (exp: 2) [ DIFFERENT ]
      - kernel.randomize_va_space (exp: 2) [ OK ]
      - kernel.sysrq (exp: 0) [ DIFFERENT ]
      - net.ipv4.conf.all.accept_redirects (exp: 0) [ DIFFERENT ]
      - net.ipv4.conf.all.accept_source_route (exp: 0) [ OK ]
      - net.ipv4.conf.all.bootp_relay (exp: 0) [ OK ]
      - net.ipv4.conf.all.forwarding (exp: 0) [ OK ]
      - net.ipv4.conf.all.log_martians (exp: 1) [ DIFFERENT ]
      - net.ipv4.conf.all.mc_forwarding (exp: 0) [ OK ]
      - net.ipv4.conf.all.proxy_arp (exp: 0) [ OK ]
      - net.ipv4.conf.all.rp_filter (exp: 1) [ DIFFERENT ]
      - net.ipv4.conf.all.send_redirects (exp: 0) [ DIFFERENT ]
      - net.ipv4.conf.default.accept_redirects (exp: 0) [ DIFFERENT ]
      - net.ipv4.conf.default.accept_source_route (exp: 0) [ DIFFERENT ]
      - net.ipv4.conf.default.log_martians (exp: 1) [ DIFFERENT ]
      - net.ipv4.icmp_echo_ignore_broadcasts (exp: 1) [ OK ]
      - net.ipv4.icmp_ignore_bogus_error_responses (exp: 1) [ OK ]
      - net.ipv4.tcp_syncookies (exp: 1) [ OK ]
      - net.ipv4.tcp_timestamps (exp: 0) [ DIFFERENT ]
      - net.ipv6.conf.all.accept_redirects (exp: 0) [ DIFFERENT ]
      - net.ipv6.conf.all.accept_source_route (exp: 0) [ OK ]
      - net.ipv6.conf.default.accept_redirects (exp: 0) [ DIFFERENT ]
      - net.ipv6.conf.default.accept_source_route (exp: 0) [ OK ]
 
[+] Hardening
------------------------------------
      - Installed compiler(s) [ FOUND ]
      - Installed malware scanner [ NOT FOUND ]
      - Installed malware scanner [ NOT FOUND ]
 
[+] Custom Tests
------------------------------------
    - Running custom tests...  [ NONE ]
 
[+] Plugins (phase 2)
------------------------------------
 
================================================================================
 
  -[ Lynis 2.4.0 Results ]-
 
  Warnings (3):
  ----------------------------
  ! Version of Lynis is very old and should be updated [LYNIS] 
      https://cisofy.com/controls/LYNIS/
 
  ! Can't find any security repository in /etc/apt/sources.list or sources.list.d directory [PKGS-7388] 
      https://cisofy.com/controls/PKGS-7388/
 
  ! iptables module(s) loaded, but no rules active [FIRE-4512] 
      https://cisofy.com/controls/FIRE-4512/
 
  Suggestions (43):
  ----------------------------
  * Install libpam-tmpdir to set $TMP and $TMPDIR for PAM sessions [CUST-0280] 
      https://your-domain.example.org/controls/CUST-0280/
 
  * Install libpam-usb to enable multi-factor authentication for PAM sessions [CUST-0285] 
      https://your-domain.example.org/controls/CUST-0285/
 
  * Install apt-listbugs to display a list of critical bugs prior to each APT installation. [CUST-0810] 
      https://your-domain.example.org/controls/CUST-0810/
 
  * Install debian-goodies so that you can run checkrestart after upgrades to determine which services are using old versions of libraries and need restarting. [CUST-0830] 
      https://your-domain.example.org/controls/CUST-0830/
 
  * Install needrestart, alternatively to debian-goodies, so that you can run needrestart after upgrades to determine which daemons are using old versions of libraries and need restarting. [CUST-0831] 
      https://your-domain.example.org/controls/CUST-0831/
 
  * Install debsecan to generate lists of vulnerabilities which affect this installation. [CUST-0870] 
      https://your-domain.example.org/controls/CUST-0870/
 
  * Install debsums for the verification of installed package files against MD5 checksums. [CUST-0875] 
      https://your-domain.example.org/controls/CUST-0875/
 
  * Install fail2ban to automatically ban hosts that commit multiple authentication errors. [DEB-0880] 
      https://cisofy.com/controls/DEB-0880/
 
  * Use a PAE enabled kernel when possible to gain native No eXecute/eXecute Disable support [KRNL-5677] 
      https://cisofy.com/controls/KRNL-5677/
 
  * Discover why /vmlinuz is missing. Consider manually re-linking. [KRNL-5788] 
      https://cisofy.com/controls/KRNL-5788/
 
  * Check the output of apt-cache policy manually to determine why output is empty [KRNL-5788] 
      https://cisofy.com/controls/KRNL-5788/
 
  * Install a PAM module for password strength testing like pam_cracklib or pam_passwdqc [AUTH-9262] 
      https://cisofy.com/controls/AUTH-9262/
 
  * Configure minimum password age in /etc/login.defs [AUTH-9286] 
      https://cisofy.com/controls/AUTH-9286/
 
  * Configure maximum password age in /etc/login.defs [AUTH-9286] 
      https://cisofy.com/controls/AUTH-9286/
 
  * Default umask in /etc/login.defs could be more strict like 027 [AUTH-9328] 
      https://cisofy.com/controls/AUTH-9328/
 
  * To decrease the impact of a full /home file system, place /home on a separated partition [FILE-6310] 
      https://cisofy.com/controls/FILE-6310/
 
  * To decrease the impact of a full /tmp file system, place /tmp on a separated partition [FILE-6310] 
      https://cisofy.com/controls/FILE-6310/
 
  * To decrease the impact of a full /var file system, place /var on a separated partition [FILE-6310] 
      https://cisofy.com/controls/FILE-6310/
 
  * 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/
 
  * Install debsums utility for the verification of packages with known good database. [PKGS-7370] 
      https://cisofy.com/controls/PKGS-7370/
 
  * Consider running ARP monitoring software (arpwatch,arpon) [NETW-3032] 
      https://cisofy.com/controls/NETW-3032/
 
  * Consider hardening SSH configuration [SSH-7408] 
    - Details  : AllowTcpForwarding (YES --> NO)
      https://cisofy.com/controls/SSH-7408/
 
  * Consider hardening SSH configuration [SSH-7408] 
    - Details  : ClientAliveCountMax (3 --> 2)
      https://cisofy.com/controls/SSH-7408/
 
  * Consider hardening SSH configuration [SSH-7408] 
    - Details  : Compression (YES --> NO)
      https://cisofy.com/controls/SSH-7408/
 
  * Consider hardening SSH configuration [SSH-7408] 
    - Details  : LogLevel (INFO --> VERBOSE)
      https://cisofy.com/controls/SSH-7408/
 
  * Consider hardening SSH configuration [SSH-7408] 
    - Details  : MaxAuthTries (6 --> 1)
      https://cisofy.com/controls/SSH-7408/
 
  * Consider hardening SSH configuration [SSH-7408] 
    - Details  : MaxSessions (10 --> 2)
      https://cisofy.com/controls/SSH-7408/
 
  * Consider hardening SSH configuration [SSH-7408] 
    - Details  : PermitRootLogin (WITHOUT-PASSWORD --> NO)
      https://cisofy.com/controls/SSH-7408/
 
  * Consider hardening SSH configuration [SSH-7408] 
    - Details  : Port (22 --> )
      https://cisofy.com/controls/SSH-7408/
 
  * Consider hardening SSH configuration [SSH-7408] 
    - Details  : TCPKeepAlive (YES --> NO)
      https://cisofy.com/controls/SSH-7408/
 
  * Consider hardening SSH configuration [SSH-7408] 
    - Details  : X11Forwarding (YES --> NO)
      https://cisofy.com/controls/SSH-7408/
 
  * Consider hardening SSH configuration [SSH-7408] 
    - Details  : AllowAgentForwarding (YES --> NO)
      https://cisofy.com/controls/SSH-7408/
 
  * Add a legal banner to /etc/issue, to warn unauthorized users [BANN-7126] 
      https://cisofy.com/controls/BANN-7126/
 
  * Add legal banner to /etc/issue.net, to warn unauthorized users [BANN-7130] 
      https://cisofy.com/controls/BANN-7130/
 
  * Enable process accounting [ACCT-9622] 
      https://cisofy.com/controls/ACCT-9622/
 
  * Enable sysstat to collect accounting (no results) [ACCT-9626] 
      https://cisofy.com/controls/ACCT-9626/
 
  * Enable auditd to collect audit information [ACCT-9628] 
      https://cisofy.com/controls/ACCT-9628/
 
  * Install a file integrity tool to monitor changes to critical and sensitive files [FINT-4350] 
      https://cisofy.com/controls/FINT-4350/
 
  * 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] 
      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 : 57 [###########         ]
  Tests performed : 203
  Plugins enabled : 1
 
  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 update available
  Current version : 240    Latest version : 257
================================================================================
 
  Lynis 2.4.0
 
  Auditing, system hardening, and compliance for UNIX-based systems
  (Linux, macOS, BSD, and others)
 
  2007-2016, CISOfy - https://cisofy.com/lynis/
  Enterprise support available (compliance, plugins, interface and tools)
 
================================================================================
 
  [TIP]: Enhance Lynis audits by adding your settings to custom.prf (see /etc/lynis/default.prf for all settings)

We can see that we are granted a score of 57. We should take this score with a grain of salt, but a rule of thumb, the higher the better, and a score of around 80 is very decent.

We can see that some of these warnings are taylored towards fat x86 servers and might not make sense in our home ARM setups where we don’t have resources to spare, and we have some different constrains and usage cases.

As with anything else in security, there are compromises to me made between security and inconvenience. For this reason, I add these rules to my custom profile custom.prf

# Won't install apt-listbugs and all its ruby dependencies
skip-test=CUST-0810

# Won't install puppet or similar
skip-test=TOOL-5002

# Raspbian doesn't have security sources ( https://www.raspberrypi.org/forums/viewtopic.php?t=98006&p=680175 )
skip-test=PKGS-7388

# We have a preset partition scheme in the SD card
skip-test=FILE-6310

# We don't use firewire
skip-test=STRG-1846

# We use USB in NCP
skip-test=STRG-1840

# Won't recompile kernel to support auditd
skip-test=ACCT-9628

# Won't be protected against DDOS in self-hosting, will save the resources
skip-test=HTTP-6640
skip-test=HTTP-6641

# vmlinuz missing at least in Raspbian
skip-test=KRNL-5788

# won't recompile kernels for PAE NX
skip-test=KRNL-5677

For NextCloudPi, the system is a bit different from plain Raspbian, so you can check a more customized profile here.

Currently, NextCloudPi has a 79 hardening score. References