Skip to content

Commit b151e3f

Browse files
committed
Add default query fields to vulnerability detector index (#40)
* Add ECS mappings generator, documentation and files for vulnerability detector * Add event generator script * Add default query fields --------- Signed-off-by: Álex Ruiz <[email protected]>
1 parent 477e1c5 commit b151e3f

File tree

3 files changed

+38
-6
lines changed

3 files changed

+38
-6
lines changed

ecs/README.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ This script generates the ECS mappings for the Wazuh indices.
88
- Python 3.6 or higher
99
- jq
1010

11-
### Folder structure
11+
### Folder structrue
1212

1313
There is a folder for each module. Inside each folder, there is a `fields` folder with the required
1414
files to generate the mappings. These are the inputs for the ECS generator.
@@ -62,7 +62,7 @@ curl -u admin:admin -k -X PUT "https://indexer:9200/_index_template/wazuh-vulner
6262
```
6363

6464
Notes:
65-
- PUT and POST are interchangeable.
65+
- PUT and POST are interchangable.
6666
- The name of the index template does not matter. Any name can be used.
6767
- Adjust credentials and URL accordingly.
6868

@@ -83,7 +83,7 @@ are required.
8383

8484
For testing purposes, the script `generate_events.py` can be used to generate events for a given module.
8585
Currently, it is only able to generate events for the `vulnerability-detector` module. To support other
86-
modules, please extend or refactor the script.
86+
modules, please extend of refactor the script.
8787

8888
The script prompts for the required parameters, so it can be launched without arguments:
8989

@@ -95,7 +95,7 @@ The script will generate a JSON file with the events, and will also ask whether
9595
indexer. If the upload option is selected, the script will ask for the indexer URL and port, credentials,
9696
and index name.
9797

98-
The script uses a log file. Check it out for debugging or additional information.
98+
The script uses log file. Check it out for debugging or additonal information.
9999

100100
#### References
101101

ecs/vulnerability-detector/fields/template-settings-legacy.json

+17-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,23 @@
1313
},
1414
"number_of_shards": "1",
1515
"number_of_replicas": "0",
16-
"refresh_interval": "2s"
16+
"refresh_interval": "2s",
17+
"query.default_field": [
18+
"base.tags",
19+
"agent.id",
20+
"ecs.version",
21+
"event.id",
22+
"event.module",
23+
"event.severity",
24+
"host.os.family",
25+
"host.os.full.text",
26+
"host.os.version",
27+
"package.name",
28+
"package.version",
29+
"vulnerability.id",
30+
"vulnerability.description.text",
31+
"vulnerability.severity"
32+
]
1733
}
1834
}
1935
}

ecs/vulnerability-detector/fields/template-settings.json

+17-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,23 @@
1414
},
1515
"number_of_shards": "1",
1616
"number_of_replicas": "0",
17-
"refresh_interval": "2s"
17+
"refresh_interval": "2s",
18+
"query.default_field": [
19+
"base.tags",
20+
"agent.id",
21+
"ecs.version",
22+
"event.id",
23+
"event.module",
24+
"event.severity",
25+
"host.os.family",
26+
"host.os.full.text",
27+
"host.os.version",
28+
"package.name",
29+
"package.version",
30+
"vulnerability.id",
31+
"vulnerability.description.text",
32+
"vulnerability.severity"
33+
]
1834
}
1935
}
2036
}

0 commit comments

Comments
 (0)