all files / src/controllers/ uce-maps.js

100% Statements 5/5
50% Branches 1/2
100% Functions 0/0
100% Lines 4/4
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101                                                                                                                                                                                              2310× 2310×    
'use strict';
 
module.exports = {
   commtouchRiskCategories: ['Unknown', 'Anonymizers', 'Compromised',
                      'Criminal Activity', 'Hate & Intolerance',
                      'Illegal Drug', 'Phishing & Fraud',
                      'Pornography/Sexually Explicit',
                      'Spam Sites', 'Malware', 'Violence',
                      'Weapons', 'Botnets', 'Cults', 'Hacking',
                      'Illegal Software', 'Network Errors',
                      'Parked Domains', 'Private IP Addresses',
                      'School Cheating', 'Child Abuse Images'],
   commtouchRiskCategoriesMap: {
      'Unknown' : 'Uncategorized Site',
      'Anonymizers' : 'Uncategorized Site',
      'Compromised' : 'Malware',
      'Phishing & Fraud' : 'Phishing',
      'Spam Sites' : 'Spam',
      'Malware' : 'Malware',
      'Botnets' : 'Botnets',
      'Hacking' : 'Malware',
      'Illegal Software' : 'Malware',
      'Network Errors' : 'Uncategorized Site',
      'Parked Domains' : 'Malware',
      'Private IP Addresses' : 'Uncategorized Site'
   },
   webrootRiskCategories: ['Uncategorized', 'Dead Sites', 'Hacking',
                            'Keyloggers and Monitoring', 'Malware Sites',
                            'Phishing and Other Frauds',
                            'Proxy Avoid and Anonymizers',
                            'Spyware and Adware', 'Illegal',
                            'Bot Nets', 'Confirmed SPAM Sources',
                            'SPAM URLs', 'Unconfirmed SPAM Sources',
                            'Parked Sites', 'Private IP Addresses'],
   webrootRiskCategoriesMap: {
         'Uncategorized' : 'Uncategorized Site',
         'Dead Sites' : 'Malware',
         'Hacking' : 'Malware',
         'Keyloggers and Monitoring' : 'Malware',
         'Malware Sites' : 'Malware',
         'Phishing and Other Frauds' : 'Phishing',
         'Proxy Avoid and Anonymizers' : 'Uncategorized Site',
         'Spyware and Adware' : 'Malware',
         'Illegal' : 'Malware',
         'Bot Nets' : 'Botnets',
         'Confirmed SPAM Sources' : 'Spam',
         'SPAM URLs' : 'Spam',
         'Unconfirmed SPAM Sources' : 'Spam',
         'Parked Sites' : 'Malware',
         'Private IP Addresses' : 'Uncategorized Site'
      },
   webrootMailRiskCategoriesMap: {
         'Uncategorized' : 'Uncategorized Site',
         'Dead Sites' : 'Malware',
         'Personal Sites and Blogs' : 'Uncontrolled Hosting',
         'Hacking' : 'Hacking',
         'Questionable' : 'Questionable',
         'Online Personal Storage' : 'Uncontrolled Hosting',
         'Keyloggers and Monitoring' : 'Malware',
         'Malware Sites' : 'Malware',
         'Phishing and Other Frauds' : 'Phishing',
         'Proxy Avoid and Anonymizers' : 'Anonymizer',
         'Spyware and Adware' : 'Malware',
         'Illegal' : 'Illegal',
         'Bot Nets' : 'Botnets',
         'Confirmed SPAM Sources' : 'Spam',
         'SPAM URLs' : 'Spam',
         'Unconfirmed SPAM Sources' : 'Spam',
         'Open HTTP Proxies' : 'Anonymizer',
         'Parked Sites' : 'Malware',
      },
   // The ~180 response types map back into a few risk categories.
   // The default is "Malware", exceptions are listed in the map below.
   mdbCategoriesMap: {
     'goz_botnet' : 'Botnet',
     'botnet' : 'Botnet',
     'spam' : 'Spam',
     'phish' : 'Phishing',
     'phishing' : 'Phishing',
     'c&c' : 'Command and Control',
     'amadac&c' : 'Command and Control'
   },
   mdbCategories: (mdbl) => module.exports.mdbCategoriesMap[mdbl] || 'Malware',
   ipReputationMap: {
      'C&C' : 'Command & Control',
      'Malicious Host' : 'Malware',
      'Malware' : 'Malware',
      'Malware Distribution' : 'Malware',
      'Malware Domain' : 'Malware',
      'Malware IP' : 'Malware',
      'Phishing' : 'Phishing',
      'RBN' : 'Malware',
      'RBN Malvertisers' : 'Malware',
      'Scanning Host' : 'Compromised Host',
      'Spamming' : 'Spam',
      'Tor exit node' : 'Compromised Host'
   },
   ipReputation: (reps) => Array.from(new Set(reps.split(/,|;/).map(s => s.trim())))
                              .map(s => [s, module.exports.ipReputationMap[s]])
};