howler-sentinel-plugin 0.2.0.dev98__py3-none-any.whl → 0.2.0.dev100__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.2.0.dev98.dist-info → howler_sentinel_plugin-0.2.0.dev100.dist-info}/METADATA +1 -1
- howler_sentinel_plugin-0.2.0.dev100.dist-info/RECORD +17 -0
- sentinel/actions/azure_emit_hash.py +19 -3
- sentinel/actions/send_to_sentinel.py +4 -3
- sentinel/actions/update_defender_xdr_alert.py +4 -3
- sentinel/mapping/sentinel_incident.py +1 -1
- howler_sentinel_plugin-0.2.0.dev98.dist-info/RECORD +0 -17
- {howler_sentinel_plugin-0.2.0.dev98.dist-info → howler_sentinel_plugin-0.2.0.dev100.dist-info}/LICENSE +0 -0
- {howler_sentinel_plugin-0.2.0.dev98.dist-info → howler_sentinel_plugin-0.2.0.dev100.dist-info}/WHEEL +0 -0
- {howler_sentinel_plugin-0.2.0.dev98.dist-info → howler_sentinel_plugin-0.2.0.dev100.dist-info}/entry_points.txt +0 -0
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
sentinel/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
|
+
sentinel/actions/azure_emit_hash.py,sha256=yEO8ZjFTUjNm03fJfHRVER3xf0v5o0qdU8GnqwZtMTM,2938
|
|
3
|
+
sentinel/actions/send_to_sentinel.py,sha256=rfIJk02iAACvb8bfKv9MEkSDILDnvXlxt49hQVyvvQ4,3734
|
|
4
|
+
sentinel/actions/update_defender_xdr_alert.py,sha256=OjNXM8DixURYdl7fHLCS81I0izQVtQgFkw9Iteeklwg,6418
|
|
5
|
+
sentinel/mapping/sentinel_incident.py,sha256=U7fIh8N4Jdr1A4z1E0jPRP28Ll0Cq7u9Q6292AnyRDI,9548
|
|
6
|
+
sentinel/mapping/xdr_alert.py,sha256=UPoqdZsjUXmJz0dCf_qMlh9Jr0D2HcSNOFvbg8lE4wY,18250
|
|
7
|
+
sentinel/mapping/xdr_alert_evidence.py,sha256=q622G4eZwFR3TCj418ZCpE83DGVicrWIQZo8Gkj_3FM,31323
|
|
8
|
+
sentinel/odm/hit.py,sha256=hAuO2ONMK3Ml8Xu6E7tHrmZ7M6HG5tT38RD9ZxwY254,666
|
|
9
|
+
sentinel/odm/models/sentinel.py,sha256=XT3XdT92uoCV5vmY9dT1jmcxRyuu9vp1gE8AwZdKBIc,337
|
|
10
|
+
sentinel/routes/__init__.py,sha256=JYmKRwIfEsiPos1XuMQ2mlGDbxk6TN_cVEM0K_RNze4,130
|
|
11
|
+
sentinel/routes/ingest.py,sha256=_9OdOw_9nBJseKIBnmHDLjnqZ_bDdM4wfLpLrek4-ak,7018
|
|
12
|
+
sentinel/utils/tenant_utils.py,sha256=W7kBtxYNhs3vcgMf78eIRqiTpDtqjzEI2H2d0papQ_Q,1224
|
|
13
|
+
howler_sentinel_plugin-0.2.0.dev100.dist-info/LICENSE,sha256=Wg2luVnxEkP2NSn11nh1US6W_nFFbICBAVTG9iG3t5M,1091
|
|
14
|
+
howler_sentinel_plugin-0.2.0.dev100.dist-info/METADATA,sha256=i2_2R4LULJ85TCCgOzJBY3SCs3lRVoTOoCkFLPdeNEU,749
|
|
15
|
+
howler_sentinel_plugin-0.2.0.dev100.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
|
|
16
|
+
howler_sentinel_plugin-0.2.0.dev100.dist-info/entry_points.txt,sha256=4IJyMY0V49s3Wp659ngN_7U8g66-czeKxI-_dNAFP5g,60
|
|
17
|
+
howler_sentinel_plugin-0.2.0.dev100.dist-info/RECORD,,
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import os
|
|
2
|
+
from typing import Optional
|
|
2
3
|
|
|
3
4
|
import requests
|
|
4
5
|
from howler.common.loader import datastore
|
|
@@ -9,11 +10,26 @@ from pydash import get
|
|
|
9
10
|
OPERATION_ID = "azure_emit_hash"
|
|
10
11
|
|
|
11
12
|
|
|
12
|
-
def execute(
|
|
13
|
+
def execute(
|
|
14
|
+
query: str,
|
|
15
|
+
url: Optional[str] = os.environ.get("SHA256_LOGIC_APP_URL", None),
|
|
16
|
+
field: str = "file.hash.sha256",
|
|
17
|
+
**kwargs,
|
|
18
|
+
):
|
|
13
19
|
"Emit hashes to sentinel"
|
|
14
20
|
result = datastore().hit.search(query, rows=1)
|
|
15
21
|
hits = result["items"]
|
|
16
22
|
|
|
23
|
+
if not url:
|
|
24
|
+
return [
|
|
25
|
+
{
|
|
26
|
+
"query": query,
|
|
27
|
+
"outcome": "error",
|
|
28
|
+
"title": "Action is not properly configured",
|
|
29
|
+
"message": "url argument cannot be empty.",
|
|
30
|
+
}
|
|
31
|
+
]
|
|
32
|
+
|
|
17
33
|
if len(hits) < 1:
|
|
18
34
|
return [
|
|
19
35
|
{
|
|
@@ -41,7 +57,7 @@ def execute(query: str, field: str = "file.hash.sha256", **kwargs):
|
|
|
41
57
|
hash_value = get(hit, field)
|
|
42
58
|
if hash_value:
|
|
43
59
|
requests.post(
|
|
44
|
-
|
|
60
|
+
url, # noqa: F821
|
|
45
61
|
json={
|
|
46
62
|
"indicator": hash_value,
|
|
47
63
|
"type": "FileSha256",
|
|
@@ -76,7 +92,7 @@ def specification():
|
|
|
76
92
|
"roles": ["automation_basic"],
|
|
77
93
|
"steps": [
|
|
78
94
|
{
|
|
79
|
-
"args": {"field": []},
|
|
95
|
+
"args": {"url": [], "field": []},
|
|
80
96
|
"options": {"field": [field for field in Hit.flat_fields().keys() if field.endswith("sha256")]},
|
|
81
97
|
}
|
|
82
98
|
],
|
|
@@ -34,10 +34,11 @@ def execute(query: str, **kwargs):
|
|
|
34
34
|
return report
|
|
35
35
|
|
|
36
36
|
for hit in hits:
|
|
37
|
-
|
|
38
|
-
|
|
37
|
+
if hit.azure and hit.azure.tenant_id:
|
|
38
|
+
tenant_id = hit.azure.tenant_id
|
|
39
|
+
elif hit.organization.id:
|
|
39
40
|
tenant_id = hit.organization.id
|
|
40
|
-
|
|
41
|
+
else:
|
|
41
42
|
report.append(
|
|
42
43
|
{
|
|
43
44
|
"query": f"howler.id:{hit.howler.id}",
|
|
@@ -73,10 +73,11 @@ def execute(query: str, **kwargs):
|
|
|
73
73
|
return report
|
|
74
74
|
|
|
75
75
|
for hit in hits:
|
|
76
|
-
|
|
77
|
-
|
|
76
|
+
if hit.azure and hit.azure.tenant_id:
|
|
77
|
+
tenant_id = hit.azure.tenant_id
|
|
78
|
+
elif hit.organization.id:
|
|
78
79
|
tenant_id = hit.organization.id
|
|
79
|
-
|
|
80
|
+
else:
|
|
80
81
|
report.append(
|
|
81
82
|
{
|
|
82
83
|
"query": f"howler.id:{hit.howler.id}",
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
sentinel/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
|
-
sentinel/actions/azure_emit_hash.py,sha256=52ZJNbaCT4OshM1EqK3y47KD_HCxqPqnEnc3XsgUqso,2582
|
|
3
|
-
sentinel/actions/send_to_sentinel.py,sha256=sg3LyP7IGApMftBU1TTZSUmCGtUI9PwvmI7UBj1Jrf0,3714
|
|
4
|
-
sentinel/actions/update_defender_xdr_alert.py,sha256=_Dtsi2pR5xN8ltzYGpCn9JbYnK731l6LSrGtERVfym4,6398
|
|
5
|
-
sentinel/mapping/sentinel_incident.py,sha256=3QBnP6qFpJgE3pHvx5VvFnB3m2TVOoWxs8OysDlJVV8,9547
|
|
6
|
-
sentinel/mapping/xdr_alert.py,sha256=UPoqdZsjUXmJz0dCf_qMlh9Jr0D2HcSNOFvbg8lE4wY,18250
|
|
7
|
-
sentinel/mapping/xdr_alert_evidence.py,sha256=q622G4eZwFR3TCj418ZCpE83DGVicrWIQZo8Gkj_3FM,31323
|
|
8
|
-
sentinel/odm/hit.py,sha256=hAuO2ONMK3Ml8Xu6E7tHrmZ7M6HG5tT38RD9ZxwY254,666
|
|
9
|
-
sentinel/odm/models/sentinel.py,sha256=XT3XdT92uoCV5vmY9dT1jmcxRyuu9vp1gE8AwZdKBIc,337
|
|
10
|
-
sentinel/routes/__init__.py,sha256=JYmKRwIfEsiPos1XuMQ2mlGDbxk6TN_cVEM0K_RNze4,130
|
|
11
|
-
sentinel/routes/ingest.py,sha256=_9OdOw_9nBJseKIBnmHDLjnqZ_bDdM4wfLpLrek4-ak,7018
|
|
12
|
-
sentinel/utils/tenant_utils.py,sha256=W7kBtxYNhs3vcgMf78eIRqiTpDtqjzEI2H2d0papQ_Q,1224
|
|
13
|
-
howler_sentinel_plugin-0.2.0.dev98.dist-info/LICENSE,sha256=Wg2luVnxEkP2NSn11nh1US6W_nFFbICBAVTG9iG3t5M,1091
|
|
14
|
-
howler_sentinel_plugin-0.2.0.dev98.dist-info/METADATA,sha256=MLmv_F7Wd0W3um49eqIZXDUGvDfR1XV1mjBM_3WcW7o,748
|
|
15
|
-
howler_sentinel_plugin-0.2.0.dev98.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
|
|
16
|
-
howler_sentinel_plugin-0.2.0.dev98.dist-info/entry_points.txt,sha256=4IJyMY0V49s3Wp659ngN_7U8g66-czeKxI-_dNAFP5g,60
|
|
17
|
-
howler_sentinel_plugin-0.2.0.dev98.dist-info/RECORD,,
|
|
File without changes
|
{howler_sentinel_plugin-0.2.0.dev98.dist-info → howler_sentinel_plugin-0.2.0.dev100.dist-info}/WHEEL
RENAMED
|
File without changes
|
|
File without changes
|