@@ -391,6 +391,7 @@ def convert_date_utc(value):
391391}
392392
393393# https://www.shadowserver.org/wiki/pmwiki.php/Services/Sinkhole-HTTP-Drone
394+ # legacy (replaced by event46_sinkhole_http)
394395sinkhole_http_drone = {
395396 'required_fields' : [
396397 ('time.source' , 'timestamp' , add_UTC_to_timestamp ),
@@ -437,6 +438,7 @@ def convert_date_utc(value):
437438}
438439
439440# https://www.shadowserver.org/wiki/pmwiki.php/Services/Sinkhole6-HTTP-Drone
441+ # legacy (replaced by event46_sinkhole_http)
440442ipv6_sinkhole_http_drone = {
441443 'required_fields' : [
442444 ('time.source' , 'timestamp' , add_UTC_to_timestamp ),
@@ -478,6 +480,7 @@ def convert_date_utc(value):
478480}
479481
480482# https://www.shadowserver.org/wiki/pmwiki.php/Services/Microsoft-Sinkhole
483+ # legacy (replaced by event46_sinkhole_http)
481484microsoft_sinkhole = {
482485 'required_fields' : [
483486 ('time.source' , 'timestamp' , add_UTC_to_timestamp ),
@@ -1131,6 +1134,7 @@ def convert_date_utc(value):
11311134}
11321135
11331136# https://www.shadowserver.org/what-we-do/network-reporting/drone-botnet-drone-report/
1137+ # legacy (replaced by event4_sinkhole, event4_honeypot_darknet and event46_sinkhole_http)
11341138drone = {
11351139 'required_fields' : [
11361140 ('time.source' , 'timestamp' , add_UTC_to_timestamp ),
@@ -1955,6 +1959,7 @@ def convert_date_utc(value):
19551959}
19561960
19571961# https://www.shadowserver.org/wiki/pmwiki.php/Services/Darknet
1962+ # legacy (replaced by event4_honeypot_darknet)
19581963darknet = {
19591964 'required_fields' : [
19601965 ('time.source' , 'timestamp' , add_UTC_to_timestamp ),
@@ -2357,6 +2362,7 @@ def convert_date_utc(value):
23572362
23582363# https://www.shadowserver.org/what-we-do/network-reporting/caida-ip-spoofer-report/
23592364# NOTE: The "type" field is included twice with the same values
2365+ # legacy (replaced by event4_ip_spoofer)
23602366caida = {
23612367 'required_fields' : [
23622368 ('time.source' , 'timestamp' , add_UTC_to_timestamp ),
@@ -2542,6 +2548,176 @@ def convert_date_utc(value):
25422548 }
25432549}
25442550
2551+ # https://www.shadowserver.org/what-we-do/network-reporting/ip-spoofer-events-report/
2552+ event4_ip_spoofer = {
2553+ 'required_fields' : [
2554+ ('time.source' , 'timestamp' , add_UTC_to_timestamp ),
2555+ ('source.ip' , 'src_ip' ),
2556+ ('source.port' , 'src_port' ),
2557+ ],
2558+ 'optional_fields' : [
2559+ ('protocol.transport' , 'protocol' ),
2560+ ('source.asn' , 'src_asn' , invalidate_zero ),
2561+ ('source.geolocation.cc' , 'src_geo' ),
2562+ ('source.geolocation.region' , 'src_region' ),
2563+ ('source.geolocation.city' , 'src_city' ),
2564+ ('source.reverse_dns' , 'src_hostname' ),
2565+ ('extra.source.naics' , 'src_naics' , convert_int ),
2566+ ('extra.source.sector' , 'src_sector' , validate_to_none ),
2567+ ('extra.' , 'device_vendor' , validate_to_none ),
2568+ ('extra.' , 'device_type' , validate_to_none ),
2569+ ('extra.' , 'device_model' , validate_to_none ),
2570+ ('extra.' , 'public_source' , validate_to_none ),
2571+ ('classification.identifier' , 'infection' ),
2572+ ('extra.' , 'family' , validate_to_none ),
2573+ ('extra.' , 'tag' , validate_to_none ),
2574+ ('extra.' , 'application' , validate_to_none ),
2575+ ('extra.' , 'version' , validate_to_none ),
2576+ ('extra.' , 'event_id' , validate_to_none ),
2577+ ('source.network' , 'network' , validate_to_none ),
2578+ ('extra.' , 'routedspoof' , validate_to_none ),
2579+ ('extra.' , 'session' , convert_int ),
2580+ ('extra.' , 'nat' , convert_bool ),
2581+ ],
2582+ 'constant_fields' : {
2583+ # FIXME Check if the classification is correct
2584+ 'classification.identifier' : 'ip-spoofer' ,
2585+ 'classification.taxonomy' : 'fraud' ,
2586+ 'classification.type' : 'masquerade' ,
2587+ }
2588+ }
2589+
2590+ # https://www.shadowserver.org/what-we-do/network-reporting/honeypot-darknet-events-report/
2591+ event4_honeypot_darknet = {
2592+ 'required_fields' : [
2593+ ('time.source' , 'timestamp' , add_UTC_to_timestamp ),
2594+ ('source.ip' , 'src_ip' ),
2595+ ],
2596+ 'optional_fields' : [
2597+ ('source.port' , 'src_port' ),
2598+ ('source.asn' , 'src_asn' , invalidate_zero ),
2599+ ('source.geolocation.cc' , 'src_geo' ),
2600+ ('source.geolocation.region' , 'src_region' ),
2601+ ('source.geolocation.city' , 'src_city' ),
2602+ ('source.reverse_dns' , 'src_hostname' ),
2603+ ('extra.source.naics' , 'src_naics' , convert_int ),
2604+ ('extra.source.sector' , 'src_sector' , validate_to_none ),
2605+ ('extra.' , 'device_vendor' , validate_to_none ),
2606+ ('extra.' , 'device_type' , validate_to_none ),
2607+ ('extra.' , 'device_model' , validate_to_none ),
2608+ ('destination.ip' , 'dst_ip' , validate_ip ),
2609+ ('destination.port' , 'dst_port' , convert_int ),
2610+ ('destination.asn' , 'dst_asn' , invalidate_zero ),
2611+ ('destination.geolocation.cc' , 'dst_geo' ),
2612+ ('destination.geolocation.region' , 'dst_region' ),
2613+ ('destination.geolocation.city' , 'dst_city' ),
2614+ ('destination.reverse_dns' , 'dst_hostname' ),
2615+ ('extra.destination.naics' , 'dst_naics' , invalidate_zero ),
2616+ ('extra.destination.sector' , 'dst_sector' , validate_to_none ),
2617+ ('extra.' , 'public_source' , validate_to_none ),
2618+ ('malware.name' , 'infection' ),
2619+ ('extra.' , 'family' , validate_to_none ),
2620+ ('classification.identifier' , 'tag' ), # different values possible in this report
2621+ ('extra.' , 'application' , validate_to_none ),
2622+ ('extra.' , 'version' , validate_to_none ),
2623+ ('extra.' , 'event_id' , validate_to_none ),
2624+ ('extra.' , 'count' , convert_int ),
2625+ ],
2626+ 'constant_fields' : {
2627+ 'classification.taxonomy' : 'other' ,
2628+ 'classification.type' : 'other' ,
2629+ },
2630+ }
2631+
2632+ event4_sinkhole = {
2633+ 'required_fields' : [
2634+ ('time.source' , 'timestamp' , add_UTC_to_timestamp ),
2635+ ('source.ip' , 'src_ip' ),
2636+ ('source.port' , 'src_port' ),
2637+ ],
2638+ 'optional_fields' : [
2639+ ('protocol.transport' , 'protocol' ),
2640+ ('source.asn' , 'src_asn' , invalidate_zero ),
2641+ ('source.geolocation.cc' , 'src_geo' ),
2642+ ('source.geolocation.region' , 'src_region' ),
2643+ ('source.geolocation.city' , 'src_city' ),
2644+ ('source.reverse_dns' , 'src_hostname' ),
2645+ ('extra.source.naics' , 'src_naics' , convert_int ),
2646+ ('extra.source.sector' , 'src_sector' , validate_to_none ),
2647+ ('extra.' , 'device_vendor' , validate_to_none ),
2648+ ('extra.' , 'device_type' , validate_to_none ),
2649+ ('extra.' , 'device_model' , validate_to_none ),
2650+ ('destination.ip' , 'dst_ip' , validate_ip ),
2651+ ('destination.port' , 'dst_port' ),
2652+ ('destination.asn' , 'dst_asn' , invalidate_zero ),
2653+ ('destination.geolocation.cc' , 'dst_geo' ),
2654+ ('destination.geolocation.region' , 'dst_region' ),
2655+ ('destination.geolocation.city' , 'dst_city' ),
2656+ ('destination.reverse_dns' , 'dst_hostname' ),
2657+ ('extra.destination.naics' , 'dst_naics' , invalidate_zero ),
2658+ ('extra.destination.sector' , 'dst_sector' , validate_to_none ),
2659+ ('extra.' , 'public_source' , validate_to_none ),
2660+ ('malware.name' , 'infection' ),
2661+ ('extra.' , 'family' , validate_to_none ),
2662+ ('classification.identifier' , 'tag' ),
2663+ ('extra.' , 'application' , validate_to_none ),
2664+ ('extra.' , 'version' , validate_to_none ),
2665+ ('extra.' , 'event_id' , validate_to_none ),
2666+ ],
2667+ 'constant_fields' : {
2668+ 'classification.taxonomy' : 'malicious-code' ,
2669+ 'classification.type' : 'infected-system' ,
2670+ },
2671+ }
2672+
2673+ event46_sinkhole_http = {
2674+ 'required_fields' : [
2675+ ('time.source' , 'timestamp' , add_UTC_to_timestamp ),
2676+ ('source.ip' , 'src_ip' ),
2677+ ('source.port' , 'src_port' ),
2678+ ],
2679+ 'optional_fields' : [
2680+ ('protocol.transport' , 'protocol' ),
2681+ ('source.asn' , 'src_asn' , invalidate_zero ),
2682+ ('source.geolocation.cc' , 'src_geo' ),
2683+ ('source.geolocation.region' , 'src_region' ),
2684+ ('source.geolocation.city' , 'src_city' ),
2685+ ('source.reverse_dns' , 'src_hostname' ),
2686+ ('extra.source.naics' , 'src_naics' , convert_int ),
2687+ ('extra.source.sector' , 'src_sector' , validate_to_none ),
2688+ ('extra.' , 'device_vendor' , validate_to_none ),
2689+ ('extra.' , 'device_type' , validate_to_none ),
2690+ ('extra.' , 'device_model' , validate_to_none ),
2691+ ('destination.ip' , 'dst_ip' , validate_ip ),
2692+ ('destination.port' , 'dst_port' ),
2693+ ('destination.asn' , 'dst_asn' , invalidate_zero ),
2694+ ('destination.geolocation.cc' , 'dst_geo' ),
2695+ ('destination.geolocation.region' , 'dst_region' ),
2696+ ('destination.geolocation.city' , 'dst_city' ),
2697+ ('destination.reverse_dns' , 'dst_hostname' ),
2698+ ('extra.destination.naics' , 'dst_naics' , invalidate_zero ),
2699+ ('extra.destination.sector' , 'dst_sector' , validate_to_none ),
2700+ ('extra.' , 'public_source' , validate_to_none ),
2701+ ('malware.name' , 'infection' ),
2702+ ('extra.' , 'family' , validate_to_none ),
2703+ ('classification.identifier' , 'tag' ),
2704+ ('extra.' , 'application' , validate_to_none ),
2705+ ('extra.' , 'version' , validate_to_none ),
2706+ ('extra.' , 'event_id' , validate_to_none ),
2707+ ('destination.url' , 'http_url' , convert_http_host_and_url , True ),
2708+ ('destination.fqdn' , 'http_host' , validate_fqdn ),
2709+ ('extra.' , 'http_agent' , validate_to_none ),
2710+ ('extra.' , 'forwarded_by' , validate_to_none ),
2711+ ('extra.' , 'ssl_cipher' , validate_to_none ),
2712+ ('extra.' , 'http_referer' , validate_to_none ),
2713+ ],
2714+ 'constant_fields' : {
2715+ 'classification.taxonomy' : 'malicious-code' ,
2716+ 'classification.type' : 'infected-system' ,
2717+ 'protocol.application' : 'http' ,
2718+ },
2719+ }
2720+
25452721mapping = (
25462722 # feed name, file name, function
25472723 ('Accessible-ADB' , 'scan_adb' , accessible_adb ),
@@ -2564,18 +2740,20 @@ def convert_date_utc(value):
25642740 ('Amplification-DDoS-Victim' , 'ddos_amplification' , amplification_ddos_victim ), # legacy (replaced by honeypot-ddos-amp)
25652741 ('Blacklisted-IP' , 'blacklist' , blocklist ),
25662742 ('Blocklist' , 'blocklist' , blocklist ),
2567- ('CAIDA-IP-Spoofer' , 'caida_ip_spoofer' , caida ),
2743+ ('CAIDA-IP-Spoofer' , 'caida_ip_spoofer' , caida ), # legacy (replaced by event4_ip_spoofer)
25682744 ('Compromised-Website' , 'compromised_website' , compromised_website ),
25692745 ('DNS-Open-Resolvers' , 'scan_dns' , dns_open_resolvers ),
2570- ('Darknet' , 'darknet' , darknet ),
2571- ('Drone' , 'botnet_drone' , drone ),
2746+ ('Darknet' , 'darknet' , darknet ), # legacy (replaced by event4_honeypot_darknet)
2747+ ('Drone' , 'botnet_drone' , drone ), # legacy (replaced by event4_sinkhole, event4_honeypot_darknet and event46_sinkhole_http)
25722748 ('Drone-Brute-Force' , 'drone_brute_force' , drone_brute_force ), # legacy (replaced by honeypot_brute_force)
25732749 ('HTTP-Scanners' , 'hp_http_scan' , http_scanners ),
25742750 ('Honeypot-Amplification-DDoS-Events' , 'event4_honeypot_ddos_amp' , honeypot_ddos_amp ),
25752751 ('Honeypot-Brute-Force-Events' , 'event4_honeypot_brute_force' , honeypot_brute_force ),
2752+ ('Honeypot-Darknet' , 'event4_honeypot_darknet' , event4_honeypot_darknet ),
25762753 ('ICS-Scanners' , 'hp_ics_scan' , ics_scanners ),
2577- ('IPv6-Sinkhole-HTTP-Drone' , 'sinkhole6_http' , ipv6_sinkhole_http_drone ),
2578- ('Microsoft-Sinkhole' , 'microsoft_sinkhole' , microsoft_sinkhole ),
2754+ ('IPv6-Sinkhole-HTTP-Drone' , 'sinkhole6_http' , ipv6_sinkhole_http_drone ), # legacy (replaced by event46_sinkhole_http)
2755+ ('IP-Spoofer-Events' , 'event4_ip_spoofer' , event4_ip_spoofer ),
2756+ ('Microsoft-Sinkhole' , 'microsoft_sinkhole' , microsoft_sinkhole ), # legacy (replaced by event46_sinkhole_http)
25792757 ('NTP-Monitor' , 'scan_ntpmonitor' , ntp_monitor ),
25802758 ('NTP-Version' , 'scan_ntp' , ntp_version ),
25812759 ('Open-Chargen' , 'scan_chargen' , open_chargen ),
@@ -2606,7 +2784,10 @@ def convert_date_utc(value):
26062784 ('SSL-POODLE-Vulnerable-Servers' , 'scan_ssl_poodle' , ssl_poodle_vulnerable_servers ),
26072785 ('Sandbox-URL' , 'cwsandbox_url' , sandbox_url ),
26082786 ('Sinkhole-DNS' , 'sinkhole_dns' , sinkhole_dns ),
2609- ('Sinkhole-HTTP-Drone' , 'sinkhole_http_drone' , sinkhole_http_drone ),
2787+ ('Sinkhole-Events' , 'event4_sinkhole' , event4_sinkhole ),
2788+ ('Sinkhole-Events-HTTP IPv4' , 'event4_sinkhole_http' , event46_sinkhole_http ),
2789+ ('Sinkhole-Events-HTTP IPv6' , 'event6_sinkhole_http' , event46_sinkhole_http ),
2790+ ('Sinkhole-HTTP-Drone' , 'sinkhole_http_drone' , sinkhole_http_drone ), # legacy (replaced by event46_sinkhole_http)
26102791 ('Spam-URL' , 'spam_url' , spam_url ),
26112792 ('Vulnerable-ISAKMP' , 'scan_isakmp' , vulnerable_isakmp ),
26122793 ('Vulnerable-HTTP' , 'scan_http' , accessible_vulnerable_http ),
0 commit comments