This document provides a step-by-step guide on how to import external threat data, such as vulnerable devices identified by Shodan.io, and visualize it on a geographical map within Wazuh SIEM's OpenSearch Dashboards.
- Ensure that your Wazuh installation includes OpenSearch and OpenSearch Dashboards (formerly Elasticsearch and Kibana).
- Obtain geographical threat data in JSON format with latitude and longitude information.
-
Export Data from Shodan:
- Use Shodan to identify vulnerable devices in your region of interest.
- Export the results in JSON format.
-
Transform Data (if necessary):
- Convert the data into a GeoJSON format, if not already provided by Shodan.
- Ensure that the geographical coordinates are structured as follows:
"location": { "lat": 18.2208, "lon": -66.5901 }
- Save the transformed data as
vulnerable_devices.json.
-
Create an Index:
- Define an index pattern in Elasticsearch that includes a
geo_pointfield for the location.PUT /vulnerable-devices { "mappings": { "properties": { "location": { "type": "geo_point" } } } }
- Define an index pattern in Elasticsearch that includes a
-
Import JSON Data:
- Use the Elasticsearch API to import your
vulnerable_devices.jsonfile.POST /vulnerable-devices/_bulk { "index": {}} { "location": { "lat": 18.2208, "lon": -66.5901 }, "device": "Device 1", "vulnerability": "CVE-XXXX-XXXX" } { "index": {}} { "location": { "lat": 18.221, "lon": -66.591 }, "device": "Device 2", "vulnerability": "CVE-YYYY-YYYY" } // Continue with the rest of your data...
- Use the Elasticsearch API to import your
-
Create a New Map:
- Navigate to the 'Maps' section in the OpenSearch Dashboards.
- Select 'Create map' to start a new visualization.
-
Add Data Layer:
- Choose 'Add layer' and then 'Add vector layer'.
- Select the 'vulnerable-devices' index from the dropdown.
- Configure the layer to display data points based on the
geo_pointfield.
-
Customize and Style:
- Customize the map by adding tooltips, labels, and setting the style for different severity levels of vulnerabilities.
- Adjust the zoom level and default center point to focus on your region, such as Puerto Rico.
-
Save and Add to Dashboard:
- Once you're satisfied with the map, save it and give it an appropriate title.
- Add the map to an existing or new dashboard for monitoring.
You've now successfully integrated external threat data into your Wazuh SIEM and visualized it geographically. This map can help you monitor threats in relation to your deployed agents and take proactive measures.
Remember to update your data periodically to reflect the current threat landscape.