|
Donation/Premium |
|
 |
|
|
|
|
|
|
|
Survey |
|
 |
|
|
|
|
|
|
|
 |
 |
| View previous topic :: View next topic |
| Author |
Message |
Ikeb
Special Response Team Forums Admin
 Joined: Apr 20, 2003 Posts: 16515
|
Posted: Mon Aug 13, 2007 8:47 pm Post subject: |
|
|
| Bill_Bright wrote: | Perhaps this illustrates my ignorance with coding - but back in my AIX days, (IBM's version of UNIX for those that blocked that out ) a regex string was used to find every instance of a particular pattern, much the same way as DOS wildcard notations match on a pattern - only much more powerful. |
Nothing has changed then. Same principle ... maybe even the same syntax.
| Bill_Bright wrote: | | By "variable" I mean, not a "constant". For a simple example, if I want to delete the text file "filename.txt", entering the "variable" expression: del *.txt will delete every .txt file in that directory including filename.txt - the danger being that it may delete a .txt file I did not want to delete. Consequently, the use of wildcards (and in my mind, regexps) must be done with great care and understanding of what exactly may happen. |
Oh yes indeed. That's why it's very important to test each rexex string against a number of examples and then soak the filter using any new regex before putting it in "production" mode.
| Bill_Bright wrote: | | While I know my way around the DOS command prompt, regex is much more powerful and dangerous and therefore, rather than using the "variable" del *.txt to delete the file "filename.txt", it is much safer using del filename.txt instead knowing that "constant" will delete that one file, and only that one file - no variables. |
With regex expressions it's possible to compromise between such extremes. Your DOS example would be equivalent to ".*\.txt", excluding what DOS itself filters for -- e.g. number of letters/numbers. In regex parlance, a more refined regex would be "\w{1,8}\.txt, to replicate DOS filtering. The context dictates exactly what sort of regex expression is required.
| Bill_Bright wrote: | | So, as with wildcards, it seems to me using regex to tag something for deletion comes with the risk that pattern matching may match a keeper. And with that possibility comes the requirement for some sort of recovery. There are undelete utilities for DOS/Windows, but with a regex filter set to auto-process, and no admin access to my ISP's mail server, where's the ability to recover? | Well in the MWP application we have the recover function of course but frankly I don't rely on that function to "catch" FPs (and seriously doubt that anyone really does). What would be the point? I might as well use the manual method exclusively rather than poring back through those cryptic logs.
| Bill_Bright wrote: | Sure, a friend or family member can followup if I don't respond to an email - but sadly, it may mean I missed an event during the gap. And if it is someone else I miss, well, that may be a potential new client I miss who then, by word of mouth (my only method of advertising), tells more potential clients I don't answer my email. Too risky for me.
I appreciate the power of regex and the skills of those that have mastered it, and I can certainly see the value in using regex to identify "potential" spam, but coupling that with auto-processing/auto-delete is not something I am willing to accept - that 1 in 10,000 emails may be the 1 I can't afford to miss! |
Yes indeed each FP is a potential loss that could prove expensive in some way. I just figure that whether we want to admit it or not, the manual method carries an implicit FP risk. We are human after all.
| Bill_Bright wrote: | | Quote: | | I wish that someone would come up with a regex filter GUI (or whatever you want to call it) | A "Wizard" would be great! |
Maybe FireTrust should consider third-party add-ons?
|
|
| Back to top |
|
 |
Bill_Bright
General
 Premium Member
 Joined: Jan 16, 2004 Posts: 8963 Location: Nebraska, USA
|
|
| Back to top |
|
 |
Wizcrafts
Sergeant
 Premium Member
 Joined: Jun 05, 2003 Posts: 95 Location: Michigan
|
Posted: Tue Aug 14, 2007 12:16 am Post subject: Base64 Filter Refined and Set To Notify Only |
|
|
F.P. acknowledgement from Wizcrafts
This evening I received a legitimate email with a .pdf attachment containing course information from a new sender. It was flagged and marked for manual deletion by my base64 filter. The filesize made it obvious that it contained a large attachment, as did the body text, so I investigated why it got flagged in the first place. It turned out that I had failed to account for attachments in the base64 conditions! This is one of those old filters that I have been using forever. It needed fixed and got it today.
First, I removed the Delete action from the GUI options, then I created a Regular Expression to allow the content to be declared either "x" OR "y," whereas before it was only "y."
Furthermore, in order to see the line of code containing the terms "x" OR "y" I had to increase the scanning throttle by one more line, to 251! Normally this wouldn't be necessary as most emails with attachments don't have very much source code before the Content-Disposition lines, but this message was created using Microsoft Word 11 and you won't believe how much crap was added by the program! The visible body contains only 11 lines of text and several blank lines, but the Word program added 191 lines of garbage codes!
Anyway, the Base64 filter still detects Base64 encoded spam, but it is a little less likely to flag a legitimate attachment as such and will no longer pre-mark it for deletion. It will just be an information filter, which I have set to show "Base64" in orange, in my MWP, which is now set to scan 251 lines of code (minimum).
My updated MWP filters are available here _________________ Submitted by Wiz
Guarding the Castle against spammers and scammers
|
|
| Back to top |
|
 |
Wizcrafts
Sergeant
 Premium Member
 Joined: Jun 05, 2003 Posts: 95 Location: Michigan
|
Posted: Tue Aug 14, 2007 1:35 am Post subject: |
|
|
This is just a technical note.
If you choose to use one of my filters.txt by dragging it into your MailWasher Pro profile, be aware that after you run the program, then close it, all of my comments in the head of the file will be replaced with these statements from Firetrust:
// MailWasher Pro filter settings
//
// If you make changes to this file while MailWasher Pro is running,
// the changes will be overwritten when MailWasher Pro is closed.
I don't know of any workaround at this time. I do recall reading something about inserting permanent comments in filter rules, from the dark past, and will try to locate the sample, which must live somewhere. _________________ Submitted by Wiz
Guarding the Castle against spammers and scammers
|
|
| Back to top |
|
 |
Wizcrafts
Sergeant
 Premium Member
 Joined: Jun 05, 2003 Posts: 95 Location: Michigan
|
Posted: Fri Aug 17, 2007 12:39 am Post subject: |
|
|
In the last three days I have updated 6 filters to reduce false positives, or improve detection rates. The altered filters are as follows:
HTML Spam Tricks
Postcard Trojan Scam
RX Spam
Pills Spam
Misspelled Drugs
Stock Spam #3
I will continue to try to identify and fix rules that cause false positives, without totally crippling a filter. I am also identifying Regular Expressions that cause heavy CPU usage and am trying to touch them up for better processing, without losing their specific targeting (a challenge). Some of my Regular Expressions are real spam killers and tend to remain so across many variations in spam techniques. Some cut to the core of their techniques.
As spammers discard old, failing methods some of my filters will become redundant, and will be moved out of the current filters set, into the larger, master set, or into the bit bucket. However, they won't be far away if needed again!
FYI: Did you know that all image or attachment spam is based on what's known as base64 encoding? With that in mind, all I have to say to the spammers is: All your Base64 are belong to us! Make your time!  _________________ Submitted by Wiz
Guarding the Castle against spammers and scammers
|
|
| Back to top |
|
 |
Wizcrafts
Sergeant
 Premium Member
 Joined: Jun 05, 2003 Posts: 95 Location: Michigan
|
Posted: Sun Aug 26, 2007 6:08 pm Post subject: Lots of updates to Wizcrafts' MailWasher Pro fFilters |
|
|
Since I last checked in, on Aug 16, I have been busy - quietly refining my MailWasher filters. Some filters have been streamlined to reduce the burden they placed on the program, while others were updated to detect current spam phrases and misspellings. Filters were added to detect certain PayPal phishing scams and a few filters have been (temporarily) deactivated.
Most interesting is the reappearance of the "Postcard" scams, sent from Storm Worm infected PCs. These had disappeared for a couple of weeks and are back with a few alterations meant to fool the readers into clicking on the links, which are no longer numeric, to the eye. However, reading the source code, or hovering over the link without clicking on it does reveal that they still point to numeric IPs on infected computers, which host the Storm Worm. Of all the spam I have seen in the past two months the Storm Worm is without a doubt the most serious threat to our security. The number of computers infected with this malware is astronomical and the threat they pose, as a Zombie Army, is incredible. We may be their next attack target. Because the authors of the Storm Worm are changing the subjects and body text every other day, and hiding the numeric links in phoney website wrappers, my rulesets to identify them have been reduced and refined.
My downloadable filters list the changes I have made over the last few days. Sometimes I revise a rule more than once in the same day, so look at the time stamps, or use ChangeDetection to monitor for updates. _________________ Submitted by Wiz
Guarding the Castle against spammers and scammers
|
|
| Back to top |
|
 |
spatieman
Trooper

 Joined: Aug 09, 2007 Posts: 29 Location: Netherlands
|
Posted: Sat Sep 01, 2007 12:25 pm Post subject: |
|
|
cool set of filters
i use these for image spam..
[enabled],"DEL GIF IMAGE SPAM (RegExpr)","DEL GIF IMAGE SPAM (RegExpr)",16711680,AND,Delete,Automatic,Body,contains,"Content-Transfer-Encoding: base64",Body,containsRE,Content-Type:.+(gif)
replace gif for other types of atachments what spammers use..
|
|
| Back to top |
|
 |
stan_qaz
Premium Member
 Joined: Mar 31, 2003 Posts: 10626
|
Posted: Sat Sep 01, 2007 4:50 pm Post subject: |
|
|
That might auto-delete a lot of my good mail since folks send me stuff with gifs in it all the time.
When sharing filters it is much better to set them to mark but not auto-delete just in case someone has a problem with them, that way they won't have their good mail auto-deleted. _________________ Questions? Try the wiki
http://wiki.castlecops.com/MailWasher_Pro
|
|
| Back to top |
|
 |
Bill_Bright
General
 Premium Member
 Joined: Jan 16, 2004 Posts: 8963 Location: Nebraska, USA
|
|
| Back to top |
|
 |
snerd
Cadet
 Premium Member
 Joined: Aug 10, 2004 Posts: 3 Location: USA
|
Posted: Sun Sep 02, 2007 6:33 am Post subject: |
|
|
| Wizcrafts wrote: | This is just a technical note.
If you choose to use one of my filters.txt by dragging it into your MailWasher Pro profile, be aware that after you run the program, then close it, all of my comments in the head of the file will be replaced with these statements from Firetrust:
// MailWasher Pro filter settings
//
// If you make changes to this file while MailWasher Pro is running,
// the changes will be overwritten when MailWasher Pro is closed.
I don't know of any workaround at this time. I do recall reading something about inserting permanent comments in filter rules, from the dark past, and will try to locate the sample, which must live somewhere. |
It used to drive me crazy trying to get your filters pasted into the filters.txt! They would NEVER stick! Always disappeared by the time I open MW back up! And no, it was always shut down and not running when I tried to paste your filters in.
So I was playing around one night and saved the filters.txt with UTF-8 encoding, and surprise surprise, that fixed the problem!
Mike
|
|
| Back to top |
|
 |
Wizcrafts
Sergeant
 Premium Member
 Joined: Jun 05, 2003 Posts: 95 Location: Michigan
|
Posted: Sat Sep 15, 2007 1:35 am Post subject: |
|
|
It's been a couple of weeks since I last checked in, but I haven't been idle with my filters. It seems that spam tricks have gone full circle, having started as plain text ads, then base64, to obfuscated-broken text, then html tricks to break up words, then image spam, then attachments with image spam and now back to plain text again. Every few days there is something different in the subjects and body text, sometimes in plain English, other times obfuscated-broken text.
While it is becoming harder to keep up with these rapidly evolving spam tricks I am doing the best I can, leaving non-filtered spam to the DNS Blacklist, or, hopefully, the learning filter. Unfortunately, some of the latest tricks are even eluding the learning filter. Fortunately, I have identified most of those and created rules to detect them.
A good example of a couple of odd spam filters are the one word subject and the "DW" spammer. I won't go into details about the latter, but take my word for it that anything flagged by the DW filter is 99.99% likely Chinese spam. I placed it down stream to let the more specific filters do their thing. When those filters failed to ID the type of spam the DW caught it.
The Storm Trojan's authors are very tricky people, with an intimate knowledge of North American habits. Not bad for Ruskies! The newest Storm runs advertise a free NFL Tracker program for pro football fans to "track" their favorite teams and players. These scam messages are in plain text, with a link to a domain URL, not a numeric IP. This is accomplished by parking the domain on ESTDomains (Known spam house for among others - Russian spam gangs), loading up to 13 name servers, then using free DNS services to locate that Zombie computer, on a cable connection. If the victim is deceived into clicking on any of the links on destination web page, they infect themselves with the Storm Trojan. I have included a new filter to detect and flag these scams.
After much discussion in this thread it has been decided that the filters.txt that are for general use will only flag and/or mark spam for deletion. The MailWasher user will only have to sort by status, remove any false positives, then hit the Process button to delete the marked messages from the mail server. As you gain confidence in their accuracy you may wish to begin hiding known types of spam, for manual deletion upon Processing. Of course, my personal filters are set to Murder-Death-Kill, but I've been doing this for about 6 years now. _________________ Submitted by Wiz
Guarding the Castle against spammers and scammers
|
|
| Back to top |
|
 |
Wizcrafts
Sergeant
 Premium Member
 Joined: Jun 05, 2003 Posts: 95 Location: Michigan
|
Posted: Sat Sep 15, 2007 2:28 am Post subject: |
|
|
I'm having a bad day. I forgot to include a link to my MailWasher Pro filters page. I also post fairly often about the newest Storm Trojan tactics and my work on spam filters, on my Blog.
Is anybody else having problems copying and pasting my filters from my website? I compose them in NoteTab Pro and save as ASCII text. They open perfectly in Notepad. I don't know why there would be a need to resave them in UTF-8, but would appreciate any feedback on this matter. _________________ Submitted by Wiz
Guarding the Castle against spammers and scammers
|
|
| Back to top |
|
 |
Wizcrafts
Sergeant
 Premium Member
 Joined: Jun 05, 2003 Posts: 95 Location: Michigan
|
Posted: Sat Sep 15, 2007 3:11 am Post subject: |
|
|
| spatieman wrote: | cool set of filters
i use these for image spam..
[enabled],"DEL GIF IMAGE SPAM (RegExpr)","DEL GIF IMAGE SPAM (RegExpr)",16711680,AND,Delete,Automatic,Body,contains,"Content-Transfer-Encoding: base64",Body,containsRE,Content-Type:.+(gif)
replace gif for other types of attachments what spammers use.. |
Spatieman;
I suggest that you take a close look at my image spam filters before implementing the one quoted above. It is way too broad, with no specific targeting to differentiate legitimate embedded images from spam images. This is why, during the course of the image spam runs, I developed and published so many separate filters, each targeted at a unique spam technique and sometimes a user agent. _________________ Submitted by Wiz
Guarding the Castle against spammers and scammers
|
|
| Back to top |
|
 |
Wizcrafts
Sergeant
 Premium Member
 Joined: Jun 05, 2003 Posts: 95 Location: Michigan
|
Posted: Sat Sep 15, 2007 5:04 pm Post subject: MailWasher custom filters sometimes need re-positioning |
|
|
A lot has been said about the nature of my custom MailWasher filters; how they work, how much resources they consume, how unsafe hiding or auto deleting can be and things of this nature. What hasn't been mentioned too often is the fact that, as spam types and tricks change, you need to readjust the order of the various filters to get a match on the newest types of spam as soon as possible. I haven't been automatically doing this with my online versions of my filters, but may start doing so soon. At any rate, whether I change the order of the online rules or not, you should move filters upward to match the types of spam you see most often at any given time. That may be monthly, weekly, or every other day. It really depends on how much the filters slow down your scanning of incoming messages.
If the named spam filters you are matching are way down the list, then MailWasher may have to go through many irrelevant rules until the right one is matched. This uses up more processing time than it would if the appropriate filter was moved up. What I try to do is have all named spam filters ahead of general spam types. General spam filters include the one word subject, the digits and consonants in the From address, HTML tricks and various blocked country rules.
Another thing I find is that sometimes the wrong filter will match a spam email, because of variations in the message. When that occurs I move the correct filter above the one that flagged it with the wrong name.
Admittedly, this is slicing hairs, but moving the most common named filters up the list does save processing time, if a spam or scam is matched.
I update my online MailWasher Pro filters quite often, so, if you are using them, be sure to check for updates every day or two. You can use Change Detection to monitor the files, for free, and notify you by email whenever they are updated (daily notices only). There is a button on the web page to sign up. You can also target the individual URLs of my filters, if you wish. _________________ Submitted by Wiz
Guarding the Castle against spammers and scammers
|
|
| Back to top |
|
 |
rogerw
Firetrust Host
 Premium Member
 Joined: May 11, 2003 Posts: 4008
|
Posted: Sat Sep 15, 2007 6:10 pm Post subject: |
|
|
| Wizcrafts wrote: | | Is anybody else having problems copying and pasting my filters from my website? I compose them in NoteTab Pro and save as ASCII text. They open perfectly in Notepad. I don't know why there would be a need to resave them in UTF-8, but would appreciate any feedback on this matter. |
Some time back MW converted some of its ASCII files to Unicode (to support other languages and fonts). In doing so, MW will detect the filetype of the *.txt files upon opening, and will accept an ASCII file, but upon exit will re-write the file to unicode.
The problems that people encounter with cutting/pasting are due to this:
Some editors are unicode-aware but will allow one to 'paste' UNICODE saved in the clipboard into ASCII files - and vice versa. Many of these editors will then save the files off in this hybridized form: some parts in ASCII and some in UNICODE. When MW encounters such a file (one that starts as ASCII then switches to UNICODE or vice versa), MW assumes the file is corrupt (since its the agent that manages the file, it expects the file to be consistent), and will wipe it out. This is one way in which filters, friends lists and blacklists are lost!
To counter this, anyone using an editor that is unicode-aware upon MW's ".txt" files should not just SAVE the file. Rather one should use the "Save AS" feature to save the file as either all ASCII or all UNICODE. MW will accept either.
Wizcrafts, you should provide very explicit instructions for editing so that people will be aware of this. _________________ "It's just a jump to the left ..."
"Buttons are not toys!"
"My snake oil is better than anyone else's!"
|
|
| Back to top |
|
 |
|
|
|
You can post new topics in this forum You can reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum
|
Powered by phpBB © 2001 phpBB Group
|