SlideShare a Scribd company logo
1 of 29
Download to read offline
Spam Filtering Techniques


   UMAR M. A. ALHARAKY, B.SC.

    RAKAN RAZOUK, PH.D.
Introduction

 What is spam?


    Spam also called as Unsolicited Commercial Email (UCE)

    Involves sending messages by email to numerous recipients at
     the same time (Mass Emailing).

    Grew exponentially since 1990 but has leveled off recently and
     is no longer growing exponentially

    80% of all spam is sent by less than 200 spammers
Introduction

 Purpose of Spam

    Advertisements

    Pyramid schemes (Multi-Level Marketing)

    Giveaways

    Chain letters

    Political email

    Stock market advice
Introduction

 Spam as a problem
      Consumes   computing resources and time
      Reduces the effectiveness of legitimate advertising
      Cost Shifting
      Fraud
      Identity Theft
      Consumer Perception
      Global Implications


 John Borgan [ReplyNet] – “Junk email is not just annoying anymore.
  It’s eating into productivity. It’s eating into time”
Some Statistics

       Cost of Spam 2009:
       $130 billion worldwide
       $42 billion in US alone
       30% increase from 2007 estimates
       100% increase in 2007 from 2005

 Main components of cost:
   Productivity loss from inspecting and deleting spam missed by spam
    control products (False Negatives)
   Productivity loss from searching for legitimate mails deleted in error
    by spam control products (False Positives)
       Operations and helpdesk costs (Filters and Firewalls – installment
        and maintenance)
Some Statistics
Some Statistics

   Spam Averages about 88% of all emails sent
       Barracuda Networks:
Introduction

 Federal Regulations (CAN-SPAM act of 2003)

    Controlling the Assault of Non-Solicited Pornography And
     Marketing (CAN-SPAM) Act of 2003 – signed on 12/16/2003



    Commercial email must adhere to three types of compliance
        Unsubscribe Compliance

      Content Compliance

      Sender   Behavior Compliance
Introduction

 Email Address Harvesting - Process of obtaining
 email addresses through various methods

    Purchasing /Trading lists with other spammers

    Bots

    Directory harvest attack

    Free Product or Services requiring valid email address

    News bulletins /Forums
Spam Life Cycle
Types of Spam Filters


   Header Filters
       Look at email headers to judge if forged or not
       Contain more information in addition to recipient , sender and subject
        fields




   Language Filters
       filters based on email body language
       Can be used to filter out spam written in foreign languages
Types of Spam Filters


   Content Filters
     Scan the text content of emails
     Use fuzzy logic


   Permission Filters
       Based on Challenge /Response system

   White list/blacklist Filters
     Will only accept emails from list of “good email addresses”
     Will block emails from “bad email addresses”
Types of Spam Filters


   Community Filters
     Work on  the principal of "communal knowledge" of spam
     These types of filters communicate with a central server.




   Bayesian Filters
     Statistical email filtering
     Uses Naïve Bayes classifier
Spam Filters Properties

   Filter must prevent spam from entering inboxes

   Able to detect the spam without blocking the ham
     Maximize    efficiency of the filter

   Do not require any modification to existing e-mail protocols

   Easily incremental
       Spam evolve continuously

       Need to adapt to each user
Data Mining and Spam Filtering

What is Data Mining?
 Predictive analysis of data for the discovery of trends and patterns
 Reveals critical insights into unstructured data.


Why Data Mining?
 The amount of data is increasing every year.
 To convert the acquired data into information and knowledge and use it in
  decision making.

How it is done?
 Utilizes computing power to apply sophisticated algorithms for knowledge
  discovery of data.

The Target…
 Spam Filtering using Data Mining
Data Mining and Spam Filtering


 Spam Filtering can be seen as a specific text
 categorization (Classification)



 History
       Jason Rennie’s iFile (1996); first know program to use Bayesian
        Classification for spam filtering
Bayesian Classification

 Particular words have particular probabilities of
 occurring in spam email and in legitimate email
  For instance, most email users will frequently encounter the word
   "Viagra" in spam email, but will seldom see it in other email

 The filter doesn't know these probabilities in
 advance, and must first be trained so it can build
 them up

 To train the filter, the user must manually indicate
 whether a new email is spam or not
Bayesian Classification

 For all words in each training email, the filter will
 adjust the probabilities that each word will appear in
 spam or legitimate email in its database
  For instance, Bayesian spam filters will typically have learned a very
   high spam probability for the words "Viagra" and "refinance", but a
   very low spam probability for words seen only in legitimate email,
   such as the names of friends and family members

 After training, the word probabilities are used to
 compute the probability that an email with a
 particular set of words in it belongs to either
 category
Bayesian Classification

 Each word in the email contributes to the email's
 spam probability, or only the most interesting words

 This contribution is computed using Bayes'
 theorem

 Then, the email's spam probability is computed
 over all words in the email, and if the total exceeds
 a certain threshold (say 95%), the filter will mark
 the email as a spam.
Bayesian Classification

 The initial training can usually be refined when
  wrong judgments from the software are identified
  (false positives or false negatives)
  That allows the software to dynamically adapt to the ever evolving
   nature of spam

 Some spam filters combine the results of both
  Bayesian spam filtering and other heuristics (pre-
  defined rules about the contents, looking at the message's
  envelope, etc.)
  Resulting   in even higher filtering accuracy
Computing the Probability


1. Computing the probability that a message
  containing a given word is spam:

 Let's suppose the suspected message contains the
  word "replica“
     Most people who are used to receiving e-mail know that this
      message is likely to be spam

 The formula used by the software for computing
Computing the Probability




where:
           is the probability that a message is a spam, knowing that the
    word "replica" is in it;
       is the overall probability that any given message is spam;
           is the probability that the word "replica" appears in spam
    messages;
        is the overall probability that any given message is not spam (is
    "ham");
            is the probability that the word "replica" appears in ham
    messages.
Computing the Probability


2. Spam or ham:
 Recent statistics show that current probability of
 any message to be spam is 80%, at the very least:

 However, most spam detection software are “not
 biased”, meaning that they have no prejudice
 regarding the incoming email


     It is advisable that the datasets of spam and ham are of same size
Computing the Probability


2. Spam or ham:



 This quantity is called "spamicity" (or "spaminess")
 of the word "replica“
     Pr(W|S) is approximated to the frequency of messages containing
      "replica" in the messages identified as spam during the learning
      phase
     Pr(W|H) is approximated to the frequency of messages containing
      "replica" in the messages identified as ham during the learning
      phase
Computing the Probability


3. Combining individual probabilities:
 The Bayesian spam filtering software makes the "naïve"
  assumption that the words present in the message
  are independent events

 With that assumption,



where:
 p is the probability that the suspect message is spam
 pi is the probability p(S|Wi)
Pros & Cons

Advantages
 It can be trained on a per-user basis
    The spam that a user receives is often related to the
     online user's activities
Disadvantages
 Bayesian spam filtering is susceptible
  to Bayesian poisoning
    Insertion of random innocuous words that are not
     normally associated with spam
    Replace text with pictures
    Google, by its Gmail email system, performing an
     OCR to every mid to large size image, analyzing the
     text inside
Pros & Cons
Conclusions


 Spam emails not only consume computing resources,
 but can also be frustrating

 Numerous detection techniques exist, but none is a
 “good for all scenarios” technique

 Data Mining approaches for content based spam
 filtering seem promising
Thank You / Questions

More Related Content

What's hot

E Mail & Spam Presentation
E Mail & Spam PresentationE Mail & Spam Presentation
E Mail & Spam Presentationnewsan2001
 
Spam filtering with Naive Bayes Algorithm
Spam filtering with Naive Bayes AlgorithmSpam filtering with Naive Bayes Algorithm
Spam filtering with Naive Bayes AlgorithmAkshay Pal
 
Detection of phishing websites
Detection of phishing websitesDetection of phishing websites
Detection of phishing websitesm srikanth
 
Web scraping
Web scrapingWeb scraping
Web scrapingSelecto
 
PHISHING DETECTION
PHISHING DETECTIONPHISHING DETECTION
PHISHING DETECTIONumme ayesha
 
Phishing Detection using Machine Learning
Phishing Detection using Machine LearningPhishing Detection using Machine Learning
Phishing Detection using Machine LearningArjun BM
 
Spam detection using machine learning based binary classifier_043660
Spam detection using machine learning based binary classifier_043660Spam detection using machine learning based binary classifier_043660
Spam detection using machine learning based binary classifier_043660syaidatulamirah
 
Seminar Presentation | Network Intrusion Detection using Supervised Machine L...
Seminar Presentation | Network Intrusion Detection using Supervised Machine L...Seminar Presentation | Network Intrusion Detection using Supervised Machine L...
Seminar Presentation | Network Intrusion Detection using Supervised Machine L...Jowin John Chemban
 
Presentation-Detecting Spammers on Social Networks
Presentation-Detecting Spammers on Social NetworksPresentation-Detecting Spammers on Social Networks
Presentation-Detecting Spammers on Social NetworksAshish Arora
 
final-spam-e-mail-detection-180125111231.pptx
final-spam-e-mail-detection-180125111231.pptxfinal-spam-e-mail-detection-180125111231.pptx
final-spam-e-mail-detection-180125111231.pptxinfotowards
 
An introduction to Machine Learning
An introduction to Machine LearningAn introduction to Machine Learning
An introduction to Machine Learningbutest
 
miniproject.ppt.pptx
miniproject.ppt.pptxminiproject.ppt.pptx
miniproject.ppt.pptxAnush90
 
User authentication
User authenticationUser authentication
User authenticationCAS
 
Credit card fraud detection
Credit card fraud detectionCredit card fraud detection
Credit card fraud detectionkalpesh1908
 

What's hot (20)

E Mail & Spam Presentation
E Mail & Spam PresentationE Mail & Spam Presentation
E Mail & Spam Presentation
 
Spam filtering with Naive Bayes Algorithm
Spam filtering with Naive Bayes AlgorithmSpam filtering with Naive Bayes Algorithm
Spam filtering with Naive Bayes Algorithm
 
Detection of phishing websites
Detection of phishing websitesDetection of phishing websites
Detection of phishing websites
 
FAKE NEWS DETECTION PPT
FAKE NEWS DETECTION PPT FAKE NEWS DETECTION PPT
FAKE NEWS DETECTION PPT
 
Intruders
IntrudersIntruders
Intruders
 
Web scraping
Web scrapingWeb scraping
Web scraping
 
Spam, security
Spam, securitySpam, security
Spam, security
 
Spam Email identification
Spam Email identificationSpam Email identification
Spam Email identification
 
PHISHING DETECTION
PHISHING DETECTIONPHISHING DETECTION
PHISHING DETECTION
 
Phishing Detection using Machine Learning
Phishing Detection using Machine LearningPhishing Detection using Machine Learning
Phishing Detection using Machine Learning
 
Spam detection using machine learning based binary classifier_043660
Spam detection using machine learning based binary classifier_043660Spam detection using machine learning based binary classifier_043660
Spam detection using machine learning based binary classifier_043660
 
web mining
web miningweb mining
web mining
 
Seminar Presentation | Network Intrusion Detection using Supervised Machine L...
Seminar Presentation | Network Intrusion Detection using Supervised Machine L...Seminar Presentation | Network Intrusion Detection using Supervised Machine L...
Seminar Presentation | Network Intrusion Detection using Supervised Machine L...
 
Presentation-Detecting Spammers on Social Networks
Presentation-Detecting Spammers on Social NetworksPresentation-Detecting Spammers on Social Networks
Presentation-Detecting Spammers on Social Networks
 
final-spam-e-mail-detection-180125111231.pptx
final-spam-e-mail-detection-180125111231.pptxfinal-spam-e-mail-detection-180125111231.pptx
final-spam-e-mail-detection-180125111231.pptx
 
An introduction to Machine Learning
An introduction to Machine LearningAn introduction to Machine Learning
An introduction to Machine Learning
 
miniproject.ppt.pptx
miniproject.ppt.pptxminiproject.ppt.pptx
miniproject.ppt.pptx
 
Sms spam classification
Sms spam classificationSms spam classification
Sms spam classification
 
User authentication
User authenticationUser authentication
User authentication
 
Credit card fraud detection
Credit card fraud detectionCredit card fraud detection
Credit card fraud detection
 

Similar to Spam Filtering

Survey on spam filtering
Survey on spam filteringSurvey on spam filtering
Survey on spam filteringChippy Thomas
 
How to Keep Spam Off Your Network
How to Keep Spam Off Your NetworkHow to Keep Spam Off Your Network
How to Keep Spam Off Your NetworkGFI Software
 
Spam Detection in Social Networks Using Correlation Based Feature Subset Sele...
Spam Detection in Social Networks Using Correlation Based Feature Subset Sele...Spam Detection in Social Networks Using Correlation Based Feature Subset Sele...
Spam Detection in Social Networks Using Correlation Based Feature Subset Sele...Editor IJCATR
 
Spam Detection in Social Networks Using Correlation Based Feature Subset Sele...
Spam Detection in Social Networks Using Correlation Based Feature Subset Sele...Spam Detection in Social Networks Using Correlation Based Feature Subset Sele...
Spam Detection in Social Networks Using Correlation Based Feature Subset Sele...Editor IJCATR
 
Spam Detection in Social Networks Using Correlation Based Feature Subset Sele...
Spam Detection in Social Networks Using Correlation Based Feature Subset Sele...Spam Detection in Social Networks Using Correlation Based Feature Subset Sele...
Spam Detection in Social Networks Using Correlation Based Feature Subset Sele...Editor IJCATR
 
Spam Detection in Social Networks Using Correlation Based Feature Subset Sele...
Spam Detection in Social Networks Using Correlation Based Feature Subset Sele...Spam Detection in Social Networks Using Correlation Based Feature Subset Sele...
Spam Detection in Social Networks Using Correlation Based Feature Subset Sele...Editor IJCATR
 
NetworkPaperthesis1
NetworkPaperthesis1NetworkPaperthesis1
NetworkPaperthesis1Dhara Shah
 
AN ANALYSIS OF EFFECTIVE ANTI SPAM PROTOCOL USING DECISION TREE CLASSIFIERS
AN ANALYSIS OF EFFECTIVE ANTI SPAM PROTOCOL USING DECISION TREE CLASSIFIERSAN ANALYSIS OF EFFECTIVE ANTI SPAM PROTOCOL USING DECISION TREE CLASSIFIERS
AN ANALYSIS OF EFFECTIVE ANTI SPAM PROTOCOL USING DECISION TREE CLASSIFIERSijsrd.com
 
Network paperthesis1
Network paperthesis1Network paperthesis1
Network paperthesis1Dhara Shah
 
Seminar on web mail filter
Seminar   on   web mail filterSeminar   on   web mail filter
Seminar on web mail filterShalini Gs
 
Spam filtering.pptx
Spam filtering.pptxSpam filtering.pptx
Spam filtering.pptxAkfeteAssefa
 
A Model for Fuzzy Logic Based Machine Learning Approach for Spam Filtering
A Model for Fuzzy Logic Based Machine Learning Approach for  Spam FilteringA Model for Fuzzy Logic Based Machine Learning Approach for  Spam Filtering
A Model for Fuzzy Logic Based Machine Learning Approach for Spam FilteringIOSR Journals
 
2010 Spam Filtered World Fv
2010 Spam Filtered World Fv2010 Spam Filtered World Fv
2010 Spam Filtered World Fvcactussky
 
A review of spam filtering and measures of antispam
A review of spam filtering and measures of antispamA review of spam filtering and measures of antispam
A review of spam filtering and measures of antispamAlexander Decker
 

Similar to Spam Filtering (20)

DEVELOPMENT OF AN EFFECTIVE BAYESIAN APPROACH FOR SPAM FILTERING
DEVELOPMENT OF AN EFFECTIVE BAYESIAN APPROACH FOR SPAM FILTERINGDEVELOPMENT OF AN EFFECTIVE BAYESIAN APPROACH FOR SPAM FILTERING
DEVELOPMENT OF AN EFFECTIVE BAYESIAN APPROACH FOR SPAM FILTERING
 
SPAM FILTERS
SPAM FILTERSSPAM FILTERS
SPAM FILTERS
 
Survey on spam filtering
Survey on spam filteringSurvey on spam filtering
Survey on spam filtering
 
402 406
402 406402 406
402 406
 
How to Keep Spam Off Your Network
How to Keep Spam Off Your NetworkHow to Keep Spam Off Your Network
How to Keep Spam Off Your Network
 
Spam Detection in Social Networks Using Correlation Based Feature Subset Sele...
Spam Detection in Social Networks Using Correlation Based Feature Subset Sele...Spam Detection in Social Networks Using Correlation Based Feature Subset Sele...
Spam Detection in Social Networks Using Correlation Based Feature Subset Sele...
 
Spam Detection in Social Networks Using Correlation Based Feature Subset Sele...
Spam Detection in Social Networks Using Correlation Based Feature Subset Sele...Spam Detection in Social Networks Using Correlation Based Feature Subset Sele...
Spam Detection in Social Networks Using Correlation Based Feature Subset Sele...
 
Spam Detection in Social Networks Using Correlation Based Feature Subset Sele...
Spam Detection in Social Networks Using Correlation Based Feature Subset Sele...Spam Detection in Social Networks Using Correlation Based Feature Subset Sele...
Spam Detection in Social Networks Using Correlation Based Feature Subset Sele...
 
Spam Detection in Social Networks Using Correlation Based Feature Subset Sele...
Spam Detection in Social Networks Using Correlation Based Feature Subset Sele...Spam Detection in Social Networks Using Correlation Based Feature Subset Sele...
Spam Detection in Social Networks Using Correlation Based Feature Subset Sele...
 
NetworkPaperthesis1
NetworkPaperthesis1NetworkPaperthesis1
NetworkPaperthesis1
 
Email deliverability
Email deliverabilityEmail deliverability
Email deliverability
 
AN ANALYSIS OF EFFECTIVE ANTI SPAM PROTOCOL USING DECISION TREE CLASSIFIERS
AN ANALYSIS OF EFFECTIVE ANTI SPAM PROTOCOL USING DECISION TREE CLASSIFIERSAN ANALYSIS OF EFFECTIVE ANTI SPAM PROTOCOL USING DECISION TREE CLASSIFIERS
AN ANALYSIS OF EFFECTIVE ANTI SPAM PROTOCOL USING DECISION TREE CLASSIFIERS
 
Network paperthesis1
Network paperthesis1Network paperthesis1
Network paperthesis1
 
Seminar on web mail filter
Seminar   on   web mail filterSeminar   on   web mail filter
Seminar on web mail filter
 
Spam filtering.pptx
Spam filtering.pptxSpam filtering.pptx
Spam filtering.pptx
 
A Model for Fuzzy Logic Based Machine Learning Approach for Spam Filtering
A Model for Fuzzy Logic Based Machine Learning Approach for  Spam FilteringA Model for Fuzzy Logic Based Machine Learning Approach for  Spam Filtering
A Model for Fuzzy Logic Based Machine Learning Approach for Spam Filtering
 
What is SPAM?
What is SPAM?What is SPAM?
What is SPAM?
 
2010 Spam Filtered World Fv
2010 Spam Filtered World Fv2010 Spam Filtered World Fv
2010 Spam Filtered World Fv
 
A review of spam filtering and measures of antispam
A review of spam filtering and measures of antispamA review of spam filtering and measures of antispam
A review of spam filtering and measures of antispam
 
B0940509
B0940509B0940509
B0940509
 

More from Umar Alharaky

Function Point Counting Practices
Function Point Counting PracticesFunction Point Counting Practices
Function Point Counting PracticesUmar Alharaky
 
CMMI for Development
CMMI for DevelopmentCMMI for Development
CMMI for DevelopmentUmar Alharaky
 
Generalized Stochastic Petri Nets
Generalized Stochastic Petri NetsGeneralized Stochastic Petri Nets
Generalized Stochastic Petri NetsUmar Alharaky
 
Simulation Tracking Object Reference Model (STORM)
Simulation Tracking Object Reference Model (STORM)Simulation Tracking Object Reference Model (STORM)
Simulation Tracking Object Reference Model (STORM)Umar Alharaky
 

More from Umar Alharaky (6)

Function Point Counting Practices
Function Point Counting PracticesFunction Point Counting Practices
Function Point Counting Practices
 
CMMI for Development
CMMI for DevelopmentCMMI for Development
CMMI for Development
 
Generalized Stochastic Petri Nets
Generalized Stochastic Petri NetsGeneralized Stochastic Petri Nets
Generalized Stochastic Petri Nets
 
Data integration
Data integrationData integration
Data integration
 
Simulation Tracking Object Reference Model (STORM)
Simulation Tracking Object Reference Model (STORM)Simulation Tracking Object Reference Model (STORM)
Simulation Tracking Object Reference Model (STORM)
 
Turing machine
Turing machineTuring machine
Turing machine
 

Recently uploaded

Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
APIForce Zurich 5 April Automation LPDG
APIForce Zurich 5 April  Automation LPDGAPIForce Zurich 5 April  Automation LPDG
APIForce Zurich 5 April Automation LPDGMarianaLemus7
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraDeakin University
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphNeo4j
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 

Recently uploaded (20)

Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
APIForce Zurich 5 April Automation LPDG
APIForce Zurich 5 April  Automation LPDGAPIForce Zurich 5 April  Automation LPDG
APIForce Zurich 5 April Automation LPDG
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning era
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 

Spam Filtering

  • 1. Spam Filtering Techniques UMAR M. A. ALHARAKY, B.SC. RAKAN RAZOUK, PH.D.
  • 2. Introduction  What is spam?  Spam also called as Unsolicited Commercial Email (UCE)  Involves sending messages by email to numerous recipients at the same time (Mass Emailing).  Grew exponentially since 1990 but has leveled off recently and is no longer growing exponentially  80% of all spam is sent by less than 200 spammers
  • 3. Introduction  Purpose of Spam  Advertisements  Pyramid schemes (Multi-Level Marketing)  Giveaways  Chain letters  Political email  Stock market advice
  • 4. Introduction  Spam as a problem  Consumes computing resources and time  Reduces the effectiveness of legitimate advertising  Cost Shifting  Fraud  Identity Theft  Consumer Perception  Global Implications  John Borgan [ReplyNet] – “Junk email is not just annoying anymore. It’s eating into productivity. It’s eating into time”
  • 5. Some Statistics  Cost of Spam 2009:  $130 billion worldwide  $42 billion in US alone  30% increase from 2007 estimates  100% increase in 2007 from 2005  Main components of cost:  Productivity loss from inspecting and deleting spam missed by spam control products (False Negatives)  Productivity loss from searching for legitimate mails deleted in error by spam control products (False Positives)  Operations and helpdesk costs (Filters and Firewalls – installment and maintenance)
  • 7. Some Statistics  Spam Averages about 88% of all emails sent  Barracuda Networks:
  • 8. Introduction  Federal Regulations (CAN-SPAM act of 2003)  Controlling the Assault of Non-Solicited Pornography And Marketing (CAN-SPAM) Act of 2003 – signed on 12/16/2003  Commercial email must adhere to three types of compliance  Unsubscribe Compliance  Content Compliance  Sender Behavior Compliance
  • 9. Introduction  Email Address Harvesting - Process of obtaining email addresses through various methods  Purchasing /Trading lists with other spammers  Bots  Directory harvest attack  Free Product or Services requiring valid email address  News bulletins /Forums
  • 11. Types of Spam Filters  Header Filters  Look at email headers to judge if forged or not  Contain more information in addition to recipient , sender and subject fields  Language Filters  filters based on email body language  Can be used to filter out spam written in foreign languages
  • 12. Types of Spam Filters  Content Filters  Scan the text content of emails  Use fuzzy logic  Permission Filters  Based on Challenge /Response system  White list/blacklist Filters  Will only accept emails from list of “good email addresses”  Will block emails from “bad email addresses”
  • 13. Types of Spam Filters  Community Filters  Work on the principal of "communal knowledge" of spam  These types of filters communicate with a central server.  Bayesian Filters  Statistical email filtering  Uses Naïve Bayes classifier
  • 14. Spam Filters Properties  Filter must prevent spam from entering inboxes  Able to detect the spam without blocking the ham  Maximize efficiency of the filter  Do not require any modification to existing e-mail protocols  Easily incremental  Spam evolve continuously  Need to adapt to each user
  • 15. Data Mining and Spam Filtering What is Data Mining?  Predictive analysis of data for the discovery of trends and patterns  Reveals critical insights into unstructured data. Why Data Mining?  The amount of data is increasing every year.  To convert the acquired data into information and knowledge and use it in decision making. How it is done?  Utilizes computing power to apply sophisticated algorithms for knowledge discovery of data. The Target…  Spam Filtering using Data Mining
  • 16. Data Mining and Spam Filtering  Spam Filtering can be seen as a specific text categorization (Classification)  History  Jason Rennie’s iFile (1996); first know program to use Bayesian Classification for spam filtering
  • 17. Bayesian Classification  Particular words have particular probabilities of occurring in spam email and in legitimate email  For instance, most email users will frequently encounter the word "Viagra" in spam email, but will seldom see it in other email  The filter doesn't know these probabilities in advance, and must first be trained so it can build them up  To train the filter, the user must manually indicate whether a new email is spam or not
  • 18. Bayesian Classification  For all words in each training email, the filter will adjust the probabilities that each word will appear in spam or legitimate email in its database  For instance, Bayesian spam filters will typically have learned a very high spam probability for the words "Viagra" and "refinance", but a very low spam probability for words seen only in legitimate email, such as the names of friends and family members  After training, the word probabilities are used to compute the probability that an email with a particular set of words in it belongs to either category
  • 19. Bayesian Classification  Each word in the email contributes to the email's spam probability, or only the most interesting words  This contribution is computed using Bayes' theorem  Then, the email's spam probability is computed over all words in the email, and if the total exceeds a certain threshold (say 95%), the filter will mark the email as a spam.
  • 20. Bayesian Classification  The initial training can usually be refined when wrong judgments from the software are identified (false positives or false negatives)  That allows the software to dynamically adapt to the ever evolving nature of spam  Some spam filters combine the results of both Bayesian spam filtering and other heuristics (pre- defined rules about the contents, looking at the message's envelope, etc.)  Resulting in even higher filtering accuracy
  • 21. Computing the Probability 1. Computing the probability that a message containing a given word is spam:  Let's suppose the suspected message contains the word "replica“  Most people who are used to receiving e-mail know that this message is likely to be spam  The formula used by the software for computing
  • 22. Computing the Probability where:  is the probability that a message is a spam, knowing that the word "replica" is in it;  is the overall probability that any given message is spam;  is the probability that the word "replica" appears in spam messages;  is the overall probability that any given message is not spam (is "ham");  is the probability that the word "replica" appears in ham messages.
  • 23. Computing the Probability 2. Spam or ham:  Recent statistics show that current probability of any message to be spam is 80%, at the very least:  However, most spam detection software are “not biased”, meaning that they have no prejudice regarding the incoming email  It is advisable that the datasets of spam and ham are of same size
  • 24. Computing the Probability 2. Spam or ham:  This quantity is called "spamicity" (or "spaminess") of the word "replica“  Pr(W|S) is approximated to the frequency of messages containing "replica" in the messages identified as spam during the learning phase  Pr(W|H) is approximated to the frequency of messages containing "replica" in the messages identified as ham during the learning phase
  • 25. Computing the Probability 3. Combining individual probabilities:  The Bayesian spam filtering software makes the "naïve" assumption that the words present in the message are independent events  With that assumption, where:  p is the probability that the suspect message is spam  pi is the probability p(S|Wi)
  • 26. Pros & Cons Advantages  It can be trained on a per-user basis  The spam that a user receives is often related to the online user's activities Disadvantages  Bayesian spam filtering is susceptible to Bayesian poisoning  Insertion of random innocuous words that are not normally associated with spam  Replace text with pictures  Google, by its Gmail email system, performing an OCR to every mid to large size image, analyzing the text inside
  • 28. Conclusions  Spam emails not only consume computing resources, but can also be frustrating  Numerous detection techniques exist, but none is a “good for all scenarios” technique  Data Mining approaches for content based spam filtering seem promising
  • 29. Thank You / Questions