Skip to content

Commit

Permalink
FIX: Remove AutoShun from IntelMQ as the feed is discontinued
Browse files Browse the repository at this point in the history
Fixes #2162

Signed-off-by: Sebastian Waldbauer <[email protected]>
  • Loading branch information
waldbauer-certat committed Jul 14, 2022
1 parent 3b15e09 commit 7f72b99
Show file tree
Hide file tree
Showing 8 changed files with 26 additions and 164 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ CHANGELOG
- `intelmq.bots.parsers.shadowserver._config`:
- Added support for `Accessible AMQP`, `Device Identification Report` (IPv4 and IPv6) (PR#2134 by Mateo Durante).
- Added file name mapping for `SSL-POODLE-Vulnerable-Servers IPv6` (file name `scan6_ssl_poodle`) (PR#2134 by Mateo Durante).
- `intelmq.bots.parsers.autoshun.parser`: Removed, as the feed is discontinued (PR#2214 by Sebastian Waldbauer).

#### Experts
- `intelmq.bots.experts.domain_valid`: New bot for checking domain's validity (PR#1966 by Marius Karotkis).
Expand Down
Empty file.
63 changes: 0 additions & 63 deletions intelmq/bots/parsers/autoshun/parser.py

This file was deleted.

18 changes: 0 additions & 18 deletions intelmq/etc/feeds.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -856,24 +856,6 @@ providers:
revision: 2018-01-20
documentation: https://dsi.ut-capitole.fr/blacklists/
public: true
Autoshun:
Shunlist:
description: You need to register in order to use the list.
additional_information:
bots:
collector:
module: intelmq.bots.collectors.http.collector_http
parameters:
http_url: https://www.autoshun.org/download/?api_key=__APIKEY__&format=html
rate_limit: 3600
name: __FEED__
provider: __PROVIDER__
parser:
module: intelmq.bots.parsers.autoshun.parser
parameters:
revision: 2018-01-20
documentation: https://www.autoshun.org/
public: false
Danger Rulez:
Bruteforce Blocker:
description: Its main purpose is to block SSH bruteforce attacks via firewall.
Expand Down
26 changes: 25 additions & 1 deletion intelmq/lib/upgrades.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
'v300_defaults_file_removal',
'v300_pipeline_file_removal',
'v301_deprecations',
'v310_feed_changes',
]


Expand Down Expand Up @@ -725,6 +726,29 @@ def v301_deprecations(configuration, harmonization, dry_run, **kwargs):
return messages + ' Remove affected bots yourself.' if messages else changed, configuration, harmonization


def v310_feed_changes(configuration, harmonization, dry_run, **kwargs):
"""
Migrates feeds' configuration for changed/fixed parameter
"""
found_autoshun = []
messages = []
for bot_id, bot in configuration.items():
if bot_id == 'global':
continue
if bot["module"] == "intelmq.bots.collectors.http.collector":
if "http_url" not in bot["parameters"]:
continue
if 'autoshun.org' in bot["parameters"]["http_url"]:
found_autoshun.append(bot_id)
if bot["module"] == "intelmq.bots.parsers.autoshun.parser":
found_autoshun.append(bot_id)
if found_autoshun:
messages.append('A discontinued feed "Autoshun" has been found '
f'as bot {", ".join(sorted(found_autoshun))}.')
messages = ' '.join(messages)
return messages + ' Remove affected bots yourself.' if messages else None, configuration, harmonization


UPGRADES = OrderedDict([
((1, 0, 0, 'dev7'), (v100_dev7_modify_syntax, )),
((1, 1, 0), (v110_shadowserver_feednames, v110_deprecations)),
Expand All @@ -749,7 +773,7 @@ def v301_deprecations(configuration, harmonization, dry_run, **kwargs):
((3, 0, 0), (v300_bots_file_removal, v300_defaults_file_removal, v300_pipeline_file_removal, )),
((3, 0, 1), (v301_deprecations, )),
((3, 0, 2), ()),
((3, 1, 0), ()),
((3, 1, 0), (v310_feed_changes, )),
])

ALWAYS = (harmonization, )
Empty file.
17 changes: 0 additions & 17 deletions intelmq/tests/bots/parsers/autoshun/shunlist.html

This file was deleted.

65 changes: 0 additions & 65 deletions intelmq/tests/bots/parsers/autoshun/test_parser.py

This file was deleted.

0 comments on commit 7f72b99

Please sign in to comment.