Google the SiteQuicksearchCategoriesSyndicate This BlogCreative CommonsBlog Administration |
Wednesday, January 17. 2007Installing Exim, SASLAuthd, ClamAV and SpamAssassin on FreeBSD 6.2
Introduction
This article describes the steps necessary to install and configure Exim on FreeBSD 6.2 with support for the following:
spam detection and quarantine using SpamAssassin malware detection and quarantine using ClamAV Each of the required 'dependencies' or components will be installed and configured, Exim will be installed and configured and finally we will test to check each component is working as required. With regards to spam and malware scanning, the system described will quarantine any files/messages that it finds classified as spam or malware. In this way the quarantined files can be checked over by the admin at a later date and various stats gathering can be done if required. Installing and Configuring SASLAuthd SASLAuthd is an authentication daemon that can handle authentication requests from 3rd party applications such as Exim - generally for any application that can't directly access a system password database because of permission restrictions. In this case running Exim MTA as 'root' is a potential security risk, so exim runs as the 'mailnull' user on FreeBSD. Unfortunately this means Exim can't easily read the system password database to authenticate users who want to send mail via the server, which is where SASLAuthd comes in. Any requests for authentication with Exim are passed on to the SASLAuthd daemon which will then verify whether the user credentials are valid - if so, the email is delivered, if not, it's rejected.
CODE: root@win /root# cd /usr/ports/security/cyrus-sasl2-saslauthd/ root@win /usr/ports/security/cyrus-sasl2-saslauthd# make install ... root@win /usr/ports/security/cyrus-sasl2-saslauthd# rehash Configure SASLAuthd to run at boot. Edit /etc/rc.conf to include the following: CODE: saslauthd_enable="YES" saslauthd_flags="-a getpwent" Note: SASLAuthd will run using the 'getpwent' authentication mechanism with the flag above. This method uses the passwd file directly instead of using other means like kerberos or PAM. If you require another method, check the manpage for saslauthd. Start the SASLAuthd daemon running: CODE: root@win /usr/ports/security/cyrus-sasl2-saslauthd# cd /usr/local/etc/rc.d root@win /usr/local/etc/rc.d# ./saslauthd start (Optional) Test the SASLAuthd daemon: Substitute 'user' and 'pass' for the username and password of a user account on your system: CODE: root@win /usr/local/etc/rc.d# testsaslauthd -u user -p pass 0: OK "Success." Installing and Configuring SpamAssassin SpamAssassin (SA) is one solution to the problem of spam. SA can run as a daemon (spamd) in the background and accept requests from an MTA such as Exim to check whether an email message should be classified as spam. Spamd looks at the message and checks for various factors that make the message more or less likely to be spam and assigns the message a score based on what it finds. Spamd will then reply to the MTA, telling it the spam score that it gave that message. The MTA can then decide - based on that score - whether to accept/reject the message - or in the case of this guide whether to instead quarantine the message.
Note: There are various installation options you can choose when installing SA which you should see when you first run 'make install' in the SA port directory. To see the options after already configuring them you can run 'make config'. In turn, each of SA's dependencies may also have options you can configure at install time. To write this guide I'm only using the single option 'AS_ROOT' in the SA install configuation and for the other items generally just choose the defaults. CODE: root@win /root# cd /usr/ports/mail/p5-Mail-SpamAssassin/ root@win /usr/ports/mail/p5-Mail-SpamAssassin# make install Once complete, you should see: CODE: ************************************************************************* * _ _____ _____ _____ _ _ _____ ___ ___ _ _ * * / \|_ _|_ _| ____| \ | |_ _|_ _/ _ \| \ | | * * / _ \ | | | | | _| | \| | | | | | | | | \| | * * / ___ \| | | | | |___| |\ | | | | | |_| | |\ | * * /_/ \_\_| |_| |_____|_| \_| |_| |___\___/|_| \_| * * * * See /usr/local/share/doc/p5-Mail-SpamAssassin/INSTALL, * * and /usr/local/share/doc/p5-Mail-SpamAssassin/UPGRADE, * * or http://spamassassin.org/dist/INSTALL and * * http://spamassassin.org/dist/UPGRADE BEFORE enabling * * this version of SpamAssassin for important information * * regarding changes in this version. * ************************************************************************* It's a good idea to read the files listed in the banner above. SA has a large number of options that can be configured; a good place to start configuring options on FreeBSD is in /usr/local/etc/mail/spamassassin/. Configure SA to run at boot. Edit /etc/rc.conf to include the following: CODE: spamd_enable="YES" Start SA spamd. We can now go on to actually start spamd running as a daemon and verify spamd started ok: CODE: root@win /root# cd /usr/local/etc/rc.d root@win /usr/local/etc/rc.d# rehash root@win /usr/local/etc/rc.d# ./sa sa-spamd* saslauthd* root@win /usr/local/etc/rc.d# ./sa-spamd start Starting spamd. munk@win /usr/local/etc/rc.d# ./sa-spamd status spamd is running as pid 754. This tells us spamd is running ok in the background. Installing and Configuring ClamAV ClamAV is an anti-virus suite and includes a daemon clamd (runs in the background to check for requests to test for virii), another daemon freshclam (updates the virus definition database) and a couple of clients to run on the commandline if you need them for local virus scanning. Exim will send requests to the clamd server in much the same was as spamd does - if clamd classifies a message as containing a virus, Exim will reject delivery of the message and instaed quarantine it.
CODE: root@win /root# cd /usr/ports/security/clamav root@win /usr/ports/security/clamav# make install Configure ClamAV to start at boot time. Edit /etc/rc.conf to include: CODE: clamav_clamd_enable="YES" clamav_freshclam_enable="YES" Configure clamd. Edit /usr/local/etc/clamd.conf to include the following: CODE: LogFile /var/log/clamav/clamd.log PidFile /var/run/clamav/clamd.pid DatabaseDirectory /var/db/clamav LocalSocket /var/run/clamav/clamd FixStaleSocket User clamav AllowSupplementaryGroups ScanMail ScanArchive Start clamd and freshclam. CODE: root@win /root# cd /usr/local/etc/rc.d root@win /usr/local/etc/rc.d# ./clamav-clamd start Starting clamav_clamd. root@win /usr/local/etc/rc.d# ./clamav-freshclam start Starting clamav_freshclam. Note: You may see the following message on first running clamd: CODE: LibClamAV Warning: ************************************************** LibClamAV Warning: *** The virus database is older than 7 days. *** LibClamAV Warning: *** Please update it IMMEDIATELY! *** LibClamAV Warning: ************************************************** As long as you're running freshclam, you can safely ignore this message. Freshclam should update your definitions automatically. Be sure to configure freshclam to update the virus definitions regularly. ClamAV should be configured now and ready to accept request to check for malware from the Exim MTA. We can now move on finally to install and configure Exim. Installing and Configuring Exim Exim configuration can be very complicated. This guide will only deal with the configuration of Exim so it accepts mail on a domain 'mail.example.com', scans the mail for malware/spam - quarantining anything it finds as malware/spam and accepts authentication requests correctly. Important: Ensure your mail server's DNS is configured correctly and preferably has a reverse DNS record (rDNS) set up. Many mail servers will not deliver mail correctly to/from your mail server without rDNS.
CODE: [12:10:57] root@win /root# cd /usr/ports/mail/exim [12:12:30] root@win /usr/ports/mail/exim# make -DWITH_CONTENT_SCAN -DWITH_SASLAUTHD install Stop the Sendmail daemon if it's already running: CODE: root@win /root# cd /etc/rc.d root@win /etc/rc.d# ./sendmail stop Configure Exim to run at boot time. Edit /etc/rc.conf to include: CODE: sendmail_enable="NO" sendmail_submit_enable="NO" sendmail_outbound_enable="NO" sendmail_msp_queue_enable="NO" exim_enable="YES" This has the effect of disabling sendmail at boot time - the default FreeBSD MTA - and running Exim instead. Configure mailer.conf to use Exim as the default MTA. Edit /etc/mail/mailer.conf to read: CODE: sendmail /usr/local/sbin/exim send-mail /usr/local/sbin/exim mailq /usr/local/sbin/exim -bp newaliases /usr/bin/true This will allow any FreeBSD base system mail related commands to use Exim instead of Sendmail. Configuring Exim We now move on to configuring Exim.
CODE: av_scanner = clamd:/var/run/clamav/clamd spamd_address = 127.0.0.1 783 Configure the malware and spam Access Control Lists (ACLs). How malware/spam checking works in this system: We add a check in the acl_check_data ACL for spam and malware. Exim will request each email is checked for spam/malware by the relevant daemon - spamd for spam, clamd for malware. If the message is classified as spam/malware by the relevant daemons, Exim will add a header to the message 'X-Quarantine-Me-Spam' (similar for malware). Later on when it comes to actually delivering (termed 'routing' in Exim terminology), we add two routers to test for the existence of the headers that are added in the acl_check_data ACL if a message is found to be spam/malware. If the headers are found by the malware/spam routers, the message is not delivered but instead copied to a quarantine location on disk. This quarantine location can then be checked later by an admin to check if anything is amiss - ie regular non spam/malware mail that should really have been delivered. Once you're satisfied the configuration is working as it should - ie after a few months of operation - and not finding false positives, you can change the malware/spam acl checks to just deny instead of adding the quarantine headers. Having said that, I still opt to just quarantine malware/spam and remove it at a later date. On to configuring the data ACL: Modify the acl_check_data ACL to read/include: CODE: acl_check_data: # Deny if the message contains a virus. Before enabling this check, you # must install a virus scanner and set the av_scanner option above. # # defer_ok - pass this message if scanner is down etc: warn message = X-Quarantine-Me-Malware: $malware_name log_message = malware: $malware_name demime = * malware = */defer_ok # Add headers to a message if it is judged to be spam. Before enabling this, # you must install SpamAssassin. You may also need to set the spamd_address # option above. # warn message = X-Quarantine-Me-Spam: SA score $spam_score\n\ X-SA-Report: $spam_report log_message = Spam score $spam_score > 5 spam = spamd/defer_ok condition = ${if >{$spam_score_int}{50}{1}{0}} # Accept the message. accept At the top of the routers section, modify to read/include: CODE: begin routers check_malware: driver = redirect condition = ${if def:h_X-Quarantine-Me-Malware: {1}{0}} headers_add = X-Quarantined-Malware: $h_X-Quarantine-Me-Malware: headers_remove = X-Quarantine-Me-Malware data = /var/quarantine/malware/malware.$tod_logfile file_transport = address_file check_spam: driver = redirect condition = ${if def:h_X-Quarantine-Me-Spam: {1}{0}} headers_add = X-Quarantined-Spam: $h_X-Quarantine-Me-Spam: headers_remove = X-Quarantine-Me-Spam data = /var/quarantine/spam/spam.$tod_logfile file_transport = address_file no_more Modify the authenticators section to read: CODE: begin authenticators plain: driver = plaintext public_name = PLAIN server_condition = ${if saslauthd{{$2}{$3}}{1}{0}} login: driver = plaintext public_name = LOGIN server_prompts = "Username:: : Password::" server_condition = ${if saslauthd{{$1}{$2}}{1}{0}} Save the /usr/local/etc/exim/configuration file. Create the quarantine directories and change ownership to mailnull:mail: CODE: root@win /root# mkdir -p /var/quarantine/{malware,spam} root@win /root# chown mailnull:mail /var/quarantine/{malware,spam} Restart Exim to suck in the new config options: CODE: root@win /root# /usr/local/etc/rc.d/exim restart Stopping exim. Starting exim. Exim should now be set to check for malware/spam and to authenticate users. Testing Exim configuration Finally we can move on to test that our config works correctly for spam/malware checking and for authenticating users.
The easiest option is to send an email to your mailserver with specially crafted malware/spam signatures included in the body of the message. When spamd/clamd see these signature strings in the body of the messages, they should classify the message as spam/malware and Exim in turn will quarantine the messages. The official EICAR malware/virus testing signature is as follows: CODE: X5O%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILEspamcH+H* See here for the official string: http://www.eicar.org/anti_virus_test_file.htm The official GTUBE spam testing signature is as follows: CODE: XJS*C4JDBQADN1.NSBN3*2IDNEN*GTUBE-STANDARD-ANTI-UBE-TEST-EMAIL*C.34X See here for the official string: http://spamassassin.apache.org/gtube/ Note: Another option for testing spam/malware scanning is to run exim from the commandline using the command 'exim -bh 127.0.0.1'. This will run an SMTP session from the commandline (think telnet) and allow you to inject your own specially crafted message using the signatures above. This requires you enter a valid SMTP session, something like: CODE: HELO example.com MAIL FROM:foo@example.com RCPT TO:foo@example.com DATA X5O%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILEspamcH+H* . This would simulate the injection of a mail message with a virus in it and in 'exim -bh' mode you can see a lot of useful debugging info to verify everything works ok. Testing Exim's Authentication configuration. We can now test that ASMTP is working. For this you can either run exim in one of it's many excellent debugging modes or you can simply configure a remote email client to use ASMTP. This guide will use the commandline to test ASMTP. Important: Before attempting this method please read the exim documentation on how ASMTP works. The following assumes you have read and understood that text. First create a simple perl script called 'encode' in /usr/local/etc/exim/ and make sure it is executable: CODE: root@win /usr/local/etc/exim# cat encode #!/usr/bin/perl use MIME::Base64; printf ("%s", encode_base64(eval ""$ARGV[0]"")); root@darkstar /usr/local/etc/exim# chmod +x encode root@darkstar /usr/local/etc/exim# ls -al encode -rwxr-xr-x 1 root wheel 85 Apr 23 12:25 encode Now decide which user account on your server you wish to test ASMTP with. It must be an account you know the password for obviously. I created an account called 'dummy' and set the password to 'dummy' as well - if you do this remember to remove the account or disable it as soon as you've finished testing. Encode the user:password pair into base64 MIME using the 'encode' script we created above: CODE: root@darkstar /usr/local/etc/exim# ./encode "\0dummy\0dummy" AGR1bW15AGR1bW15 Now enter into Exim's fake SMTP session command-line mode and just for good measure do it in authentication debug mode as well: CODE: root@win /root# exim -d+auth -bh 127.0.0.1 Exim version 4.66 (FreeBSD 6.1) uid=0 gid=0 pid=3056 D=fbb95cfd Probably Berkeley DB version 1.8x (native mode) Support for: crypteq iconv() IPv6 use_setclassresources PAM Perl OpenSSL Content_Scanning Old_Demime Lookups: lsearch wildlsearch nwildlsearch iplsearch cdb dbm dbmnz dnsdb dsearch nis nis0 passwd Authenticators: cram_md5 plaintext spa Routers: accept dnslookup ipliteral manualroute queryprogram redirect Transports: appendfile/maildir/mailstore/mbx autoreply lmtp pipe smtp Fixed never_users: 0 Size of off_t: 8 changed uid/gid: forcing real = effective uid=0 gid=0 pid=3056 auxiliary group list: 0 seeking password data for user "mailnull": using cached result getpwnam() succeeded uid=26 gid=26 seeking password data for user "root": cache not available getpwnam() succeeded uid=0 gid=0 configuration file is /usr/local/etc/exim/configure log selectors = 00000ffc 00089001 trusted user admin user changed uid/gid: privilege not needed uid=26 gid=6 pid=3056 auxiliary group list: 6 6 seeking password data for user "mailnull": cache not available getpwnam() succeeded uid=26 gid=26 originator: uid=0 gid=0 login=root name=Charlie Root sender address = root@win.munk.me.uk sender_fullhost = [127.0.0.1] sender_rcvhost = [127.0.0.1] **** SMTP testing session as if from host 127.0.0.1 **** but without any ident (RFC 1413) callback. **** This is not for real! host in hosts_connection_nolog? no (option unset) LOG: smtp_connection MAIN SMTP connection from [127.0.0.1] host in host_lookup? yes (matched "*") looking up host name for 127.0.0.1 DNS lookup of 1.0.0.127.in-addr.arpa (PTR) succeeded IP address lookup yielded localhost.munk.me.uk gethostbyname2 looked up these IP addresses: name=localhost.munk.me.uk address=::1 name=localhost.munk.me.uk address=127.0.0.1 checking addresses for localhost.munk.me.uk ::1 127.0.0.1 OK sender_fullhost = localhost.munk.me.uk [127.0.0.1] sender_rcvhost = localhost.munk.me.uk ([127.0.0.1]) set_process_info: 3056 handling incoming connection from localhost.munk.me.uk [127.0.0.1] host in host_reject_connection? no (option unset) host in sender_unqualified_hosts? no (option unset) host in recipient_unqualified_hosts? no (option unset) host in helo_verify_hosts? no (option unset) host in helo_try_verify_hosts? no (option unset) host in helo_accept_junk_hosts? no (option unset) SMTP>> 220 win.munk.me.uk ESMTP Exim 4.66 Wed, 17 Jan 2007 19:24:22 +0000 220 win.munk.me.uk ESMTP Exim 4.66 Wed, 17 Jan 2007 19:24:22 +0000 smtp_setup_msg entered When you get to this point you are ready to start an SMTP 'conversation' with Exim. First introduce yourself to Exim using the SMTP 'EHLO localhost' command: CODE: EHLO localhost SMTP<< EHLO localhost sender_fullhost = localhost.munk.me.uk (localhost) [127.0.0.1] sender_rcvhost = localhost.munk.me.uk ([127.0.0.1] helo=localhost) set_process_info: 3103 handling incoming connection from localhost.munk.me.uk (localhost) [127.0.0.1] host in pipelining_advertise_hosts? yes (matched "*") host in auth_advertise_hosts? yes (matched "*") host in tls_advertise_hosts? no (option unset) 250-win.munk.me.uk Hello localhost.munk.me.uk [127.0.0.1] 250-SIZE 52428800 250-PIPELINING 250-AUTH PLAIN LOGIN 250 HELP SMTP>> 250-win.munk.me.uk Hello localhost.munk.me.uk [127.0.0.1] 250-SIZE 52428800 250-PIPELINING 250-AUTH PLAIN LOGIN 250 HELP In response to your 'EHLO localhost' command, Exim returns more debug information but most importantly for us it also indicates what authentication options it offers in this line: CODE: 250-AUTH PLAIN LOGIN This indicates that currently acceptable AUTH methods are PLAIN and LOGIN. We can then test the PLAIN login method using the "\0dummy\0dummy" user:password pair we encoded above: CODE: AUTH PLAIN AGR1bW15AGR1bW15 SMTP<< AUTH PLAIN AGR1bW15AGR1bW15 Running pwcheck authentication for user "dummy" pwcheck: success (NULL) plain authenticator: $1 = $2 = dummy $3 = dummy expanded string: 1 SMTP>> 235 Authentication succeeded 235 Authentication succeeded This indicates that authentication for 'dummy:dummy' would succeed and mail would be relayed (pending further conditional checks by Exim). So we now have a working Exim with support for spam/malware checking and authentication over SMTP. Saturday, December 30. 2006Block Brute Force Attacks Against sshd and proftpd Using blockhosts
For a long time now I've had a lot of problems with brute force attacks against sshd and proftpd - attacks where a host will attempt to login with a dictionary of common usernames and passwords, trying each one until they find a combination that works. Apart from being a security issue, this uses up a lot of bandwidth so it's worth taking some measures to block these kind of attacks.
Both sshd and ftpd services have their own individual means for blocking individual connections, but unfortunately neither have an inbuilt method for detecting brute force attacks - counting how many failed login attempts are made from each individual IP address and then blocking that IP address if the number of failed login attempts is more than a certain number. This is where a 3rd party utility is required. There are a few utilities that can mitigate brute force attacks on services. For a while now I've used DenyHosts successfully to block sshd brute force attacks. DenyHosts works by constantly monitoring sshd logfiles and keeping track of how many failed logins have occured per IP address over time. If the number of failed logins reaches a certain threshold, DenyHosts adds an entry in /etc/hosts.allow that effectively blocks the IP address, stopping that host from connecting to the sshd service any more. DenyHosts is great, but unfortunately it's aimed only at blocking sshd brute force attacks and I need to protect the ftpd service as well as just sshd - and in future maybe adapt to block other services. With this in mind I decided to move to using a very similar script called BlockHosts (the documentation for BlockHosts actually mentions that it was inspired by DenyHosts). BlockHosts can scan a list of service logfiles in one go instead of just a single logfile as with DenyHosts, so is ideal for monitoring a number of different services for brute force attacks. The following describes how to install and configure BlockHosts on FreeBSD so it's executed every time the sshd or proftpd services are accessed using TCP_WRAPPERS - ie modifying /etc/hosts.allow so the blockhosts script is run each time sshd or proftpd are accessed. The BlockHosts script will then check if this current connection attempt is part of a brute force attack and if so, add a blocking rule to /etc/hosts.allow to deny further access. Installation of BlockHosts
We're now ready to run blockhosts.py for the first time. BlockHosts will parse each logfile mentioned in blockhosts.cfg and check for any brute force attacks and if it finds any, blocks will be added to the /etc/hosts.allow file. Note: This initial check does not take into account the period over which failed logins took place, so any IP that has more than the default 7 failed login entries will look like a brute force attacker. However, the ban BlockHosts adds will only last for the default 12 hours so this shouldn't cause a huge issue - just be aware of this and check the IPs that are added on the first run. For the very first time it's a good idea to try a 'dry run' just to see what blockhosts finds and what it'd do, without actually doing anything to the /etc/hosts.allow file. To do this, run blockhosts with the '--dry-run' flag: CODE: root@users /usr/local/etc# /usr/local/bin/blockhosts.py --verbose --dry-run blockhosts 1.0.5 started: 2006-12-30 14:15:30 ... will discard all host entries older than 2006-12-30 02:15 ... load blockfile: /etc/hosts.allow ... found both markers, count of hosts being watched: 0 Warning: no offset found, will read from beginning in logfile: /var/log/auth.log ... securelog, loading file, offset: /var/log/auth.log 0 Warning: no offset found, will read from beginning in logfile: /var/log/ftp.log ... securelog, loading file, offset: /var/log/ftp.log 0 ... updates: counts: hosts to block: 9; hosts being watched: 21 #---- BlockHosts Additions ALL: 203.88.192.225 : deny ALL: 200.71.192.7 : deny ALL: 212.227.81.146 : deny ALL: 218.25.62.75 : deny ALL: 200.46.108.164 : deny ALL: 201.57.163.2 : deny ALL: 205.129.191.11 : deny ALL: 200.68.51.91 : deny ALL: 82.38.68.217 : deny #bh: ip: 85.184.10.200 : 1 : 2006-12-30-14-15 #bh: ip: 84.158.231.209 : 1 : 2006-12-30-14-15 #bh: ip: 82.38.68.217 : 11 : 2006-12-30-14-15 #bh: ip: 82.153.28.16 : 2 : 2006-12-30-14-15 #bh: ip: 67.113.225.66 : 1 : 2006-12-30-14-15 #bh: ip: 59.108.34.228 : 2 : 2006-12-30-14-15 #bh: ip: 222.68.192.132 : 2 : 2006-12-30-14-15 #bh: ip: 218.25.62.75 : 20 : 2006-12-30-14-15 #bh: ip: 217.83.162.157 : 1 : 2006-12-30-14-15 #bh: ip: 212.227.81.146 : 29499 : 2006-12-30-14-15 #bh: ip: 210.1.132.178 : 4 : 2006-12-30-14-15 #bh: ip: 205.129.191.11 : 20 : 2006-12-30-14-15 #bh: ip: 204.141.87.14 : 3 : 2006-12-30-14-15 #bh: ip: 203.88.192.225 : 448 : 2006-12-30-14-15 #bh: ip: 202.108.40.109 : 1 : 2006-12-30-14-15 #bh: ip: 201.57.163.2 : 2867 : 2006-12-30-14-15 #bh: ip: 200.71.192.7 : 761 : 2006-12-30-14-15 #bh: ip: 200.68.51.91 : 10 : 2006-12-30-14-15 #bh: ip: 200.46.108.164 : 170 : 2006-12-30-14-15 #bh: ip: 200.105.255.90 : 7 : 2006-12-30-14-15 #bh: ip: 152.104.125.14 : 3 : 2006-12-30-14-15 From this you can see nicely what blockhosts makes of the service logfiles and the addresses that have tried to connect unsuccessfully. On my host, as you can see above, there are a few that are obviously dodgy (I would only expect a max of maybe 8 connections per ip per month, so clearly 29,499 connections is just wrong!). Once you're happy that the output is correct, run blockhosts again without the '--dry-run' flag and the /etc/hosts.allow file will be modified. Also from now on the logfiles will only be read from the last recorded offset which saves a lot of time if your logfiles are very big. Big thanks to the BlockHosts author Avinash Chopde ! Tuesday, November 14. 2006FreeBSD 6.2 To Include Security Event Auditing
Just read an interesting article about the addition of 'Security Event Auditing' in FreeBSD 6.2. Until now FreeBSD hasn't had any really useful security auditing other than using 'accounting' to log all syscalls which at best was confusing when it came to working out who did what when and how.
At one time I installed a kernel module lrexec to log all system exec calls, but this was also quite a handful to configure scripts so they reported only on certain users. Hopefully this new security auditing daemon will make security auditing a lot easier on FreeBSD. Read the article for more info on what's new: Security Event Auditing in FreeBSD 6.2 Also of interest is the new addition to the FreeBSD handbook on security auditing: FreeBSD Handbook: Security Event Auditing Friday, October 20. 2006Modsecurity 2.0 Released
A new version of mod_security has just been released - 2.0 - complete with a total rewrite that includes a number of new features. El reg is running an article on the new release which includes an interview with ModSecurity's author Ivan Ristic.
mod_security is an apache module for monitoring requests made to a web server and acting on those requests according to rules - useful for blocking malicious bots, stopping web spammers and so on. I've been using it for a few years now and it handles blocking of weblog spammers and trojan worms/bots very well, though it has to be said the configuration isn't the simplest of all time. Hopefully this configuration issue might be made easier with the also newly released modsecurity console, although reading through that page it doesn't seem to mention anything about using it to configure mod_security... Will have a look at it later and see what's what. A list of the new features or improved features in ModSecurity 2.0 - taken from the article above:
The article is well worth reading if you already use ModSecurity - particularly if you're interested in moving from just simple blocking and logging of requests as in mod_security 1.0 to a more sophisticated web application firewalling system - mod_security 2.0. 2.0 includes a pseudo web app firewalling programming language making it easy to manipulate and process HTTP in a stateful manner - tracking HTTP sessions per IP in real time for example or perhaps watching for anomalous web activity and then flagging any IP that transgresses behaviour deemed as acceptable and watching for that IP in the future. Sunday, October 1. 2006Password generation using a base rule
Just stumbled across this article on lifehacker about choosing and remembering great passwords. The gist of it is you choose a base 'rule' and then tack on a password that's unique to the system that you're using.
For example if your mother's maiden name was Cameron Jane Diaz, you might use cjd5 as the 'base'. Then you'd create a password based on the system you're using - so for amazon you might make tack on 1m1zon - making the passwd cjd51m1zon. Not a bad password in and of itself. One downside to the 'base rule' system as someone pointed out in the comments to that article - it's a bit like having just one password with lots of variations on the theme. Someone finds out the 'base' password rule and it'd be a lot easier cracking the rest of the passwords. I'd disagree that that's a bad thing though; as long as you keep the end bit of the password unique and long enough, the passwords are still hardened enough to resist an attack even if someone does find out the 'base rule' - for example cracking '1m1zon' wouldn't be trivial. Worth reading the article though if you tend to use a single password for almost everything: Choose and remember great passwords (Lifehacker)
(Page 1 of 4, totaling 18 entries)
» next page
|

