Skip to content

Command sequences. Closes #457#468

Merged
regulartim merged 9 commits intointelowlproject:developfrom
regulartim:command_sequences
Feb 21, 2025
Merged

Command sequences. Closes #457#468
regulartim merged 9 commits intointelowlproject:developfrom
regulartim:command_sequences

Conversation

@regulartim
Copy link
Copy Markdown
Collaborator

@regulartim regulartim commented Feb 21, 2025

Description

This PR introduces a new data model, CommandSequence, that captures command patterns from Cowrie honeypot sessions. Also included is a clustering system for these sequences, implemented as a daily cronjob. The clustering feature can be enabled/disabled via environment variable due to computational requirements (O(n²) complexity).

Related issues

Type of change

  • New feature (non-breaking change which adds functionality).

Checklist

  • I have read and understood the rules about how to Contribute to this project.
  • The pull request is for the branch develop.
  • I have added documentation of the new features.
  • Linters (Black, Flake, Isort) gave 0 errors. If you have correctly installed pre-commit, it does these checks and adjustments on your behalf.
  • I have added tests for the feature/bug I solved. All the tests (new and old ones) gave 0 errors.
  • If changes were made to an existing model/serializer/view, the docs were updated and regenerated (check CONTRIBUTE.md).
  • If the GUI has been modified:
    • I have a provided a screenshot of the result in the PR.
    • I have created new frontend tests for the new component or updated existing ones.

Important Rules

  • If you miss to compile the Checklist properly, your PR won't be reviewed by the maintainers.
  • If your changes decrease the overall tests coverage (you will know after the Codecov CI job is done), you should add the required tests to fix the problem
  • Everytime you make changes to the PR and you think the work is done, you should explicitly ask for a review. After being reviewed and received a "change request", you should explicitly ask for a review again once you have made the requested changes.

@regulartim regulartim requested a review from mlodic February 21, 2025 09:30
Copy link
Copy Markdown
Member

@mlodic mlodic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

very interesting stuff

@regulartim regulartim merged commit 62656ff into intelowlproject:develop Feb 21, 2025
5 checks passed
@regulartim regulartim deleted the command_sequences branch February 21, 2025 14:29
mlodic added a commit that referenced this pull request Feb 24, 2025
* Command sequences. Closes #457 (#468)

* add CommandSequence model

* add CommandSequence model to admin page

* make migration file

* add unique constraint to commands hash in CommandSequence model

* add extraction of command sequences

* add tests

* add clustering task for command sequences

* limit single command length during extraction

* add tests for clustering

* add 10 second delay to extraction jobs (will hopefully fix #451)

* removed twitter publish cause not working

* Deliver scores in Feeds API (#473)

* add scores to serializer

* fix docstring

* add scores to required fields in deeds_response function

* adapt tests

* fix constant assignments (see #469)

* make pending migration

* skip empty IP address fields when extracting attacker data
fixes #475

* Advanced feeds integration (#476)

* Rename "age" to "prioritize" in backend code and add new prioritization mechanisms

* Rename "age" to "prioritize" in frontend code

* fix tests

* adapt frontend tests

* Bump numpy from 2.2.2 to 2.2.3 in /requirements (#465)

Bumps [numpy](https://github.com/numpy/numpy) from 2.2.2 to 2.2.3.
- [Release notes](https://github.com/numpy/numpy/releases)
- [Changelog](https://github.com/numpy/numpy/blob/main/doc/RELEASE_WALKTHROUGH.rst)
- [Commits](numpy/numpy@v2.2.2...v2.2.3)

---
updated-dependencies:
- dependency-name: numpy
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* bump

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: tim <46972822+regulartim@users.noreply.github.com>
Co-authored-by: tim <tim.leonhard@posteo.de>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants