howler-sentinel-plugin 0.1.0.dev50__py3-none-any.whl → 0.2.0.dev20__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {howler_sentinel_plugin-0.1.0.dev50.dist-info → howler_sentinel_plugin-0.2.0.dev20.dist-info}/METADATA +3 -3
- howler_sentinel_plugin-0.2.0.dev20.dist-info/RECORD +10 -0
- sentinel/routes/__init__.py +5 -0
- sentinel/routes/ingest.py +42 -0
- howler_sentinel_plugin-0.1.0.dev50.dist-info/RECORD +0 -8
- {howler_sentinel_plugin-0.1.0.dev50.dist-info → howler_sentinel_plugin-0.2.0.dev20.dist-info}/LICENSE +0 -0
- {howler_sentinel_plugin-0.1.0.dev50.dist-info → howler_sentinel_plugin-0.2.0.dev20.dist-info}/WHEEL +0 -0
- {howler_sentinel_plugin-0.1.0.dev50.dist-info → howler_sentinel_plugin-0.2.0.dev20.dist-info}/entry_points.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: howler-sentinel-plugin
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.2.0.dev20
|
|
4
4
|
Summary: A howler plugin for integration with Microsoft's Sentinel API
|
|
5
5
|
License: MIT
|
|
6
6
|
Author: CCCS
|
|
@@ -14,7 +14,7 @@ Classifier: Programming Language :: Python :: 3.12
|
|
|
14
14
|
Classifier: Programming Language :: Python :: 3.13
|
|
15
15
|
Description-Content-Type: text/markdown
|
|
16
16
|
|
|
17
|
-
# Howler
|
|
17
|
+
# Howler Sentinel Plugin
|
|
18
18
|
|
|
19
|
-
This plugin contains modules for
|
|
19
|
+
This plugin contains modules for Microsoft Sentinel integration in Howler.
|
|
20
20
|
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
sentinel/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
|
+
sentinel/odm/hit.py,sha256=hAuO2ONMK3Ml8Xu6E7tHrmZ7M6HG5tT38RD9ZxwY254,666
|
|
3
|
+
sentinel/odm/models/sentinel.py,sha256=XT3XdT92uoCV5vmY9dT1jmcxRyuu9vp1gE8AwZdKBIc,337
|
|
4
|
+
sentinel/routes/__init__.py,sha256=JYmKRwIfEsiPos1XuMQ2mlGDbxk6TN_cVEM0K_RNze4,130
|
|
5
|
+
sentinel/routes/ingest.py,sha256=zcKQmLStIh1uU_kWO6KBgqr-ZBkAGcFwvXWBiwjOuC8,1067
|
|
6
|
+
howler_sentinel_plugin-0.2.0.dev20.dist-info/LICENSE,sha256=Wg2luVnxEkP2NSn11nh1US6W_nFFbICBAVTG9iG3t5M,1091
|
|
7
|
+
howler_sentinel_plugin-0.2.0.dev20.dist-info/METADATA,sha256=cPq8kTNzcCzVNnzxejM7Xr4RuPMjpqlGNMT_7i-dxR0,694
|
|
8
|
+
howler_sentinel_plugin-0.2.0.dev20.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
|
|
9
|
+
howler_sentinel_plugin-0.2.0.dev20.dist-info/entry_points.txt,sha256=4IJyMY0V49s3Wp659ngN_7U8g66-czeKxI-_dNAFP5g,60
|
|
10
|
+
howler_sentinel_plugin-0.2.0.dev20.dist-info/RECORD,,
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import os
|
|
2
|
+
import re
|
|
3
|
+
|
|
4
|
+
from flask import request
|
|
5
|
+
from howler.api import make_subapi_blueprint, ok, unauthorized
|
|
6
|
+
from howler.common.logging import get_logger
|
|
7
|
+
from howler.common.swagger import generate_swagger_docs
|
|
8
|
+
|
|
9
|
+
SUB_API = "sentinel"
|
|
10
|
+
sentinel_api = make_subapi_blueprint(SUB_API, api_version=1)
|
|
11
|
+
sentinel_api._doc = "Interact with spellbook"
|
|
12
|
+
|
|
13
|
+
logger = get_logger(__file__)
|
|
14
|
+
|
|
15
|
+
SECRET = os.environ["SENTINEL_LINK_KEY"]
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
@generate_swagger_docs()
|
|
19
|
+
@sentinel_api.route("/ingest", methods=["POST"])
|
|
20
|
+
def ingest_alert(**kwargs):
|
|
21
|
+
"""Ingest a sentinel alert into howler
|
|
22
|
+
|
|
23
|
+
Variables:
|
|
24
|
+
None
|
|
25
|
+
|
|
26
|
+
Optional Arguments:
|
|
27
|
+
None
|
|
28
|
+
|
|
29
|
+
Result Example:
|
|
30
|
+
"""
|
|
31
|
+
apikey = request.headers.get("Authorization", "Basic ", type=str).split(" ")[1]
|
|
32
|
+
|
|
33
|
+
if not apikey or apikey != SECRET:
|
|
34
|
+
return unauthorized(err="API Key does not match expected value.")
|
|
35
|
+
|
|
36
|
+
logger.info("Recieved authorization header with value %s", re.sub(r"^(.{3}).+(.{3})$", r"\1...\2", apikey))
|
|
37
|
+
|
|
38
|
+
sentinel_alert = request.json
|
|
39
|
+
|
|
40
|
+
logger.info("Sentinel Alert:\n%s", sentinel_alert)
|
|
41
|
+
|
|
42
|
+
return ok()
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
sentinel/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
|
-
sentinel/odm/hit.py,sha256=hAuO2ONMK3Ml8Xu6E7tHrmZ7M6HG5tT38RD9ZxwY254,666
|
|
3
|
-
sentinel/odm/models/sentinel.py,sha256=XT3XdT92uoCV5vmY9dT1jmcxRyuu9vp1gE8AwZdKBIc,337
|
|
4
|
-
howler_sentinel_plugin-0.1.0.dev50.dist-info/LICENSE,sha256=Wg2luVnxEkP2NSn11nh1US6W_nFFbICBAVTG9iG3t5M,1091
|
|
5
|
-
howler_sentinel_plugin-0.1.0.dev50.dist-info/METADATA,sha256=3OehY5iBgB0iLcN6wM4iED83r94nvWDkw3obIAE_PL0,709
|
|
6
|
-
howler_sentinel_plugin-0.1.0.dev50.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
|
|
7
|
-
howler_sentinel_plugin-0.1.0.dev50.dist-info/entry_points.txt,sha256=4IJyMY0V49s3Wp659ngN_7U8g66-czeKxI-_dNAFP5g,60
|
|
8
|
-
howler_sentinel_plugin-0.1.0.dev50.dist-info/RECORD,,
|
|
File without changes
|
{howler_sentinel_plugin-0.1.0.dev50.dist-info → howler_sentinel_plugin-0.2.0.dev20.dist-info}/WHEEL
RENAMED
|
File without changes
|
|
File without changes
|