-
-
Notifications
You must be signed in to change notification settings - Fork 49
Open
Labels
enhancementNew feature or requestNew feature or requestpythonPull requests that update Python codePull requests that update Python code
Description
On fresh installations, we currently write a set of supported general honeypots into the database. This is done via a migration file:
GreedyBear/greedybear/migrations/0008_auto_20230120_1548.py
Lines 1 to 37 in 5ad7792
| # Generated by Django 3.2.16 on 2023-01-20 15:48 | |
| from django.db import migrations | |
| def generalHoneypot(apps, schema_editor): | |
| GeneralHoneypot = apps.get_model("greedybear", "GeneralHoneypot") | |
| general_honeypots = [ | |
| "Heralding", | |
| "Ciscoasa", | |
| "Honeytrap", | |
| "Dionaea", | |
| "ConPot", | |
| "Adbhoney", | |
| "Tanner", | |
| "CitrixHoneypot", | |
| "Mailoney", | |
| "Ipphoney", | |
| "Ddospot", | |
| "ElasticPot", | |
| "Dicompot", | |
| "Redishoneypot", | |
| "Sentrypeer", | |
| "Glutton", | |
| ] | |
| for hp in general_honeypots: | |
| honeypot = GeneralHoneypot(name=hp) | |
| honeypot.save() | |
| class Migration(migrations.Migration): | |
| dependencies = [ | |
| ("greedybear", "0007_generalhoneypot"), | |
| ] | |
| operations = [migrations.RunPython(generalHoneypot)] |
As GreedyBear now dynamically supports new honeypots that it finds in the Elasticsearch data, this is no longer necessary and rather confusing behavior. I suggest to not add any hard-coded general honeypots to fresh installations. (Maybe except for the ones we want to deliberately disable, see #631 )
mlodic
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestpythonPull requests that update Python codePull requests that update Python code