22 Oct |
|
Linux Security: Secure LoggingLOGGING: It's needed!!!!!!!!!Logging is one of the keys to keeping your system secure. The syslog keeps you informed on *just about* everything going on. I'm gonna show you how to setup additional logging. You should also look into setting up a remote logging host( if possible). NOTE: This additional logging will not change the existing log files at all, so this is by no means a "risky" move. First lets open up /etc/syslog.conf, it'll look something like this... # /etc/syslog.conf Now what we're gonna do is add some lines at the bottom. Please make sure the tty(s) listed below are available, do so by hitting alt-F*, * being the tty number if the tty is blank it's free... Also keep in mind that tty7 by default on most distros is reserved for your X screen. Now to add the lines: Process accounting: What'd you do fool ? Linux has the ability to log which commands are run when and by whom. This is extremely useful in trying to reconstruct what a potential cracker actually ran. The drawbacks are that the logs get large quickly (a log rotate module is included to offset this), the parameters to commands are not recorded, and, like all log files, the accounting log is removable if the attacker has root. As this is rather disk and CPU intensive, don't go this route unless you have carefully considered this option. How we do it... first lets put in a module for logrotate so that the logs don't get filled up too fast and take up way too much space. Open up /etc/logrotate.conf Now if you're gonna use proccess accounting might as well have it start up on boot right ? So add these lines to rc.local(usually in /etc/rc.d). touch /var/log/security/pacct.log
|















Legitcode.com : All Rights Reserved