#SecChat $1 million guarantee 12 Scams of Christmas access to live fraud resolution agents Acquisition Alex Thurber Android antivirus Apple botnet Channel Partners cloud security Compliance Consumer counter identity theft credit card fraud and protection credit fraud alerts credit monitoring credit monitoring and resolution critical infrastructure Cyber Security Mom cyberbullying Cybercrime cybermom data breach data center data center security Data Protection Dave DeWalt DLP Email & Web Security embedded encryption Endpoint Protection enterprise facebook fake anti-virus software Family Safety Friday Security Highlights global threat intelligence google government Hacktivism how to talk to kids how to talk to teens identity fraud identity fraud scams identity protection identity protection $1 million guarantee identity protection fraud identity protection surveillance identity surveillance identity theft identity theft expert identity theft fraud identity theft protection identity theft protection product Identity thieves and cybercriminals intel iphone kids online behavior lost wallet protection malware McAfee McAfee Channel McAfee Family Protection McAfee Identity Protection McAfee Initiative to Fight Cybercrime McAfee Labs McAfee security products Mid-Market Mobile mobile malware mobile security monitor credit and personal information Network Security online personal data protection online safety Operation Aurora PCI personal identity theft fraud personal information loss personal information protection phishing privacy proactive identity protection proactive identity surveillance Public Sector restore credit and personal identity Risk and Compliance scam scams scareware security smartphones social media social networking social networks spam Stuxnet twitter vulnerability Web 2.0 work with victim restore identity
|
|
Some weeks ago I read a good blog on callback verification. I totally agree with the author on this topic – it is a pathetic technique for preventing spam.
Old-timers will remember the SMTP VRFY command. For those that are not aware of this let me quote from the RFC1.
This command asks the receiver to confirm that the argument identifies a user or mailbox. If it is a user name, information is returned as specified in section 3.5.
Due to security issues – mostly spam related – this command is no longer fully support in any self-respecting mail configuration. Instead a strictly RFC-compliant MTAs will typically respond with
252 Cannot VRFY user, but will accept message and attempt delivery
Callback verification is just VRFY in different clothing. An attempt is made to verify the sender by connecting back to one of the MX hosts of the sending domain. Instead of a VRFY, a RCPT TO is sent with the senders email address to see how the MTA responds. For the same reasons as the VRFY command, RCPT TO will default to returning a 250 response more often than not. The end result is wasted bandwidth, increased SMTP response times, and the potential to be blacklisted, as too many callbacks may appear as a directory harvest attempt. In a worst case if this verification is used on a continual basis your MTA might even be blacklisted, because it could be deemed directory harvesting. We threw VRFY away a long time ago, let’s not fake it up under another schema.
All is not in vain; continuing on my theme of simple and practical techniques to keeping spam out of the network, let’s analyse the sender domain:
(1) Do a deliverability check: Does it have an MX record? If not, can it resolve back to an A-record or an AAAA-record?2. Unless you have some local routing routes that will handle the domain delivery don’t accept it. If a SERVFAIL is encountered, return a 418 code. This is not a foolproof method. Even if proper DNS records exist none of the listed servers might actually host a SMTP server. Whatever you do, DO NOT connect back in an attempt to check this!
(2) Do the SPF-check: Yes, yes, I keep hammering on about SPF, but it is a vital, even though potentially temporary, link in fighting spammers. If more people set SPF records3, we can temporarily defeat spammers at MAIL FROM. SPF is a community effort not a vendor security effort. Everyone in the community has to take part for this to work.
Now before all you anti-SPF’ers come thundering down on me, have a look at this random subset of badly-reputed domains from our Domain Reputation Database. Some of us at Avert Labs monitor the reputations of domains closely and keep quantitive data to repute behaviour of domains at any point in time. I took this sample and performed some simple DNS analysis on them, specifically looking for the following data:
Sample of Bad Domains Tested 42181 Promiscuous SPF 3.24% Suspect softfail SPF 10.55% SPF records no +all or ~all 23.68% SPF records netblocks /24+ 13.42% SPF records netblocks /8 0.42% SPF good 9.83% Bad DNS records 11.74% No MX resolves 0.68% No MX, no fallback A/AAAA 22.29%
I then took a 1h sample from just one of our traps looking for the bad domains in the MAIL FROM command5:
Sample of Bad Domains Tested 367 (0.87%) Promiscuous SPF 2.18% Suspect softfail SPF 36.24% SPF records no +all or ~all 26.70% SPF records netblocks /24+ 13.62% SPF records netblocks /8 0.27% SPF good 12.81% Bad DNS records 0.27% No MX resolves 1.63% No MX, no fallback A/AAAA 3.54%
There are two main conclusions that we may draw from this:
As a last test I checked the 1h sample again, but this time only looked at a sample of domains used in the MAIL FROM command that could be considered to be good domains and domains of unknown reputation:
Sample of Domains Tested 58930 Promiscuous SPF 0.17% Suspect softfail SPF 4.18% SPF records no +all or ~all 12.46% SPF records netblocks /24+ 5.28% SPF records netblocks /8 0.003% SPF good 7.18% Bad DNS records 0.28% No MX resolves 0.50% No MX, no fallback A/AAAA 1.58%
In this case only ~7.81% had bad mail records or SPF records of a dubious nature. This could mean that these domains were badly configured or that we, at Avert Labs, simply have not analysed those domains at the time that I took my sample. Eliminating these from the sample we end up with 7.18% having good SPF records and the rest ~85% not having any SPF records. As sad as it may be, I can deduce from this that 85% of domains are getting joe-jobbed, because they have not SPF records!
The case of the null-sender
Obviously when MAIL FROM: is used, DNS queries cannot be used. This is a favourite technique with some spammers to work around the DNS checking problem. This has led to some customers even asking whether the null-sender can be balnket banned. A knee-jerk approach to such a problem is not going to solve anything. RFC44087 recommends that for such cases the EHLO/HELO string is used. A conforming MTA will send the name of the mail server (or IP address in square brackets) as part of this SMTP command string. Using EHLO strings is not a foolproof technique, but it has its merits.
Conclusion:
There are a couple of important points that can be taken away from this analysis
In the future a way to get around the SPF problem for spammers is to create SPF records for their own spamming domains. Since we can easilty detect this, tyhey might to resort to more clever techniques like fast morphing DNS techniques where the ip4 entries in the SPF record changes the whole time. We can already detect that kind of behaviour as well. At this level it gets very hard for poor admin to just use off-the-shelve techniques and requires the use of a security service provider. This really brings us to the concept of applying full Domain Reputation at the point of MAIL FROM. Instead of an MTA doing all of the appropriate DNS queries for every connection, maybe it should just ask McAfee for the reputation of that domain …
6 The figure applies to percentage of domains not the percentage of email. It cannot be inferred that 33.5% of email can be blocked in this way.
7 RFC4408 is experimental.
|
|
great advice and sharing,I will buy one this fantastic pants for me .thanks
If you run dig -t TXT _spf.google.com you will get “v=spf1 ip4:216.239.32.0/19 ip4:64.233.160.0/19 ip4:66.249.80.0/20 ip4:72.14.192.0/18 ip4:209.85.128.0/17 ip4:66.102.0.0/20 ip4:74.125.0.0/16 ip4:64.18.0.0/20 ip4:207.126.144.0/20 ?all”
Should we forbid mail from google? I believe it will cut off half of the world from your organization
The assertion that “+all” indicates intent to spam is not correct. Such a record may also mean this record is ONLY intended for use with static white-lists, and to ensure forwarded email is not inadvertently lost. It seems not everyone respects the intent of various SPF results. : (
bell.ca would be one example of this.
Requesting that recipients check SPF records overlooks the sizable and very real hazard created by SPF as a DDoS exploit. _ALL_ the malicious SPF traffic generated by bad actors can be done without expending any of their resources. The bad actor would only need to utilize the local-part of some email address to randomize all subsequent queries without their base SPF record being re-read.
SPF expects as many as 11 subsequent SPF records to be read, which might be wildcard records now given local-part sub-domains! SPF also expects as many as 100 A, or AAAA records to be queried before quitting. This alone exceeds the amplification of all other DNS DDoS related exploits! The bad actor can simply conclude their records with “+all” where their email then receives flying colors.
Submit your own comments / message for this post