2. Sign up for feedback loops for SpamCop [ http://www.
spamcop.net/fom-serve/cache/94.html ] and AOL [ http://
postmaster.aol.com/Postmaster.FeedbackLoop.php ]. When someone complains that they received spam from your server(s), you can be notified at the soonest, hopefully prior to being blacklisted.
3. Can you spot the problem here? --
[root@host ~]# w 22:57:35 up 69 days, 8:10, 3 users, load average: 0.00, 0.00, 0.00 USER
TTY FROM
WHAT user1 ttyp0 192.168.75.37 19:11
-bash user2 ttyp2 10.247.32.29 19:11
-bash --
[root@host ~]# ps aux | grep ssh[d] root
sshd: root@notty root
3458 0.0 0.1 65236 3048 ? 24220 0.0 0.0 63568 1192 ?
sbin/sshd user1 24222 0.0 0.1 65380 3080 ?
sshd: user1@ttyp0 user2 24264 0.0 0.1 65236 3068 ?
sshd: user2@ttyp2 --
"w" shows 2 users logged in, but the process list shows 3 sshd processes for users. There are in fact 3 separate logins. Thus, there is a root login that is not shown by the "w" command, as evidenced by process ID 3458.
4. /proc/net/dev can be used to monitor packets per second inbound and outbound for each active interface. /proc/loadavg can be used to monitor server load. /proc/meminfo can be used to monitor memory and swap usage. The /proc directory contains a list of each process ID.
Monitor all of these things with specified thresholds and you've got a nice monitoring system to alert you of any possible suspicious activity:
web6.example.com: [L: 4] [P: 403] [Swap Use: 4%] [pps In: 66 Out: 74]
vps1.example.com: [pps In: 46 Out: 38803]
vps4.example.com: [pps In: 8160 Out: 97]
062 For more information visit
www.cPanel.net Ss 22:48 0:00
Ss 19:11 0:00 /usr/ Ss 19:11 0:00 Ss 19:11 0:00
LOGIN@ IDLE JCPU PCPU 0.00s 0.09s 0.09s 1:43m 0.01s 0.01s
5. Monitor traffic to privileged ports that isn't associated with a known service, even if you have a firewall that prevents such traffic.
6. Monitor high port to high port traffic that isn't associated with FTP, even if you have a firewall that prevents such traffic.
7. Learn how to use the File::Tail perl module so that you can monitor logs or other files. Be careful, however, as log data can sometimes be trivially spoofed.
One application of this would be to create modsec rules that log information associated with attacks. For example, the case insensitive string "UNION" followed by the case insensitive string "SELECT", with any amount of whitespace, comments, etc in between. Have your script alert you if that string is observed in the log.
8. Other items that can be monitored:
files that store ssh keys (has the timestamp or filesize changed?)
files that store reseller privileges (has a reseller been granted the "all" privilege, providing them with complete root access?) various logs for things like new ssh keys being added, jailshell access being disabled, etc.
monitor that your firewall is up (this can be done locally and/or remotely)
monitor exim_mainlog for known replies from remote mailservers that are refusing email from your server. This could indicate that you have been blacklisted.
monitor exim_mainlog for emails sent to numerous recipients. This can be done by counting the number of times that the "@" symbol appears on a single log line, while filtering legitimate mailing list traffic.
monitor the process list for items containing "./".
Your business can be attacked over the Internet in many ways, and there are numerous simple ways in which these things can be detected and prevented. Spending a little time learning a programming language will allow you to create an infinitely superior system than exists freely in the form of a downloadable script, or for a fee from a systems administration service. Additionally, learning to code will open the door for finding bugs - security related or otherwise - and there is certainly no shortage of bugs to be found.P!
Page 1 |
Page 2 |
Page 3 |
Page 4 |
Page 5 |
Page 6 |
Page 7 |
Page 8 |
Page 9 |
Page 10 |
Page 11 |
Page 12 |
Page 13 |
Page 14 |
Page 15 |
Page 16 |
Page 17 |
Page 18 |
Page 19 |
Page 20 |
Page 21 |
Page 22 |
Page 23 |
Page 24 |
Page 25 |
Page 26 |
Page 27 |
Page 28 |
Page 29 |
Page 30 |
Page 31 |
Page 32 |
Page 33 |
Page 34 |
Page 35 |
Page 36 |
Page 37 |
Page 38 |
Page 39 |
Page 40 |
Page 41 |
Page 42 |
Page 43 |
Page 44 |
Page 45 |
Page 46 |
Page 47 |
Page 48 |
Page 49 |
Page 50 |
Page 51 |
Page 52 |
Page 53 |
Page 54 |
Page 55 |
Page 56 |
Page 57 |
Page 58 |
Page 59 |
Page 60 |
Page 61 |
Page 62 |
Page 63 |
Page 64 |
Page 65 |
Page 66 |
Page 67 |
Page 68