# Patent

## Title
System and method for filtering spam messages utilizing URL filtering module

## Abstract

Systems and methods for filtering spam messages utilizing a URL filtering module are described. In one embodiment, the method includes detecting, in an incoming message, data indicative of a URL and comparing the URL from the incoming message with URLs characterizing spam. The method further includes determining whether the incoming message is spam based on the comparison of the URL from the incoming message with the URLs characterizing spam.

## Background
RELATED APPLICATION
The present application claims priority to U.S. Provisional Application Ser. No. 60/479,754, filed Jun. 18, 2003, which is incorporated herein in its entirety.


FIELD OF THE INVENTION
The present invention relates to data processing, and in particular, to filtering email spam using a URL filtering module.
BACKGROUND OF THE INVENTION
The Internet is growing in popularity, and more and more people are conducting business over the Internet, advertising their products and services by generating and sending electronic mass mailings. These electronic messages (emails) are usually unsolicited and regarded as nuisances by the recipients because they occupy much of the storage space needed for necessary and important data processing. For example, a mail server may have to reject accepting an important and/or desired email when its storage capacity is filled to the maximum with unwanted emails containing advertisements. Moreover, thin client systems such as set top boxes, PDA's, network computers, and pagers all have limited storage capacity. Unwanted emails in any one of such systems can tie up a finite resource for the user. In addition, a typical user wastes time by downloading voluminous but useless advertisement information. These unwanted emails are commonly referred to as spam.
Presently, there are products that are capable of filtering out unwanted messages. For example, a spam block method exists which keeps an index list of all spam agents (i.e., companies that generate mass unsolicited emails), and provides means to block any email sent from a company on the list.
Another “junk mail” filter currently available employs filters which are based on predefined words and patterns as mentioned above. An incoming mail is designated as an unwanted mail if the subject contains a known spam pattern.
However, as spam filtering grows in sophistication, so do the techniques of spammers in avoiding the filters. Examples of tactics incorporated by a recent generation of spammers include randomization, origin concealment, and filter evasion using HTML.
Another tactic spammers use to avoid filters is soliciting recipients to perform additional actions beyond reading the incoming email. An example of one such method is providing a Uniform Resource Locator (URL) in the body of the email that points to a Web site.
Spammers often disguise the URL to make the URL look legitimate. The disguised URLs, purporting to originate from legitimate organizations, may then be used to entice recipients to provide private and financial information.
SUMMARY OF THE INVENTION
Systems and methods for filtering spam messages utilizing a URL filtering module are described herein. In one embodiment, the method includes detecting, in an incoming message, data indicative of a URL and comparing the URL from the incoming message with URLs characterizing spam. The method further includes determining whether the incoming message is spam based on the comparison of the URL from the incoming message with the URLs characterizing spam.
Other features of the present invention will be apparent from the accompanying drawings and from the detailed description that follows.



BRIEF DESCRIPTION OF THE DRAWINGS
The present invention will be understood more fully from the detailed description given below and from the accompanying drawings of various embodiments of the invention, which, however, should not be taken to limit the invention to the specific embodiments, but are for explanation and understanding only.
FIG. 1 is a block diagram of one embodiment of a system for controlling delivery of spam email based on URLs present in email.
FIG. 2 is a block diagram of one embodiment of a spam URL preparation module.
FIG. 3 is a block diagram of one embodiment of a URL filtering module.
FIG. 4 is a flow diagram of one embodiment of a process for filtering email messages based on URLs.
FIG. 5 is a flow diagram of one embodiment of a process for comparing host-level and path-level URLs from an incoming message with URLs indicative of spam.
FIG. 6 is a flow diagram of one embodiment of a process for comparing URLs containing sub-domains or redirects with URLs indicative of spam.
FIG. 7 is a flow diagram of one embodiment of a process for reducing noise in URL data.
FIG. 8 is a flow diagram of one embodiment of a process for determining whether an incoming email message is spam.
FIG. 9 is a flow diagram of one embodiment of a process for creating a database of URLs indicative of spam.
FIG. 10 is a flow diagram of one embodiment of a process for classifying URLs.
FIG. 11 is a block diagram of an exemplary computer system.



DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
A method and system for filtering email spam based on URLs present in email messages are described. In the following description, numerous details are set forth. It will be apparent, however, to one skilled in the art, that the present invention may be practiced without these specific details. In other instances, well-known structures and devices are shown in block diagram form, rather than in detail, in order to avoid obscuring the present invention.
Some portions of the detailed descriptions which follow are presented in terms of algorithms and symbolic representations of operations on data bits within a computer memory. These algorithmic descriptions and representations are the means used by those skilled in the data processing arts to most effectively convey the substance of their work to others skilled in the art. An algorithm is here, and generally, conceived to be a self-consistent sequence of steps leading to a desired result. The steps are those requiring physical manipulations of physical quantities. Usually, though not necessarily, these quantities take the form of electrical or magnetic signals capable of being stored, transferred, combined, compared, and otherwise manipulated. It has proven convenient at times, principally for reasons of common usage, to refer to these signals as bits, values, elements, symbols, characters, terms, numbers, or the like.
It should be borne in mind, however, that all of these and similar terms are to be associated with the appropriate physical quantities and are merely convenient labels applied to these quantities. Unless specifically stated otherwise as apparent from the following discussion, it is appreciated that throughout the description, discussions utilizing terms such as “processing” or “computing” or “calculating” or “determining” or “displaying” or the like, refer to the action and processes of a computer system, or similar electronic computing device, that manipulates and transforms data represented as physical (electronic) quantities within the computer system's registers and memories into other data similarly represented as physical quantities within the computer system memories or registers or other such information storage, transmission or display devices.
The present invention also relates to apparatus for performing the operations herein. This apparatus may be specially constructed for the required purposes, or it may comprise a general purpose computer selectively activated or reconfigured by a computer program stored in the computer. Such a computer program may be stored in a computer readable storage medium, such as, but is not limited to, any type of disk including floppy disks, optical disks, CD-ROMs, and magnetic-optical disks, read-only memories (ROMs), random access memories (RAMs), EPROMs, EEPROMs, magnetic or optical cards, or any type of media suitable for storing electronic instructions, and each coupled to a computer system bus.
The algorithms and displays presented herein are not inherently related to any particular computer or other apparatus. Various general purpose systems may be used with programs in accordance with the teachings herein, or it may prove convenient to construct more specialized apparatus to perform the required method steps. The required structure for a variety of these systems will appear from the description below. In addition, the present invention is not described with reference to any particular programming language. It will be appreciated that a variety of programming languages may be used to implement the teachings of the invention as described herein.
A machine-readable medium includes any mechanism for storing or transmitting information in a form readable by a machine (e.g., a computer). For example, a machine-readable medium includes read only memory (“ROM”); random access memory (“RAM”); magnetic disk storage media; optical storage media; flash memory devices; electrical, optical, acoustical or other form of propagated signals (e.g., carrier waves, infrared signals, digital signals, etc.); etc.
URLs
A Uniform Resource Locator (URL) is a standardized address for some resource (such as a document or image) on the Internet. According to Internet standards defined by the Internet Engineering Task Force (IETF), a URL has the following format: <scheme>: <scheme-specific-part>. A common syntax for the scheme-specific part is: //<user>:<password>@<host>:<port><url-path>. One exemplary scheme is HyperText Transfer Protocol (HTTP). An HTTP URL has the following format: http://<host>:<port>/<path>?<searchprt>. The host may be a hostname (e.g., http://www.brightmail.com) or a hostnumber (e.g., http://209.157.160.6). The hostnumber is also referred to as an IP address. URLs may also point to a secure web site using the secure version of HTTP known as HTTPS.
URLs may include sub-domains and redirections to target URLs. The inclusion of different sub-domains into a URL may allow spammers to create unique URLs pointing to the same target URL. For example, a spammer may point to the same spam URL “http://hgh.com” from the URLs “http://abunchoftext.hgh.com” and “http://abunchofbananas.hch.com” that include different sub-domains. Similarly, the inclusion of the same redirect URL into two different URLs may allow spammers to create unique URLs pointing to the same target URL. For example, the URL “http://rd.yahoo.com/structure/226/3696/454/*http://www.pillsdirect.net” points to the target URL “http://www.pillsdirect.net”.
Filtering Email Spam Based on a URL
FIG. 1 is a block diagram of one embodiment of a system for controlling delivery of spam electronic mail (email) based on URLs present in email. The system includes a control center 102 coupled to a communications network 100 such as a public network (e.g., the Internet, a wireless network, etc.) or a private network (e.g., LAN, Intranet, etc.). The control center 102 communicates with multiple network servers 104 via the network 100. Each server 104 communicates with user terminals 106 using a private or public network.
The control center 102 is an anti-spam facility that is responsible for analyzing messages identified as spam, developing filtering rules for detecting spam, and distributing the filtering rules to servers 104. A message may be identified as spam because it was sent by a known spam source (as determined, for example, using a “spam probe”, i.e., an email address specifically selected to make its way into as many spammer mailing lists as possible).
A server 104 operates at a customer site and may be a mail server that receives and stores messages addressed to users of corresponding user terminals 106. Alternatively, a server 104 may be a different server coupled to the mail server 104. Servers 104 are responsible for filtering incoming messages based on the filtering rules received from the control center 102. Servers 104 operate as clients receiving services from the control center 102.
In one embodiment, the control center 102 includes a spam URL preparation module 108 that is responsible for generating URL data associated with a spam attack and sending this data to the servers 104. As will be discussed in more detail below, the URL data associated with a spam attack may include, for example, a hash value of the URL associated with a spam attack and/or a string of the URL associated with a spam attack.
Each server 104 includes a URL filtering module 110 that is responsible for storing spam URL data received from the control center 102 and identifying incoming email messages including URLs resembling any of the spam URLs.
In an alternative embodiment, each server 104 hosts both the spam URL preparation module 108 that generates spam URL data and the URL filtering module 110 that uses the spam URL data to determine whether incoming email messages are spam.
FIG. 2 is a block diagram of one embodiment of a spam URL preparation module 200. The spam URL preparation module 200 includes a spam content parser 202, a spam URL generator 206, and a spam URL transmitter 208.
The spam content parser 202 is responsible for parsing the body of email messages resulting from spam attacks (referred to as spam messages) to identify data indicative of URLs. The incoming email message may be a plain text message, an HTML message, or a message of any other type.
In one embodiment, the spam URL preparation module 200 includes a noise reduction algorithm 204 that is responsible for removing noise from data indicative of URLs. As will be discussed in more detail below, noise represents unnecessary information, encoded information, and other extraneous information in the URL.
The spam URL generator 206 is responsible for generating URL rules that include URL data associated with a spam attack. In one embodiment, the spam URL generator 206 generates URL rules automatically. Alternatively, the spam URL generator 206 generates URL rules based on input provided by an operator of the control center 102.
In one embodiment, if a spam URL includes a path-level component, the spam generator 206 generates a URL rule including URL data for a host component of the URL (a host-level URL) and a path component of the URL (a path-level URL).
In one embodiment, if a spam URL includes one or more sub-domains, the spam generator 206 generates a URL rule including URL data for each sub-domain level. For example, for the URL “http://www.foo.test.com/spam-directory”, the URL data may be created for sub-domains “foo.test.com”, “foo.test.com/spam-directory” and “test.com”. In one embodiment, the number for sub-domains in the URL data may not exceed a maximum allowed number of sub-domains.
In one embodiment, if a spam URL includes a redirection to a target URL, the spam generator 206 generates a URL rule including URL data for the entire URL and the target URL. For example, for the URL “http://rd.yahoo.com/structure/226/3696/454/*http://www.pillsdirect.net”, the URL data is generated for the entire URL and the target URL “http://www.pillsdirect.net”.
In one embodiment, the URL data includes a hash value of the URL associated with a spam attack. In another embodiment, the URL data includes a string of the URL associated with a spam attack. In yet another embodiment, the URL data includes both a hash value and a string of the URL associated with a spam attack
In one embodiment, the URL generator 206 maintains a URL white-list that includes legitimate URLs that are not indicative of spam. In this embodiment, the URL generator 206 compares the URL extracted from a spam message with the URLs in the URL whitelist and refrains from including URLs matching URLs from the whitelist in the URL rules.
In one embodiment, the URL generator 206 associates each URL data with a relevant weight (e.g., as provided by an operator at the control center 102). The weight indicates the degree of spam indication for a specific URL. For example, for one URL, the presence of this URL alone is sufficient to classify an incoming email message as spam. For some other URLs, however, multiple URLs may need to be present in an incoming email message for this message to be classified as spam. In one embodiment, the URL generator 206 includes the weight in a relevant URL rule.
In one embodiment, a URL rule may include multiple URLs and/or their identifiers (e.g., hash values), as will be discussed in more detail below.
In one embodiment, the spam URL generator 206 also determines the type of web site associated with the URL (e.g., a product line of an associated web site) and includes a relevant web site type into each URL rule.
The spam URL transmitter 208 is responsible for distributing URL rules that include URL data associated with spam attacks to participating clients (e.g., modules operating at customer sites such as URL filtering modules 110 of FIG. 1). In one embodiment, the spam URL transmitter 208 distributes URL rules based on web site types requested by participating clients.
In one embodiment, each client periodically (e.g., each 5 minutes) initiates a connection (e.g., a secure HTTPS connection) with the call center 102. Using the pull-based connection, URL rules are transmitted from the call center 102 to the relevant client.
FIG. 3 is a block diagram of a URL filtering module 300. The URL filtering module 300 includes an incoming message parser 302, a spam URL receiver 306, a URL data generator 310, a resemblance identifier 312, and a spam URL database 304.
The incoming message parser 302 is responsible for parsing the body of the incoming email messages for data indicative of URLs. The incoming email message may be a plain text message, an HTML message, or a message of any other type. In one embodiment, the URL filtering module 300 includes a URL normalizer 308 that is responsible for removing noise from the data indicative of a URL.
The spam URL receiver 306 is responsible for receiving URL rules including URL data associated with spam attacks and storing the URL rules in the spam URL database 304.
The URL data generator 310 is responsible for generating URL data for each URL extracted from an incoming email message. The URL data may include a hash value of the extracted URL and/or a string of the extracted URL. In one embodiment, the URL data generator 310 generates URL data both for a host component and path component of the URL, as will be discussed in more detail below in conjunction with FIG. 5.
The resemblance identifier 312 is responsible for comparing the URL data from the incoming email message with the spam URL data included in the URL rules stored in the spam database 304 and determining, based on this comparison, whether the incoming email message is spam. The determination may be based on exact matches (e.g., exact matches of hashes) or a certain degree of similarity (e.g., similarity between URL strings).
FIG. 4 is a flow diagram of one embodiment of a process 400 for filtering email messages based on URLs. The process may be performed by processing logic that may comprise hardware (e.g., dedicated logic, programmable logic, microcode, etc.), software (such as run on a general purpose computer system or a dedicated machine), or a combination of both. In one embodiment, processing logic resides at a server 104 of FIG. 1.
Referring to FIG. 4, process 400 begins with processing logic receiving an email message (processing block 402). The email message may be an HTML formatted message, a plain text message, or a message of any other type.
At processing block 404, processing logic detects data indicative of a URL in the email message. The data indicative of a URL may be detected in the body of the email message or “mail-to” data in the email message. The data indicative of a URL includes a string similar to that of a URL. In one embodiment, the URL string may be detected in a markup language (e.g., HTML) message based on formatting data surrounding the URL string in the message. For example, in the HTML message, the URL string may be formatted as follows:
<a href=“http://www.quickinspirations.com”>.
The URL string may be detected even if formatting rules were not followed (e.g., the URL string is formatted incorrectly). For example, in HTML, the URL string may be formatted incorrectly as <a href-http://www.quickinspirations.com>.
At processing block 406, processing logic identifies a URL based on the data indicative of a URL (processing block 406). In some embodiments, processing logic identifies a URL by reducing noise in the data indicative of a URL (e.g., by eliminating extraneous information present in the data indicative of the URL). One embodiment of a method for reducing noise in data indicative of a URL will be described in greater detail below.
At processing block 408, processing logic compares the identified URL with spam URLs contained in the URL rules. The URLs may be compared using hashes, regular expressions (e.g., URL strings), or any other URL identifiers. Some embodiments of methods for comparing URLs will be described in more detail below.
At processing block 410, processing logic determines whether the received email message is spam. In one embodiment, this determination is based on an exact match between a URL from an incoming message and a spam URL from any URL rule.
In another embodiment, processing logic determines whether a resemblance between a URL from an incoming message and a spam URL from a URL rule exceeds a threshold.
In some embodiments, processing logic determines that an incoming message is spam if both the extracted URL and some other URL are present in the message. For example, the message may be classified as spam if a URL linking to a product being sold (e.g., http://eBaySecrtes.netbz.net/ebay/) is present in the message together with an opt-out link for a given direct mailer (e.g., http://www.netbz.net/). Alternatively, processing logic may determine that an incoming message is spam if the message includes an extracted URL but excludes some other URL. For example, the message may be classified as spam if a URL linking to a product being sold (e.g., http://eBaySecrtes.netbz.net/ebay/) is present in the message but a URL linking to a host web site (e.g., http://ebay.com/) is not present in the message.
In some embodiment, processing logic uses weights associated with spam URLs to determine whether an incoming message is spam, as will be described in more detail below with reference to FIG. 8.
As discussed above, a URL may include a host component and a path component identifying a single subdirectory. For some web sites, the use of a host-level URL may be enough to identify spam. However, for other web sites, a path-level URL may be needed. FIG. 5 is a flow diagram of one embodiment of a process 500 for comparing host-level and path-level URLs from an incoming message with URLs indicative of spam. The process may be performed by processing logic that may comprise hardware (e.g., dedicated logic, programmable logic, microcode, etc.), software (such as run on a general purpose computer system or a dedicated machine), or a combination of both. In one embodiment, processing logic resides at a server 104 of FIG. 1.
At processing block 502, processing logic determines whether a URL from an incoming email message includes a path component (processing block 502). If not, processing logic creates a hash value of the URL (processing block 504) and determines whether this hash value matches any spam URL hashes contained in URL rules stored in the database (processing block 506). If not, process 500 ends. If so, processing logic proceeds to processing block 516.
If the URL from the incoming email message includes a path component, processing logic creates a hash value for both a host-level URL (processing block 508) and a path-level URL (processing block 510). For example, for the URL “http://www.netbiz.net/some-directory”, processing logic creates a hash value for the host-level URL “http://www.netbiz.net” and the path-level URL “http://www.netbiz.net/some-directory”.
Next, processing logic determines whether the hash value of the path-level URL matches any spam URL hashes contained in the URL rules stored in the database (processing block 512). If so, processing logic proceeds to processing block 516. If not, processing logic determines whether the hash value of the host-level URL matches any spam URL hashes in the URL rules stored in the database (processing block 514). If the determination made at processing block 514 is negative, process 500 ends. If this determination is positive, processing logic proceeds to processing block 516.
At processing block 516, processing logic determines whether a URL rule containing the matching spam URL specifies an additional (inclusion) URL that also need to be present in the message for the message to be classified as span. If processing logic determines that the URL rules species an inclusion URL, it further determines whether a hash of any other URL from the message matches a hash of the inclusion URL (processing block 518). If not, process 500 ends. If so, processing logic reports a match (processing block 524).
If processing logic determines that the URL rule does not specify an inclusion URL, it further determines whether the URL rule containing the matching spam URL specifies an exclusion URL (processing block 520). An exclusion URL is specified to indicate that the message will be classified as spam if the matching URL is present in the message but the exclusion URL is not present in the message.
If processing logic determines that the URL rule does not specify an exclusion URL, process 500 ends. If processing logic determines that the URL rule specifies an exclusion URL, it further determines whether a hash of any other URL from the message matches a hash of the exclusion URL (processing block 522). If so, process 500 ends. If not, processing logic reports a match (processing block 524).
It should be noted that although process 500 as described above uses URL hashes, it may instead use URL strings or any other URL identifiers without loss of generality. In some embodiments, in which process 500 uses URL strings, the URL strings are compared for similarity, rather than an exact match.
In one embodiment, process 500 may detect matches with multiple URL rules for a single email message. For example, the message “Hi there—check out http://eBaySecrets.netbz.net/ebay/ for a great deal or otherwise, if you've got plenty of money, go to http://www.netbz.net/some-directory” will match a URL rule specifying the URL “http://eBaySecrets.netbz.net” and a URL rule specifying a combination of two URLs “http://eBaySecrets.netbz.net/ebay/” and “http://www.netbz.net/”.
FIG. 6 is a flow diagram of one embodiment of a process 600 for comparing URLs containing sub-domains or redirects with URLs indicative of spam. The process may be performed by processing logic that may comprise hardware (e.g., dedicated logic, programmable logic, microcode, etc.), software (such as run on a general purpose computer system or a dedicated machine), or a combination of both. In one embodiment, processing logic resides at a server 104 of FIG. 1.
At processing block 602, processing logic determines whether a URL from an incoming email message includes one or more sub-domains. If so, processing logic extracts, from the URL, a URL string for each sub-domain level (processing block 614). In one embodiment, the number for sub-domains in the extracted URL string may not exceed a maximum number of sub-domains. For example, if the maximum number of sub-domains is 4, the following URL strings may be extracted from the URL “http://www.abc.xyz.foo.test.com/spam-directory”: “test.com”, “foo.test.com”, and “xyz.foo.test.com”.
At processing block 616, processing logic determines whether a URL string associated with the smallest sub-domain level (e.g., “test.com” in the previous example) matches any spam URL string from URL rules stored in the database. If so, processing logic reports a match (processing block 622). If not, processing logic determines whether there are any extracted URL strings of higher sub-domain levels. If there are no more extracted URL strings, method 600 ends. If there is an extracted URL string of a higher sub-domain level, processing logic determines whether a URL string associated with the higher sub-domain level (e.g., “foo.test.com” in the previous example) matches any spam URL string from URL rules stored in the database. If so, processing logic reports a match (processing block 622). If not, processing logic returns to processing block 618.
If processing logic determines at processing block 602 that the URL from the incoming email message does not include any sub-domains, it further determines whether this URL include a redirection to a target URL (processing block 604). If so, processing logic extracts, from the URL, a URL string for the target URL (processing block 606) and determines whether the extracted URL string matches any spam URL string from URL rules stored in the database (processing block 610). If this determination is positive, processing logic reports a match (processing block 622). If this determination is negative, process 600 ends.
If processing logic determines at processing block 604 that the URL from the incoming email message does not include a redirect to a target URL, it further determines whether the string of this URL matches any spam URL strings from URL rules stored in the database (processing block 612). If so, processing logic reports a match (processing block 622). If not, process 600 ends.
FIG. 7 is a flow diagram of one embodiment of a process 700 for reducing noise in URL data. The process may be performed by processing logic that may comprise hardware (e.g., dedicated logic, programmable logic, microcode, etc.), software (such as run on a general purpose computer system or a dedicated machine), or a combination of both. In one embodiment, processing logic resides at a server 104 of FIG. 1.
Process 700 begins with processing logic detecting, in URL data, data indicative of noise (processing block 702). Noise may represent extraneous information or encoded information that may be added to the URL to provide legitimacy to the URL. The extraneous information may include, for example, a user name or password or “@” signs. The encoded information may include, for example, numeric character references and character entity references. Numeric character references specify the code position of a character in the document character set. Character entity references use symbolic names so that authors need not remember code positions. For example, the character entity reference “å” refers to the lowercase “a” character topped with a ring.
At processing block 704, processing logic modifies the URL to reduce the noise in the URL data. In one embodiment, the content modification includes translating the numeric character references and character entity references to their ASCII equivalents. For example, translation of hexadecimal encoded ASCII HTML anchor characters in the URL “http://%77%77%77.brightmail.com” will convert this URL into “http://www.brightmail.com”. Translation of hexadecimal encoded ASCII HTML enchor numerals in the URL “http://%32%30%39.157.160.5” will convert this URL into “http://209.157.160.5”. Translation of decimal encoded ASCII HTML characters in the URL “http://www.brigtmail.com” will convert this URL into “http://www.brightmail.com”. Translation of decimal encoded ASCII HTML numerals in the URL “http://209.157.160.5” will convert this URL into “http://209.157.160.5”.
In addition, IP addresses encoded as hexadecimal or decimal representations may be translated as well. For example, translation of hexadecimal IP representation in the URL “http://0xd19da005” will convert this URL into “http://209.157.160.5”.
Sometimes the conversion may need to be repeated. For example, the string “&” corresponds to the string “&” in ASCII, the string “#” corresponds to the string “#” in ASCII, the string “3” corresponds to 3 in ASCII, the string “8” corresponds to 8 in ASCII, and “;” corresponds to the string “;” in ASCII. Hence, the combined string “&#38;”, when converted, results in the string “&” that also needs to be converted.
In one embodiment, the content modification also includes removing extraneous information. For example, a URL having a user name or password may be modified to remove the user name or password. A URL having one or more “@” signs may be modified to exclude the extraneous information prior to the last @ sign. Additionally, “www.” may be removed from a URL.
FIG. 8 is a flow diagram of one embodiment of a process 800 for determining whether an incoming email message is spam. The process may be performed by processing logic that may comprise hardware (e.g., dedicated logic, programmable logic, microcode, etc.), software (such as run on a general purpose computer system or a dedicated machine), or a combination of both. In one embodiment, processing logic resides at a server 104 of FIG. 1.
Referring to FIG. 8, process 800 begins with processing logic comparing a first URL in the incoming message with weighted spam URLs in URL rules stored in the database (processing block 802). Spam URLs may be weighted according to their effectiveness at identifying spam. For example, the weight of a spam URL may be high enough to exceed a pre-determined threshold, determinative of whether the email is spam. Alternatively, a URL characteristic of a legitimate message (i.e., not spam) may have a low or even a negative weighted value. Additionally, a URL may be weighted such that the URL causes the message to be classified as spam if the message includes one or more additional URLs indicative of spam.
At decision box 804, processing logic decides whether there is a match between the first URL and one of the weighted spam URLs.
If there is no match between the first URL and any of the weighted spam URLs, processing logic determines that the incoming email message is not spam (processing block 818), and the process 800 ends. Otherwise, processing logic decides whether the weight of the matching spam URL exceeds a threshold (processing block 806).
If the weight of the matching spam URL exceeds a threshold, processing logic determines that the incoming email message is spam (block 820), and the process 800 ends. If not, processing logic decides whether there are more URLs in the incoming email message (decision box 808).
If there are no more URLs in the message, processing logic determines that the incoming email is not spam (block 818). If there are more URLs in the message, processing block compares the next URL in the incoming message with the weighted spam URLs (processing block 810).
At decision box 812, processing logic decides whether there is a match between the next URL and one of the weighted spam URLs.
If there is no match between the next URL and any of the weighted spam URLs, processing logic determines that the incoming email message is not spam (block 818), and process 800 ends. Otherwise, processing logic calculates the sum of the weights of the first matching spam and next matching spam URLs (processing block 814).
At decision box 816, processing logic decides whether the sum of the weights of the matching spam URLs exceeds a threshold.
If the sum of the weights of the matching spam URLs exceeds a threshold, processing logic determines that the incoming email message is spam (block 820), and process 800 ends. If not, processing logic returns to decision box 808.
In one embodiment, processing logic determines how many times a host component appears in the URLs of the message. If the frequency of the host component's appearance exceeds a threshold (or is between certain numbers or equal to a certain number), processing logic assigns a weight to the host-level URL that is added to the weight calculated for the message.
In one embodiment, in which a URL rule includes a combination of URLs, the weight assigned to the combination of URLs is considered when determining whether the email message is spam.
FIG. 9 is a flow diagram of one embodiment of a process 900 for creating a database of URLs indicative of spam. The process may be performed by processing logic that may comprise hardware (e.g., dedicated logic, programmable logic, microcode, etc.), software (such as run on a general purpose computer system or a dedicated machine), or a combination of both. In one embodiment, processing logic resides at a control center 102 of FIG. 1.
Referring to FIG. 9, process 900 begins with processing logic receiving a spam email message (processing block 902).
At processing block 904, processing logic extracts data indicative of a URL from the spam message.
At processing block 906, processing logic identifies the URL based on user input and the data indicative of a URL. In some embodiments, the data indicative of a URL is normalized to reduce noise, as described above with reference to FIG. 7.
At processing block 908, the processing logic creates a URL rule for the URL and stores the URL rule in a database. A URL rule may include a hash value and/or a string of the URL. In some embodiments, a URL rule may include data for multiple URLs. In addition, in some embodiments, a URL rule may include a weight assigned to the URL(s). Further, in some embodiments, a URL rule may include a host-level URL and a path-level URL, URLs of multiple sub-domain levels, or a target URL identified by a redirect included in the URL.
In some embodiments, the spam URLs may go through a quality control process. In one embodiment, the spam URL may be checked against a list of legitimate URLs to ensure that the URL is indicative of spam.
At processing block 910, processing logic transfers URL rules to clients to be used for detecting incoming spam messages. In one embodiment, the URL rules may be transferred to clients using encrypted distribution. Alternatively, the URL rules may be stored to a computer readable medium, such as, for example, a disk.
FIG. 10 is a flow diagram of one embodiment of a process 1000 for classifying spam URLs. The process may be performed by processing logic that may comprise hardware (e.g., dedicated logic, programmable logic, microcode, etc.), software (such as run on a general purpose computer system or a dedicated machine), or a combination of both. In one embodiment, processing logic resides at a control center 102 of FIG. 1.
Referring to FIG. 10, process 1000 begins with processing logic classifying spam URLs based on types of associated web sites (processing block 1002). Exemplary web site types include adult, product, and the like, wherein adult and product refer to the content of the website to which the URL points.
At processing block 1004, processing logic includes spam URLs and their classifications into URL rules and stores the URL rules in a database.
At processing block 1006, processing logic sends URL rules to a client based on the classification desired by the client. Classifying spam URLs based on the web site type may also enable more effective filtering of URLs by allowing different actions to be taken on different classifications of spam. For example, all adult URLs may automatically be characterized as spam and deleted, while all product URLs may be flagged for further analysis.
An Exemplary Computer System
FIG. 11 is a block diagram of an exemplary computer system 1100 that may be used to perform one or more of the operations described herein. In alternative embodiments, the machine may comprise a network router, a network switch, a network bridge, Personal Digital Assistant (PDA), a cellular telephone, a web appliance or any machine capable of executing a sequence of instructions that specify actions to be taken by that machine.
The computer system 1100 includes a processor 1102, a main memory 1104 and a static memory 1106, which communicate with each other via a buss 1108. The computer system 1100 may further include a video display unit 1110 (e.g., a liquid crystal display (LCD) or a cathode ray tube (CRT)). The computer system 1100 also includes an alpha-numeric input device 1112 (e.g., a keyboard), a cursor control device 1114 (e.g., a mouse), a disk drive unit 1116, a signal generation device 1120 (e.g., a speaker) and a network interface device 1122.
The disk drive unit 1116 includes a computer-readable medium 1124 on which is stored a set of instructions (i.e., software) 1126 embodying any one, or all, of the methodologies described above. The software 1126 is shown to reside, completely or at least partially, within the main memory 1104 and/or within the processor 1102. The software 1126 may further be transmitted or received via the network interface device 1122. For the purposes of this specification, the term “computer-readable medium” shall be taken to include any medium that is capable of storing or encoding a sequence of instructions for execution by the computer and that cause the computer to perform any one of the methodologies of the present invention. The term “computer-readable medium” shall accordingly be taken to include, but not be limited to, solid-state memories, optical and magnetic disks, and carrier wave signals.
Although the present invention has been described in terms of certain preferred embodiments, those skilled in the art will recognize that other and further changes and modifications may be made hereto without departing from the spirit of the invention, and it is intended to claim all such changes and modifications as fall within the true scope of the invention. Accordingly, the scope of the present invention is not to be limited by the particular embodiments described, but is to be defined only by reference to the appended claims and equivalents thereof.

## Claims

1. A method, comprising:
a computer system receiving a message identified as being a spam message;
the computer system extracting, from the received message, a first uniform resource locator (URL), wherein the first URL includes a host component and a path component;
the computer system generating a first hash value based on the host component, but not the path component, of the first URL;
the computer system generating a second hash value based on the host component and the path component of the first URL;
the computer system using the generated first hash value to create a first spam filter, wherein the first spam filter is usable to determine whether a subsequently received message includes the host component of the first URL; and
the computer system using the generated second hash value to create a second spam filter, wherein the second spam filter is usable to determine whether the subsequently received message includes the host component and the path component of the first URL.

2. The method of claim 1, further comprising before creating the spam filter, the computer system reducing noise in the first URL.

3. The method of claim 2, wherein said reducing includes normalizing decimal or hexadecimal information in the received message.

4. The method of claim 1, wherein the received message is addressed to a probe email address.

5. The method of claim 1, further comprising the computer system distributing the first and second spam filters to one or more other computer systems.

6. The method of claim 1, wherein the first and second spam filters are each assigned a weight value based on that spam filter's effectiveness at identifying spam messages.

7. The method of claim 1, wherein the first spam filter is usable to identify the subsequently received message as being spam based on the subsequently received message including the host component of the first URL and at least a portion of a second URL.

8. The method of claim 1, wherein the first spam filter is usable to identify the subsequently received message as being spam based on the subsequently received message including the host component of the first URL but not including a second URL.

9. The method of claim 1, further comprising the computer system using the created first and second filters to identify subsequently received messages as being spam messages.

10. The method of claim 1, wherein the first URL is associated with a spam category, and wherein the method further comprises the computer system performing different actions based on the spam category.

11. A non-transitory computer-readable medium having program instructions stored thereon that are executable by a computer system to cause the computer system to perform operations comprising:
receiving a message identified as being a spam message;
extracting, from the received message, a first uniform resource locator (URL), wherein the first URL includes a host component and a path component;
generating a first hash value based on the host component, but not the path component, of the first URL;
generating a second hash value based on the host component and the path component of the first URL;
using the generated first hash value to create a first spam filter, wherein the first spam filter is usable to determine whether a subsequently received message includes the host component of the first URL; and
using the generated second hash value to create a second spam filter, wherein the second spam filter is usable to determine whether the subsequently received message includes the host component and the path component of the first URL.

12. The computer-readable medium of claim 11, wherein the first and second spam filters are each assigned a weight value based on that spam filter's effectiveness at identifying spam messages.

13. The computer-readable medium of claim 11, wherein the first spam filter is usable to identify the subsequently received message as being spam based on the subsequently received message including the host component of the first URL and at least a portion of a second URL.

14. The computer-readable medium of claim 11, wherein the first spam filter is usable to identify the subsequently received message as being spam based on the subsequently received message including the host component of the first URL but not including a second URL.

15. The computer-readable medium of claim 11, wherein the operations further comprise distributing the first and second spam filters to one or more other computer systems.

16. The computer-readable medium of claim 11, wherein the operations further comprise using the created first and second filters to identify subsequently received messages as being spam messages.