Enhancing E-Mail Security With Procmail

Introduction

Back to the home page

If you've followed a link in a SECURITY WARNING message and you ended up here, you're probably wondering what's going on.

Briefly, the email administrator of the site you sent the message to has put in place certain security policies regarding the types of email attachments they are willing to accept, and are rejecting attachments that they consider hazardous. If you look at the estimated cost to business of Microsoft Outlook email worms in 2001 so far - $8 billion - you can understand why they've done so. (That figure is from an article on the CNNfn website in early August, 2001)

"But I didn't send any such message!" you say. Well, it's very likely that you've infected yourself with one of these Microsoft email worms, and it is attacking others without your knowledge. The worm program is impersonating you in the hopes that people who know you will trust mail you send, and thus will infect themselves when they open the attachment that "you" sent to them.

The most common Microsoft Outlook worms in mid-to-late 2001 are Goner, BadTrans, SirCam, Aliz, Magistr, Apost and Nimda. Visit the links and download the removal tools and run them. To protect yourself against future attacks, install antivirus software (Norton 2000 is good) and keep the virus signatures up-to-date. Also, make sure your antivirus software is not excluding any files from its scan.

"Why can't I open my attachments?" you ask. Well, if the name of the attachment has the word "DEFANGED" in it, then your email administrator is enforcing a security policy to protect you from these attacks. The content of the attachment has not been altered in any way. The only thing that has happened is that the name of the attachment has been mangled to prevent you reflexively double-clicking on it to open it.

That is how these worms spread. They rely on the Double-Click Reflex that using a GUI gives you. "Hey! An attachment! {click-click}" If you stop to think first, you may realize that this message was from a total stranger who has no good reason to be sending you a file. That's one reason the filename is mangled - to force you to stop and think about whether you should double-click on the file.

The second reason is, if you do have antivirus software, the act of saving the attachment to your disk gives your antivirus software a chance to scan it for viruses. If you open it directly from within your mail program, this may not happen.

The third reason is Microsoft, in their infinite wisdom, decided you don't actually need to see all of the filename. Windows has an option called "hide known filename extensions." This option is turned on by default. The person attacking you takes advantage of this by naming the attachment something like THISISAWORM.TXT.EXE, which Windows displays as THISISAWORM.TXT, which many people will assume is safe since the filename ends in .TXT - only the actual filename (which Windows is helpfully hiding from you) does not end in .TXT, so when you double click it you don't get notepad. Instead, you get infected, and the worm immediately starts attacking others.

One major thing you can do to help protect yourself is to turn off the hiding of the full filename. Open up My Computer, click on View -> Folder Options, select the View tab, and uncheck the "hide file extensions for known file types" checkbox.

Mangling the extension will make the full file name appear, and receiving a file attachment named THISISAWORM.TXT.12345DEFANGED-EXE should set off alarm bells in your head.

Sometimes legitimate attachments will have their names mangled - for example, THISISNOTAWORM.ETC.12345DEFANGED-DOC may be a perfectly safe document file.

To save the attachment and fix the filename at the same time, simply right-click on the attachment and select "Save as...". A dialog with the current (mangled) filename will be displayed. Select the folder where you want to save the file, and in the box where the filename is displayed simply edit out the "DEFANGED" part. For example, if the mangled attachment filename is THISISNOTAWORM.ETC.12345DEFANGED-DOC, simply delete out the 12345DEFANGED- part to restore the original filename of THISISNOTAWORM.ETC.DOC - then you can go into My Computer and double-click on the file normally.

By default the Sanitizer uses very high security settings, settings that are somewhat too high for public ISPs to use. If you are a home user, and .EML (forwarded email) and .VCF (V-card) attachments are being mangled by your ISP, then please contact your ISP's support desk and ask them to reduce the security settings a bit.


Please note:

Your mail administrator decides your email security policy. I do not. If you have problems with the mangling of attachment filenames, please take it up with them. I can help them fine tune their security settings, but I cannot turn things off for you if you're annoyed by mangled attachment filenames. Also, the sanitizer is not a subscription service, so I cannot unsubscribe you.


I can be contacted at <jhardin@impsec.org> - you could also visit my home page.


Created with vi   Bobby approved   Best viewed with Any Browser

$Id: sanitizer-intro.html,v 1.12 2002-01-01 20:37:15-08 jhardin Exp jhardin $
Contents Copyright (C) 2001 by John D. Hardin - All Rights Reserved.