Essential Linux Security Checklist: 11 Steps to Detect Compromise
This guide provides a comprehensive 11‑step Linux security inspection checklist, covering account verification, log analysis, process and file checks, package integrity, network monitoring, scheduled tasks, backdoor detection, kernel modules, services, and rootkit scanning to help identify system compromises.
1. Check Accounts
# less /etc/passwd # grep :0: /etc/passwd # ls -l /etc/passwd # awk -F: '$3==0 {print $1}' /etc/passwd # awk -F: 'length($2)==0 {print $1}' /etc/shadow2. Check Logs # last Note: look for "entered promiscuous mode", error messages, and RPC logs with unusually long or garbled entries.
3. Check Processes
# ps -aux # lsof -p <pid> # cat /etc/inetd.conf | grep -v '^#'Check for hidden processes:
# ps -ef | awk '{print $1}' | sort -n | uniq >1 # ls /proc | sort -n | uniq >2 # diff 1 24. Check Files
# find / -uid 0 -perm -4000 -print # find / -size +10000k -print # find / -name "*" -printWatch for SUID files, large (>10 MB) or oddly named files, and core dumps: # find / -name core -exec ls -l {} \; Verify package ownership:
# rpm -qf /bin/ls # rpm -qf /bin/loginCompute checksums:
# md5sum -b <filename> # md5sum -t <filename>5. Check RPM Integrity # rpm -Va Output flags:
S – file size differs
M – mode (permissions) differs
5 – MD5 sum differs
D – device number mismatch
L – readlink path mismatch
U – user ownership differs
G – group ownership differs
T – modification time differs
Pay special attention to binaries in /sbin, /bin, /usr/sbin, and /usr/bin.
6. Check Network
# ip link | grep PROMISC # lsof -i # netstat -nap # arp -a7. Check Scheduled Tasks
Watch for root or UID‑0 cron jobs:
# crontab -u root -l # cat /etc/crontab # ls /etc/cron.*8. Check Backdoors
# cat /etc/crontab # ls /var/spool/cron/ # cat /etc/rc.d/rc.local # ls /etc/rc.d # ls /etc/rc3.d # find / -type f -perm 40009. Check Kernel Modules # lsmod 10. Check System Services
# chkconfig # rpcinfo -p11. Check for Rootkits
# rkhunter -c # chkrootkit -qSigned-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
MaGe Linux Operations
Founded in 2009, MaGe Education is a top Chinese high‑end IT training brand. Its graduates earn 12K+ RMB salaries, and the school has trained tens of thousands of students. It offers high‑pay courses in Linux cloud operations, Python full‑stack, automation, data analysis, AI, and Go high‑concurrency architecture. Thanks to quality courses and a solid reputation, it has talent partnerships with numerous internet firms.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
