diff options
author | Ivan Nardi <12729895+IvanNardi@users.noreply.github.com> | 2023-03-20 17:01:18 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-20 17:01:18 +0100 |
commit | 12867962b04bcc8c8bf3a6adf6ab594091eee8ca (patch) | |
tree | 925c3bcda1fd2b3a19183973fc0b54c0c4f3a71c /src | |
parent | 0e80828e146a30bc03b60eefbf0d4c3583e243e3 (diff) |
Add a new protocol id for generic advertisement/analytics/tracking stuff (#1904)
Diffstat (limited to 'src')
-rw-r--r-- | src/include/ndpi_protocol_ids.h | 2 | ||||
-rw-r--r-- | src/lib/ndpi_content_match.c.inc | 104 | ||||
-rw-r--r-- | src/lib/ndpi_main.c | 4 |
3 files changed, 54 insertions, 56 deletions
diff --git a/src/include/ndpi_protocol_ids.h b/src/include/ndpi_protocol_ids.h index f0340f866..ec96e1a3e 100644 --- a/src/include/ndpi_protocol_ids.h +++ b/src/include/ndpi_protocol_ids.h @@ -135,7 +135,7 @@ typedef enum { NDPI_PROTOCOL_ARMAGETRON = 104, NDPI_PROTOCOL_CROSSFIRE = 105, NDPI_PROTOCOL_DOFUS = 106, - NDPI_PROTOCOL_FREE_107 = 107, /* FREE */ + NDPI_PROTOCOL_ADS_ANALYTICS_TRACK = 107, /* Generic id for advertisement/analytics/tracking stuff */ NDPI_PROTOCOL_FREE_108 = 108, /* FREE */ NDPI_PROTOCOL_GUILDWARS = 109, NDPI_PROTOCOL_AMAZON_ALEXA = 110, diff --git a/src/lib/ndpi_content_match.c.inc b/src/lib/ndpi_content_match.c.inc index e971c4e0b..5770124b7 100644 --- a/src/lib/ndpi_content_match.c.inc +++ b/src/lib/ndpi_content_match.c.inc @@ -1808,6 +1808,59 @@ static ndpi_protocol_match host_match[] = { "metrika.yandex.", "YandexMetrika", NDPI_PROTOCOL_YANDEX_METRIKA, NDPI_PROTOCOL_CATEGORY_WEB, NDPI_PROTOCOL_SAFE, NDPI_PROTOCOL_DEFAULT_LEVEL }, { "direct.yandex.", "YandexDirect", NDPI_PROTOCOL_YANDEX_DIRECT, CUSTOM_CATEGORY_ADVERTISEMENT, NDPI_PROTOCOL_TRACKER_ADS, NDPI_PROTOCOL_DEFAULT_LEVEL }, + /* + ADS/tracking/analytic + */ + /* Smaato is a digital ad tech platform and ad server */ + { ".smaato.net", "ADS_Analytic_Track", NDPI_PROTOCOL_ADS_ANALYTICS_TRACK, CUSTOM_CATEGORY_ADVERTISEMENT, NDPI_PROTOCOL_TRACKER_ADS, NDPI_PROTOCOL_DEFAULT_LEVEL }, + { ".smaato.com", "ADS_Analytic_Track", NDPI_PROTOCOL_ADS_ANALYTICS_TRACK, CUSTOM_CATEGORY_ADVERTISEMENT, NDPI_PROTOCOL_TRACKER_ADS, NDPI_PROTOCOL_DEFAULT_LEVEL }, + /* MoPub, a Twitter company, provides monetization solutions */ + { ".mopub.com", "ADS_Analytic_Track", NDPI_PROTOCOL_ADS_ANALYTICS_TRACK, CUSTOM_CATEGORY_ADVERTISEMENT, NDPI_PROTOCOL_TRACKER_ADS, NDPI_PROTOCOL_DEFAULT_LEVEL }, + /* AppsFlyer is a SaaS mobile marketing analytics and attribution platform */ + { ".appsflyer.com", "ADS_Analytic_Track", NDPI_PROTOCOL_ADS_ANALYTICS_TRACK, CUSTOM_CATEGORY_ADVERTISEMENT, NDPI_PROTOCOL_TRACKER_ADS, NDPI_PROTOCOL_DEFAULT_LEVEL }, + /* Adjust is the mobile marketing platform for marketers around the world */ + { ".adjust.com", "ADS_Analytic_Track", NDPI_PROTOCOL_ADS_ANALYTICS_TRACK, CUSTOM_CATEGORY_ADVERTISEMENT, NDPI_PROTOCOL_TRACKER_ADS, NDPI_PROTOCOL_DEFAULT_LEVEL }, + /* Helpshift enables brands to deliver superior digital customer service digital channels*/ + { ".helpshift.com", "ADS_Analytic_Track", NDPI_PROTOCOL_ADS_ANALYTICS_TRACK, CUSTOM_CATEGORY_ADVERTISEMENT, NDPI_PROTOCOL_TRACKER_ADS, NDPI_PROTOCOL_DEFAULT_LEVEL }, + /* AppLovin is a mobile marketing platform */ + { ".applovin.com", "ADS_Analytic_Track", NDPI_PROTOCOL_ADS_ANALYTICS_TRACK, CUSTOM_CATEGORY_ADVERTISEMENT, NDPI_PROTOCOL_TRACKER_ADS, NDPI_PROTOCOL_DEFAULT_LEVEL }, + /* AdRight is an innovative online advertising network */ + { ".adright.com", "ADS_Analytic_Track", NDPI_PROTOCOL_ADS_ANALYTICS_TRACK, CUSTOM_CATEGORY_ADVERTISEMENT, NDPI_PROTOCOL_TRACKER_ADS, NDPI_PROTOCOL_DEFAULT_LEVEL }, + /* MGID: Native Visitors Acquisition for Advertisers */ + { ".mgid.com", "ADS_Analytic_Track", NDPI_PROTOCOL_ADS_ANALYTICS_TRACK, CUSTOM_CATEGORY_ADVERTISEMENT, NDPI_PROTOCOL_TRACKER_ADS, NDPI_PROTOCOL_DEFAULT_LEVEL }, + /* InMobi is the world's leading mobile marketing and advertising platform provider */ + { ".inmobi.com", "ADS_Analytic_Track", NDPI_PROTOCOL_ADS_ANALYTICS_TRACK, CUSTOM_CATEGORY_ADVERTISEMENT, NDPI_PROTOCOL_TRACKER_ADS, NDPI_PROTOCOL_DEFAULT_LEVEL }, + /* AdColony - Elevating mobile advertising */ + { ".adcolony.com", "ADS_Analytic_Track", NDPI_PROTOCOL_ADS_ANALYTICS_TRACK, CUSTOM_CATEGORY_ADVERTISEMENT, NDPI_PROTOCOL_TRACKER_ADS, NDPI_PROTOCOL_DEFAULT_LEVEL }, + /* Supersonicads: App monetization done right */ + { ".supersonicads.com", "ADS_Analytic_Track", NDPI_PROTOCOL_ADS_ANALYTICS_TRACK, CUSTOM_CATEGORY_ADVERTISEMENT, NDPI_PROTOCOL_TRACKER_ADS, NDPI_PROTOCOL_DEFAULT_LEVEL }, + /* Criteo is an advertising company that provides online display advertisements */ + { ".criteo.net", "ADS_Analytic_Track", NDPI_PROTOCOL_ADS_ANALYTICS_TRACK, CUSTOM_CATEGORY_ADVERTISEMENT, NDPI_PROTOCOL_TRACKER_ADS, NDPI_PROTOCOL_DEFAULT_LEVEL }, + { ".criteo.com", "ADS_Analytic_Track", NDPI_PROTOCOL_ADS_ANALYTICS_TRACK, CUSTOM_CATEGORY_ADVERTISEMENT, NDPI_PROTOCOL_TRACKER_ADS, NDPI_PROTOCOL_DEFAULT_LEVEL }, + /* Flurry is an American mobile analytics, monetization, and advertising company */ + { ".flurry.com", "ADS_Analytic_Track", NDPI_PROTOCOL_ADS_ANALYTICS_TRACK, CUSTOM_CATEGORY_ADVERTISEMENT, NDPI_PROTOCOL_TRACKER_ADS, NDPI_PROTOCOL_DEFAULT_LEVEL }, + /* Taboola is the world's leading discovery & native advertising platform */ + { ".taboola.com", "ADS_Analytic_Track", NDPI_PROTOCOL_ADS_ANALYTICS_TRACK, CUSTOM_CATEGORY_ADVERTISEMENT, NDPI_PROTOCOL_TRACKER_ADS, NDPI_PROTOCOL_DEFAULT_LEVEL }, + /* Market research community, a leading global market research effort that studies and reports on Internet trends and behavior. */ + { ".scorecardresearch.com", "ADS_Analytic_Track", NDPI_PROTOCOL_ADS_ANALYTICS_TRACK, CUSTOM_CATEGORY_ADVERTISEMENT, NDPI_PROTOCOL_TRACKER_ADS, NDPI_PROTOCOL_DEFAULT_LEVEL }, + /* Magnite Inc. (formerly Rubicon Project) is an American online advertising technology firm */ + { ".rubiconproject.com", "ADS_Analytic_Track", NDPI_PROTOCOL_ADS_ANALYTICS_TRACK, CUSTOM_CATEGORY_ADVERTISEMENT, NDPI_PROTOCOL_TRACKER_ADS, NDPI_PROTOCOL_DEFAULT_LEVEL }, + /* Adnxs.com is run by AppNexus, a company that provides technology, data and analytics to help companies buy and sell online display advertising */ + { ".adnxs.com", "ADS_Analytic_Track", NDPI_PROTOCOL_ADS_ANALYTICS_TRACK, CUSTOM_CATEGORY_ADVERTISEMENT, NDPI_PROTOCOL_TRACKER_ADS, NDPI_PROTOCOL_DEFAULT_LEVEL }, + /* PubMatic, Inc. is a company that develops and implements online advertising software */ + { ".pubmatic.com", "ADS_Analytic_Track", NDPI_PROTOCOL_ADS_ANALYTICS_TRACK, CUSTOM_CATEGORY_ADVERTISEMENT, NDPI_PROTOCOL_TRACKER_ADS, NDPI_PROTOCOL_DEFAULT_LEVEL }, + /* “OpenX’s unified monetization platform */ + { ".openx.net", "ADS_Analytic_Track", NDPI_PROTOCOL_ADS_ANALYTICS_TRACK, CUSTOM_CATEGORY_ADVERTISEMENT, NDPI_PROTOCOL_TRACKER_ADS, NDPI_PROTOCOL_DEFAULT_LEVEL }, + /* AddThis share buttons, targeting tools and content recommendations help you get more likes, shares and followers */ + { ".addthis.com", "ADS_Analytic_Track", NDPI_PROTOCOL_ADS_ANALYTICS_TRACK, CUSTOM_CATEGORY_ADVERTISEMENT, NDPI_PROTOCOL_TRACKER_ADS, NDPI_PROTOCOL_DEFAULT_LEVEL }, + { ".addthisedge.com", "ADS_Analytic_Track", NDPI_PROTOCOL_ADS_ANALYTICS_TRACK, CUSTOM_CATEGORY_ADVERTISEMENT, NDPI_PROTOCOL_TRACKER_ADS, NDPI_PROTOCOL_DEFAULT_LEVEL }, + /* NEXAGE offers a mobile advertising platform that provides private and public exchanges */ + { ".nexage.com", "ADS_Analytic_Track", NDPI_PROTOCOL_ADS_ANALYTICS_TRACK, CUSTOM_CATEGORY_ADVERTISEMENT, NDPI_PROTOCOL_TRACKER_ADS, NDPI_PROTOCOL_DEFAULT_LEVEL }, + /* RadiumOne (formerly GWallet) is a digital advertising company */ + { ".gwallet.com", "ADS_Analytic_Track", NDPI_PROTOCOL_ADS_ANALYTICS_TRACK, CUSTOM_CATEGORY_ADVERTISEMENT, NDPI_PROTOCOL_TRACKER_ADS, NDPI_PROTOCOL_DEFAULT_LEVEL }, + /* Kochava is the industry leader for mobile app attribution and mobile app analytics */ + { ".kochava.com", "ADS_Analytic_Track", NDPI_PROTOCOL_ADS_ANALYTICS_TRACK, CUSTOM_CATEGORY_ADVERTISEMENT, NDPI_PROTOCOL_TRACKER_ADS, NDPI_PROTOCOL_DEFAULT_LEVEL }, + #ifdef CUSTOM_NDPI_PROTOCOLS #include "../../../nDPI-custom/custom_ndpi_content_match_host_match.c.inc" #endif @@ -1902,57 +1955,6 @@ static ndpi_category_match category_match[] = { { "139.104.216.0/24", NDPI_PROTOCOL_CATEGORY_STREAMING }, { "139.104.217.0/24", NDPI_PROTOCOL_CATEGORY_STREAMING }, - /* - ADS and tracking - */ - /* Smaato is a digital ad tech platform and ad server */ - { ".smaato.net", CUSTOM_CATEGORY_ADVERTISEMENT }, - { ".smaato.com", CUSTOM_CATEGORY_ADVERTISEMENT }, - /* MoPub, a Twitter company, provides monetization solutions */ - { ".mopub.com", CUSTOM_CATEGORY_ADVERTISEMENT }, - /* AppsFlyer is a SaaS mobile marketing analytics and attribution platform */ - { ".appsflyer.com", CUSTOM_CATEGORY_ADVERTISEMENT }, - /* Adjust is the mobile marketing platform for marketers around the world */ - { ".adjust.com", CUSTOM_CATEGORY_ADVERTISEMENT }, - /* Helpshift enables brands to deliver superior digital customer service digital channels*/ - { ".helpshift.com", CUSTOM_CATEGORY_ADVERTISEMENT }, - /* AppLovin is a mobile marketing platform */ - { ".applovin.com", CUSTOM_CATEGORY_ADVERTISEMENT }, - /* AdRight is an innovative online advertising network */ - { ".adright.com", CUSTOM_CATEGORY_ADVERTISEMENT }, - /* MGID: Native Visitors Acquisition for Advertisers */ - { ".mgid.com", CUSTOM_CATEGORY_ADVERTISEMENT }, - /* InMobi is the world's leading mobile marketing and advertising platform provider */ - { ".inmobi.com", CUSTOM_CATEGORY_ADVERTISEMENT }, - /* AdColony - Elevating mobile advertising */ - { ".adcolony.com", CUSTOM_CATEGORY_ADVERTISEMENT }, - /* Supersonicads: App monetization done right */ - { ".supersonicads.com", CUSTOM_CATEGORY_ADVERTISEMENT }, - /* Criteo is an advertising company that provides online display advertisements */ - { ".criteo.net", CUSTOM_CATEGORY_ADVERTISEMENT }, - { ".criteo.com", CUSTOM_CATEGORY_ADVERTISEMENT }, - /* Flurry is an American mobile analytics, monetization, and advertising company */ - { ".flurry.com", CUSTOM_CATEGORY_ADVERTISEMENT }, - /* Taboola is the world's leading discovery & native advertising platform */ - { ".taboola.com", CUSTOM_CATEGORY_ADVERTISEMENT }, - /* Market research community, a leading global market research effort that studies and reports on Internet trends and behavior. */ - { ".scorecardresearch.com", CUSTOM_CATEGORY_ADVERTISEMENT }, - /* Magnite Inc. (formerly Rubicon Project) is an American online advertising technology firm */ - { ".rubiconproject.com", CUSTOM_CATEGORY_ADVERTISEMENT }, - /* Adnxs.com is run by AppNexus, a company that provides technology, data and analytics to help companies buy and sell online display advertising */ - { ".adnxs.com", CUSTOM_CATEGORY_ADVERTISEMENT }, - /* PubMatic, Inc. is a company that develops and implements online advertising software */ - { ".pubmatic.com", CUSTOM_CATEGORY_ADVERTISEMENT }, - /* “OpenX’s unified monetization platform */ - { ".openx.net", CUSTOM_CATEGORY_ADVERTISEMENT }, - /* AddThis share buttons, targeting tools and content recommendations help you get more likes, shares and followers */ - { ".addthis.com", CUSTOM_CATEGORY_ADVERTISEMENT }, - { ".addthisedge.com", CUSTOM_CATEGORY_ADVERTISEMENT }, - /* NEXAGE offers a mobile advertising platform that provides private and public exchanges */ - { ".nexage.com", CUSTOM_CATEGORY_ADVERTISEMENT }, - /* RadiumOne (formerly GWallet) is a digital advertising company */ - { ".gwallet.com", CUSTOM_CATEGORY_ADVERTISEMENT }, - { NULL, 0 } }; diff --git a/src/lib/ndpi_main.c b/src/lib/ndpi_main.c index f67844103..dbdc37b13 100644 --- a/src/lib/ndpi_main.c +++ b/src/lib/ndpi_main.c @@ -1406,10 +1406,6 @@ static void ndpi_init_protocol_defaults(struct ndpi_detection_module_struct *ndp "Dofus", NDPI_PROTOCOL_CATEGORY_GAME, ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */, ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */); - ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 0 /* nw proto */, NDPI_PROTOCOL_FUN, NDPI_PROTOCOL_FREE_107, - "Free107", NDPI_PROTOCOL_CATEGORY_GAME, - ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */, - ndpi_build_default_ports(ports_b, 0, 0, 0, 0, 0) /* UDP */); ndpi_set_proto_defaults(ndpi_str, 1 /* cleartext */, 0 /* nw proto */, NDPI_PROTOCOL_FUN, NDPI_PROTOCOL_FREE_108, "Free108", NDPI_PROTOCOL_CATEGORY_GAME, ndpi_build_default_ports(ports_a, 0, 0, 0, 0, 0) /* TCP */, |