Built-in Karton integration #358
Labels
status:draft
Contains detailed description of new feature or improvement
type:feature
New feature description e.g. which involves implementation of new components
Milestone
Steps
Introduction
Karton plugin is the most common integration in MWDB ecosystem and crucial part of mwdb.cert.pl service. The only public version is contained in https://github.com/CERT-Polska/karton-playground/ but it's not officially released as redistributable package. The API provided by plugin is undocumented and should be considered non-stable.
Installation of extensions is a bit complicated because there is no simple way to dynamically enable the Web part runtime. Web extensions must be compiled into common JS bundle with the core app.
That's why we decided that Karton integration will be distributed as mwdb-core built-in, disabled by default (opt-in) but ready to use straight out of the box. In addition, more tight integration with mwdb-core enables us to introduce additional features related with exploring data from Karton analyses, that are stored in MWDB.
Although karton-playground integration is non-official, we should still provide a way to easily migrate to the built-in version, without huge breaking changes.
How current mwdb-karton integration works (unofficial Karton plugin)
Object <-> Analysis
association is based on attribute key "karton". If we want to associate an object with an analysis, we just add analysis UUID as an "karton" attribute value to the object,karton_manage
capability: we can resubmit any existing object to the Karton to perform new analysis.meta.karton:<analysis_uid>
mwdb-karton API endpoints:
GET /karton/<object sha256>
returns status of most recent analysisGET /karton/<object sha256>?root_uid=<uid>
returns status of older analysis chosen by analysisroot_uid
POST /karton/<object sha256>
spawns new analysis for chosen objectDue to inconsistency with other API endpoints and assumption that object-analysis associations are available via attributes: endpoints presented above are a subject of change.
Description of built-in integration (official Karton mwdb-core built-in)
mwdb-core v2.3.0 will introduce built-in, opt-in integration that provides similar feature as mwdb-karton plugin presented before.
In terms of backwards compatiblity concerns, we should focus on:
Integration can be enabled by user by providing
enable_karton=1
option in MWDB settings and setting appropriate Karton configuration file under known path (e.g./etc/karton/karton.ini
or./karton.ini
in MWDB working dir)Karton analysis will become a separate entity in MWDB model instead of simple attribute value provided by plugin. This will enable us to bind not only the objects to the analysis, but also other things like attributes. It may be especially useful for users to have an association between set of IoCs in Attributes and specific analysis.
In the same time: analyses will be still exposed via attributes to keep the backwards compatibility. Adding an "karton" attribute will add an association between existing analysis and object. Values of "karton" attribute can no longer be arbitrary and they must point at existing analysis spawned by MWDB integration
All features will be exposed via new API elements:
karton_id
option in upload to bind uploaded object with existing analysisGET /<object_type>/<object_id>/karton
to list all analyses spawned for chosen object and the general analysis status for objectGET /<object_type>/<object_id>/karton/<analysis_id>
to get detailed analysis statusPOST /<object_type>/<object_id>/karton
to resubmit object for analysisPUT /<object_type>/<object_id>/karton/<analysis_id>
to create association between existing object and existing analysisLegacy interface will be still attribute-based, emulating the previous
karton
key behavior. New users should use API presented above, attribute-based API should be considered obsolete.The text was updated successfully, but these errors were encountered: