230 PDF
230 PDF
230 PDF
Normal accounts will be there, but look for new, analyze its security status in more detail. SANS Institute
www.sans.org and isc.sans.org
unexpected accounts, especially with UID < 500. Each is available for free download at the Download the latest version of this sheet from
http://www.sans.org/resources/linsacheatsheet.pdf
Look at all running processes: Look for processes running out of or accessing files Look for unusual port listeners:
# ps –aux that have been unlinked (i.e., link count is zero). An # netstat –nap
attacker may be hiding data in or running a backdoor
Get familiar with "normal" processes for the machine. from such files: Get more details about running processes listening
Look for unusual processes. Focus on processes with # lsof +L1 on ports:
root (UID 0) privileges. # lsof –i
On a Linux machine with RPM installed (RedHat,
If you spot a process that is unfamiliar, investigate in Mandrake, etc.), run the RPM tool to verify packages: These commands require knowledge of which TCP
more detail using: # rpm –Va | sort and UDP ports are normally listening on your
# lsof –p [pid] This checks size, MD5 sum, permissions, type, system. Look for deviations from the norm.
owner, and group of each file with information from
This command shows all files and ports used by the RPM database to look for changes. Output includes: Look for unusual ARP entries, mapping IP address to
running process. S – File size differs MAC addresses that aren’t correct for the LAN:
M – Mode differs (permissions) # arp –a
If your machine has it installed, run chkconfig to see 5 – MD5 sum differs
which services are enabled at various runlevels: D – Device number mismatch This analysis requires detailed knowledge of which
# chkconfig --list L – readLink path mismatch addresses are supposed to be on the LAN. On a
U – user ownership differs small and/or specialized LAN (such as a DMZ), look
Unusual Files G – group ownership differs for unexpected IP addresses.
T – modification time differs
Look for unusual SUID root files:
# find / -uid 0 –perm -4000 –print Pay special attention to changes associated with Unusual Scheduled Tasks
This requires knowledge of normal SUID files. items in /sbin, /bin, /usr/sbin, and /usr/bin.
Look for cron jobs scheduled by root and any other
Look for unusual large files (greater than 10 In some versions of Linux, this analysis is automated UID 0 accounts:
MegaBytes): by the built-in check-packages script.
# find / -size +10000k –print
# crontab –u root –l
Unusual Network Usage
This requires knowledge of normal large files.
Look for promiscuous mode, which might indicate a Look for unusual system-wide cron jobs:
Look for files named with dots and spaces ("...", ".. ", sniffer:
# cat /etc/crontab
". ", and " ") used to camouflage files: # ls /etc/cron.*
# find / -name " " –print # ip link | grep PROMISC
# find / -name ".. " –print
# find / -name ". " –print Note that the ifconfig doesn’t work reliably for
# find / -name " " –print detecting promiscuous mode on Linux kernel 2.4, so
please use "ip link" for detecting it.