-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Datajson v1.0 #12102
Closed
Closed
Datajson v1.0 #12102
Commits on Nov 7, 2024
-
detect/datajson: introduce feature
This patch introduces a new keyword datajson that is similar to dataset with a twist. Where dataset allows match from sets, datajson allows the same but also adds JSON data to the alert event. This data is comint from the set definition it self. For example, an ipv4 set will look like: 10.16.1.11,{"test": "success","context":3} The syntax is value and json data separated by a comma. The syntax of the keyword is the following: datajson:isset,src_ip,type ip,load src.lst,key src_ip; Compare to dataset, it just have a supplementary option key that is used to indicate in which subobject the JSON value should be added. The information is added in the even under the alert.extra subobject: "alert": { "extra": { "src_ip": { "test": "success", "context": 3 }, The main interest of the feature is to be able to contextualize a match. For example, if you have an IOC source, you can do value1,{"actor":"APT28","Country":"FR"} value2,{"actor":"APT32","Country":"NL"} This way, a single dataset is able to produce context to the event where it was not possible before and multiple signatures had to be used. Ticket: OISF#7372
Configuration menu - View commit details
-
Copy full SHA for f1e55f6 - Browse repository at this point
Copy the full SHA f1e55f6View commit details -
Configuration menu - View commit details
-
Copy full SHA for 997805d - Browse repository at this point
Copy the full SHA 997805dView commit details -
Configuration menu - View commit details
-
Copy full SHA for a67bd9b - Browse repository at this point
Copy the full SHA a67bd9bView commit details -
detect/datajson: store json info in a list
Previous code was using an array and introducing a limit in the number of datajson keywords that can be used in a signature. This patch uses a linked list instead to overcome the limit. By using a first element of the list that is part of the structure we limit the cost of the feature to a structure member added to PacketAlert structure. Only the PacketAlertFree function is impacted as we need to iterate to find potential allocation. Ticket: OISF#7372
Configuration menu - View commit details
-
Copy full SHA for 0f01219 - Browse repository at this point
Copy the full SHA 0f01219View commit details -
Configuration menu - View commit details
-
Copy full SHA for 7672798 - Browse repository at this point
Copy the full SHA 7672798View commit details -
Configuration menu - View commit details
-
Copy full SHA for b50b4e8 - Browse repository at this point
Copy the full SHA b50b4e8View commit details -
datajson: fix unix socket add command
It was not handling correctly the json values with space as they were seen as multiple arguments. Ticket: OISF#7372
Configuration menu - View commit details
-
Copy full SHA for 6061d01 - Browse repository at this point
Copy the full SHA 6061d01View commit details
Commits on Nov 13, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 45233ec - Browse repository at this point
Copy the full SHA 45233ecView commit details
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.