Most servers run Linux. Securing them is a core blue-team skill.
Linux permissions are user / group / other, each with read (r) / write (w) / execute (x):
1$ ls -l secret.txt
2-rw-r----- 1 alice finance 1024 Jun 4 10:00 secret.txt
3# └┬┘└┬┘└┬┘
4# user grp otherchmod 640 secret.txt → owner rw, group r, others nothing.chown alice:finance secret.txt → set owner/group.chmod 777 grants everyone full control — a frequent and serious misconfiguration. Grant the least permission that works.
/var/log/auth.log)./etc/sudoers to specific commands.apt upgrade / dnf update; automate security updates.systemctl disable --now <svc>; smaller attack surface.PermitRootLogin no).PasswordAuthentication no).fail2ban to throttle brute force.ufw / firewalld with default-deny inbound.auditd to log security-relevant events.| File | Purpose |
|---|---|
/etc/passwd | User accounts (no passwords here) |
/etc/shadow | Hashed passwords (root-only) |
/etc/sudoers | Who can sudo what |
/var/log/auth.log | Authentication events |
~/.ssh/authorized_keys | Permitted SSH public keys |
Files with the SUID bit run with the file owner's privileges. A misconfigured SUID-root binary is a classic local privilege-escalation path. Audit them:
1find / -perm -4000 -type f 2>/dev/null # list SUID binariesA hardened Linux box does the minimum: minimal packages, minimal open ports, minimal privileges, maximal logging. Every service you don't run is a vulnerability you don't have.