Get a Pentest and security assessment of your IT network.

Cyber Security

Linux Attacks: What You Need to Know

TL;DR

Yes, there are attacks specifically targeting Linux systems. While often considered more secure ‘out of the box’ than Windows, Linux isn’t immune. This guide covers common threats and how to protect yourself.

Common Linux Attacks & How To Protect Yourself

  1. Privilege Escalation: Attackers try to gain root access from a normal user account.
    • Exploiting SUID/SGID Binaries: Programs with these permissions can be misused.
    • Kernel Exploits: Vulnerabilities in the Linux kernel itself are very powerful.
    • Misconfigured sudo: Allowing users unnecessary root access.

    Protection:

    • Regularly audit SUID/SGID binaries using commands like find / -perm +4000 (for SUID) and find / -perm +2000 (for SGID). Review what these programs do.
    • Keep your kernel updated! Use your distribution’s package manager:
      sudo apt update && sudo apt upgrade

      (Debian/Ubuntu), or

      sudo yum update

      (CentOS/RHEL)

    • Carefully configure sudoers file using visudo. Grant only necessary permissions and avoid wildcards.
  2. Malware: Linux malware exists, though it’s less prevalent than Windows malware.
    • Rootkits: Hide malicious activity from detection.
    • Backdoors: Allow remote access to the system.
    • Cryptominers: Use your resources to mine cryptocurrency without your consent.

    Protection:

    • Install a reputable anti-malware scanner like ClamAV:
      sudo apt install clamav clamav-daemon

      . Run regular scans.

    • Keep software updated to patch vulnerabilities.
    • Be cautious about running untrusted scripts or binaries.
  3. Denial of Service (DoS) & Distributed Denial of Service (DDoS): Overwhelm the system with traffic.

    Protection:

    • Use a firewall like iptables or ufw to limit incoming connections.
    • Consider using DDoS mitigation services if you are publicly accessible.
    • Rate limiting can help block excessive requests.
  4. Brute-Force Attacks: Trying many passwords until one works.

    Protection:

    • Use strong, unique passwords for all accounts.
    • Disable password authentication and use SSH keys instead.
    • Implement fail2ban to automatically block repeated failed login attempts:
      sudo apt install fail2ban

      .

    • Consider two-factor authentication (2FA).
  5. Exploiting Vulnerable Services: Attacks targeting specific services like SSH, Apache, or databases.

    Protection:

    • Keep all services updated.
    • Configure firewalls to only allow necessary ports and connections.
    • Regularly scan for vulnerabilities using tools like Nessus or OpenVAS.
  6. Supply Chain Attacks: Compromising software dependencies.

    Protection:

    • Verify the integrity of downloaded packages and software.
    • Use trusted repositories.
    • Be aware of potential vulnerabilities in your dependencies.

Key cyber security Practices

Regardless of the specific attack, these practices are vital:

  • Regular Updates: Patching is crucial!
  • Strong Passwords & Authentication: Make them hard to guess and use multi-factor where possible.
  • Firewall Configuration: Only allow necessary traffic.
  • Monitoring & Logging: Detect suspicious activity early.
  • Regular Backups: So you can recover if something goes wrong.
Related posts
Cyber Security

Zip Codes & PII: Are They Personal Data?

Cyber Security

Zero-Day Vulnerabilities: User Defence Guide

Cyber Security

Zero Knowledge Voting with Trusted Server

Cyber Security

ZeroNet: 51% Attack Risks & Mitigation