Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Correlation engine improvement - caching #612

Closed
adulau opened this issue Aug 25, 2015 · 4 comments
Closed

Correlation engine improvement - caching #612

adulau opened this issue Aug 25, 2015 · 4 comments
Labels
T: enhancement Type: enhancement. This issue requires improving an existing feature

Comments

@adulau
Copy link
Member

adulau commented Aug 25, 2015

After a quick discussion about the correlation table with @Rafiot

+----------------+--------------+------+-----+---------+----------------+
| Field          | Type         | Null | Key | Default | Extra          |
+----------------+--------------+------+-----+---------+----------------+
| id             | int(11)      | NO   | PRI | NULL    | auto_increment |
| value          | text         | NO   |     | NULL    |                |
| 1_event_id     | int(11)      | NO   | MUL | NULL    |                |
| 1_attribute_id | int(11)      | NO   | MUL | NULL    |                |
| 1_private      | tinyint(1)   | NO   |     | 0       |                |
| event_id       | int(11)      | NO   |     | NULL    |                |
| attribute_id   | int(11)      | NO   | MUL | NULL    |                |
| org            | varchar(255) | NO   |     | NULL    |                |
| private        | tinyint(1)   | NO   |     | NULL    |                |
| date           | date         | NO   |     | NULL    |                |
| info           | text         | NO   |     | NULL    |                |
+----------------+--------------+------+-----+---------+----------------+
11 rows in set (0.00 sec)

The table can be easily expressed in a series of sets in a key-value store that could be used a cache engine. Here is a potential representation:

set hash(value) => set of (uuid)
set uuid => set of hash(value)
k/v hash(value) => value of (value)

hash uuid => info => value of (info)
=> org => value of (org)

set distribution => set of (uuid)
(for each group of distribution / private) - a check of correlation visibility can be done with SDIFF

@adulau adulau added the T: enhancement Type: enhancement. This issue requires improving an existing feature label Aug 25, 2015
@adulau
Copy link
Member Author

adulau commented Aug 25, 2015

Initial experiment available https://github.com/MISP/misp-redis-datastore

@elhoim
Copy link
Member

elhoim commented Aug 27, 2015

Nice idea! This can also be useful for bulk verification cases, e.g. you hash all the files of a machine and you throw them at MISP to see if they are known.

@adulau
Copy link
Member Author

adulau commented Aug 27, 2015

Yes. That's the idea. The web services has been added:

https://github.com/MISP/misp-redis-datastore/blob/master/backend/webservice.py

The idea is to do fast lookup of attributes and check if these are known by MISP. If yes, you'll get back the UUID and can do an URL to MISP for the user having an access.

@Rafiot Rafiot added this to the release2.5 milestone Sep 15, 2015
@Rafiot
Copy link
Member

Rafiot commented Mar 29, 2016

This will be supported by misp-redis-datastore, closing.

@Rafiot Rafiot closed this as completed Mar 29, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T: enhancement Type: enhancement. This issue requires improving an existing feature
Projects
None yet
Development

No branches or pull requests

3 participants