Skip to content

Commit ace9f4c

Browse files
authored
Merge pull request #2657 from sebix/viriback
feeds: remove viriback feed, is offline
2 parents a72a769 + fd0a9ee commit ace9f4c

5 files changed

Lines changed: 46 additions & 48 deletions

File tree

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ Please refer to the [NEWS](NEWS.md) for a list of changes which have an affect o
6868

6969
#### Parsers
7070
- `intelmq.bots.parsers.cymru.parser_cap_program`: Add mapping for TOR and ipv6-icmp protocol (PR#2621 by Mikk Margus Möll).
71-
- Remove `intelmq.bots.collectors.blueliv` as it is obsolete with the removed collector (PR#2632 by Sebastian Wagner).
71+
- Remove `intelmq.bots.parsers.blueliv` as it is obsolete with the removed collector (PR#2632 by Sebastian Wagner).
7272
- `intelmq.bots.parser.json.parser`:
7373
- Support data containing lists of JSON Events (PR#2545 by Tim de Boer).
7474
- Add default `classification.type` with value `undetermined` if input data has now classification itself (PR#2545 by Sebastian Wagner).
@@ -95,6 +95,7 @@ Please refer to the [NEWS](NEWS.md) for a list of changes which have an affect o
9595
### Documentation
9696
- Fix and refresh links to mailing lists (PR#2609 by Kamil Mańkowski)
9797
- `Aggregate Bot`: Add illustration graphics (PR#2612 by Sebastian Wagner).
98+
- Feeds: Remove discontinued feed Viriback (PR#2567 by Sebastian Wagner).
9899

99100
### Packaging
100101
- Replace `/opt/intelmq` example paths in bots with variable `VAR_STATE_PATH` for correct paths in LSB-path setups like with packages (PR#2587 by Sebastian Wagner).

NEWS.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,13 @@ Python `>=3.9` is now required, which is available on all platforms supported by
1818

1919
### Tools
2020

21+
### Bots
22+
#### Blueliv
23+
The bots `intelmq.bots.collectors.blueliv` and `intelmq.bots.collectors.blueliv` are removed as they used an unmaintained library and do not work any more.
24+
25+
#### Viriback
26+
The Feed *Viriback C2 Tracker* is removed as the feed and website are no longer reachable and seem to be discontinued.
27+
2128
### Data Format
2229
To save new fields from IntelMQ Data Format in existing PostgreSQL instances, the following schema
2330
update is necessary:
@@ -63,7 +70,7 @@ ALTER TABLE events
6370
### Requirements
6471
Python 3.8 or newer is required.
6572

66-
## Bots
73+
### Bots
6774
#### CIF 3 API Output deprecation
6875
The CIF 3 API Output bot is not compatible with Python version greater or equal to 3.12 and will be removed in the future due to lack of maintenance.
6976
See https://lists.cert.at/pipermail/intelmq-users/2024-December/000474.html for more information.

intelmq/etc/feeds.yaml

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -4,31 +4,6 @@
44

55
---
66
providers:
7-
ViriBack:
8-
C2 Tracker:
9-
description: Latest detected C2 servers.
10-
bots:
11-
collector:
12-
module: intelmq.bots.collectors.http.collector_http
13-
parameters:
14-
http_url: https://tracker.viriback.com/dump.php
15-
rate_limit: 86400
16-
name: __FEED__
17-
provider: __PROVIDER__
18-
parser:
19-
module: intelmq.bots.parsers.generic.csv_parser
20-
parameters:
21-
skip_header: true
22-
defaults_fields:
23-
classification.type: malware-distribution
24-
columns:
25-
- malware.name
26-
- source.url
27-
- source.ip
28-
- time.source
29-
revision: 2022-11-15
30-
documentation: https://viriback.com/
31-
public: true
327
Surbl:
338
Malicious Domains:
349
description: Detected malicious domains. Note that you have to opened up Sponsored Datafeed Service (SDS) access to the SURBL data via rsync for your IP address.

intelmq/lib/upgrades.py

Lines changed: 20 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
'v322_url_replacement',
4343
'v322_removed_feeds_and_bots',
4444
'v340_deprecations',
45-
'v350_blueliv_removal',
45+
'v350_feed_removals',
4646
'v350_new_fields',
4747
]
4848

@@ -723,7 +723,7 @@ def v301_deprecations(configuration, harmonization, dry_run, **kwargs):
723723
continue
724724
if bot["module"] == "intelmq.bots.parsers.malwaredomains.parser":
725725
found_malwaredomainsparser.append(bot_id)
726-
if bot["module"] == "intelmq.bots.collectors.http.collector":
726+
if bot["module"] == "intelmq.bots.collectors.http.collector_http":
727727
if "http_url" not in bot["parameters"]:
728728
continue
729729
if bot["parameters"]["http_url"] == 'http://mirror1.malwaredomains.com/files/domains.txt':
@@ -788,7 +788,7 @@ def v310_feed_changes(configuration, harmonization, dry_run, **kwargs):
788788
continue
789789
if bot["module"] == "intelmq.bots.parsers.malc0de.parser":
790790
found_malc0de.append(bot_id)
791-
if bot["module"] == "intelmq.bots.collectors.http.collector":
791+
if bot["module"] == "intelmq.bots.collectors.http.collector_http":
792792
http_url = bot["parameters"].get("http_url", "")
793793
if http_url.startswith("https://malc0de.com/bl"):
794794
found_malc0de.append(bot_id)
@@ -876,7 +876,7 @@ def v320_update_turris_greylist_url(configuration, harmonization, dry_run, **kwa
876876
messages = []
877877

878878
for bot_id, bot in configuration.items():
879-
if bot.get("module") == "intelmq.bots.collectors.http.collector":
879+
if bot.get("module") == "intelmq.bots.collectors.http.collector_http":
880880
if bot.get("parameters", {}).get("http_url", "").startswith("https://project.turris.cz/greylist-data/greylist-latest.csv"):
881881
bot["parameters"]["http_url"] = "https://view.sentinel.turris.cz/greylist-data/greylist-latest.csv"
882882
messages.append("Turris Greylist feed URL updated.")
@@ -937,7 +937,7 @@ def v322_removed_feeds_and_bots(configuration, harmonization, dry_run, **kwargs)
937937
if bot["module"] in discontinued_bots_modules:
938938
discontinued_bots.append(bot_id)
939939

940-
elif bot["module"] == "intelmq.bots.collectors.http.collector":
940+
elif bot["module"] == "intelmq.bots.collectors.http.collector_http":
941941
url: str = bot["parameters"].get("http_url", "")
942942

943943
if url in discontinued_feeds_urls:
@@ -976,27 +976,37 @@ def v340_deprecations(configuration, harmonization, dry_run, **kwargs):
976976
return message or changed, configuration, harmonization
977977

978978

979-
def v350_blueliv_removal(configuration, harmonization, dry_run, **kwargs):
979+
def v350_feed_removals(configuration, harmonization, dry_run, **kwargs):
980980
"""
981981
Remove blueliv collector and parser
982982
"""
983-
message = None
983+
messages = []
984984
discontinued_bots = []
985985
discontinued_bots_modules = (
986986
"intelmq.bots.collectors.blueliv.collector_crimeserver",
987987
"intelmq.bots.parsers.blueliv.parser_crimeserver",
988988
)
989+
discontinued_feeds = []
989990

990991
for bot_id, bot in configuration.items():
991992
if bot_id == 'global':
992993
continue
993994
if bot["module"] in discontinued_bots_modules:
994995
discontinued_bots.append(bot_id)
996+
elif bot["module"] == "intelmq.bots.collectors.http.collector_http":
997+
if bot["parameters"].get("http_url", "") == 'https://tracker.viriback.com/dump.php':
998+
discontinued_feeds.append(bot_id)
999+
1000+
if discontinued_feeds:
1001+
messages.append(f"Found discontinued feeds collected by bots: {', '.join(discontinued_feeds)}")
9951002

9961003
if discontinued_bots:
997-
message = f"Found discontinued bots: {', '.join(discontinued_bots)}. Remove the affected bots from the configuration."
1004+
messages.append(f"Found discontinued bots: {', '.join(discontinued_bots)}.")
1005+
1006+
if messages:
1007+
messages.append("Remove the affected bots from the configuration.")
9981008

999-
return message, configuration, harmonization
1009+
return '\n'.join(messages) if messages else None, configuration, harmonization
10001010

10011011

10021012
def v350_new_fields(configuration, harmonization, dry_run, **kwargs):
@@ -1058,7 +1068,7 @@ def v350_new_fields(configuration, harmonization, dry_run, **kwargs):
10581068
((3, 3, 0), ()),
10591069
((3, 3, 1), ()),
10601070
((3, 4, 0), (v340_deprecations, )),
1061-
((3, 5, 0), (v350_blueliv_removal, v350_new_fields)),
1071+
((3, 5, 0), (v350_feed_removals, v350_new_fields)),
10621072
])
10631073

10641074
ALWAYS = (harmonization,)

intelmq/tests/lib/test_upgrades.py

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -516,7 +516,7 @@
516516
}
517517
},
518518
"malwaredomains-collector": {
519-
"module": "intelmq.bots.collectors.http.collector",
519+
"module": "intelmq.bots.collectors.http.collector_http",
520520
"parameters": {
521521
"http_url": "http://mirror1.malwaredomains.com/files/domains.txt"
522522
}
@@ -530,13 +530,13 @@
530530
}
531531
},
532532
"autoshun-collector": {
533-
"module": "intelmq.bots.collectors.http.collector",
533+
"module": "intelmq.bots.collectors.http.collector_http",
534534
"parameters": {
535535
"http_url": "https://www.autoshun.org/download"
536536
}
537537
},
538538
"malc0de-collector": {
539-
"module": "intelmq.bots.collectors.http.collector",
539+
"module": "intelmq.bots.collectors.http.collector_http",
540540
"parameters": {
541541
"http_url": "https://malc0de.com/bl/ZONES"
542542
}
@@ -586,7 +586,7 @@
586586
"module": "intelmq.bots.parsers.netlab_360.parser"
587587
},
588588
"sucuri-collector": {
589-
"module": "intelmq.bots.collectors.http.collector",
589+
"module": "intelmq.bots.collectors.http.collector_http",
590590
"parameters": {
591591
"http_url": "http://labs.sucuri.net/?malware"
592592
}
@@ -616,18 +616,23 @@
616616
"module": "intelmq.bots.collectors.twitter.collector",
617617
},
618618
}
619-
V350_BLUELIV_REMOVAL = {
619+
V350_FEED_REMOVAL = {
620620
"global": {},
621621
"blueliv-collector": {
622622
"module": "intelmq.bots.collectors.blueliv.collector_crimeserver"
623623
},
624624
"blueliv-parser": {
625625
"module": "intelmq.bots.parsers.blueliv.parser_crimeserver"
626+
},
627+
"viriback-collector": {
628+
"module": "intelmq.bots.collectors.http.collector_http",
629+
"parameters": {
630+
"http_url": "https://tracker.viriback.com/dump.php"
631+
}
626632
}
627633
}
628634

629635

630-
631636
def generate_function(function):
632637
def test_function(self):
633638
""" Test if no errors happen for upgrade function %s. """ % function.__name__
@@ -865,12 +870,13 @@ def test_v340_twitter_collector(self):
865870
self.assertIn('twitter-collector', result[0])
866871
self.assertEqual(V340_TWITTER_COLLECTOR_IN, result[1])
867872

868-
def test_v350_blueliv_removal(self):
869-
""" Test v350_blueliv_removal deprecation warning """
870-
result = upgrades.v350_blueliv_removal(V350_BLUELIV_REMOVAL, {}, False)
873+
def test_v350_feed(self):
874+
""" Test v350_feed_removals deprecation warning """
875+
result = upgrades.v350_feed_removals(V350_FEED_REMOVAL, {}, False)
871876
self.assertIn('blueliv-collector', result[0])
872877
self.assertIn('blueliv-parser', result[0])
873-
self.assertEqual(V350_BLUELIV_REMOVAL, result[1])
878+
self.assertIn('viriback-collector', result[0])
879+
self.assertEqual(V350_FEED_REMOVAL, result[1])
874880

875881
def test_v350_new_fields(self):
876882
""" Test adding new harmonisation fields """
@@ -886,7 +892,6 @@ def test_v350_new_fields(self):
886892
self.assertIn("severity", result[2]["event"])
887893

888894

889-
890895
for name in upgrades.__all__:
891896
setattr(TestUpgradeLib, 'test_function_%s' % name,
892897
generate_function(getattr(upgrades, name)))

0 commit comments

Comments
 (0)