Skip to content

Security scanning

Checking your own servers from the outside and the inside: open ports and services, hardening, rootkits and malware, changed system files and vulnerable container images.

Basics: Attack surface, what each tool finds, what to install, and the rules for scanning

From outside

  • nmap


    Open ports, services and versions.

  • nikto


    Known problems of a web server.

Checking the hardening

  • lynis


    Security audit with suggestions.

Intrusions and malware

Integrity

  • aide


    Report changed system files.

  • debsums


    Compare files with their packages.

Containers

  • trivy


    Vulnerabilities in images.

From other chapters

  • ss


    ss -tlnp shows from inside which services listen on which port. Covered in the chapter Network.

  • nc


    Test a single port by hand, without a full scan. Covered in the chapter Network.

  • tcpdump


    See which packets really arrive during a scan. Covered in the chapter Network.

  • ufw


    Close the ports that a scan shows but nobody needs. Covered in the chapter Network.

  • fail2ban-client


    Block hosts that scan or try passwords. Covered in the chapter SSH.