mirror of
https://github.com/valitydev/SigmaHQ.git
synced 2024-11-06 17:35:19 +00:00
Moved Sysmon schema XML from contrib directory into module
This commit is contained in:
parent
be25aa2c37
commit
2dda9a7b77
@ -16,8 +16,8 @@
|
||||
|
||||
import re
|
||||
import xml.etree.ElementTree as xml
|
||||
import os
|
||||
from .base import SingleTextQueryBackend
|
||||
from .data import sysmon_schema
|
||||
from .exceptions import NotSupportedError
|
||||
|
||||
class AzureLogAnalyticsBackend(SingleTextQueryBackend):
|
||||
@ -53,10 +53,8 @@ class AzureLogAnalyticsBackend(SingleTextQueryBackend):
|
||||
|
||||
def map_sysmon_schema(self, eventid):
|
||||
schema_keys = []
|
||||
abs_path = os.path.abspath(os.path.dirname(__file__))
|
||||
sysmon_schema = os.path.join(abs_path, "../../../contrib/sysmon-schema.xml")
|
||||
try:
|
||||
tree = xml.parse(sysmon_schema)
|
||||
tree = xml.ElementTree(xml.fromstring(sysmon_schema))
|
||||
except:
|
||||
raise NotSupportedError("Required Sysmon schema not provided")
|
||||
root = tree.getroot()
|
||||
|
@ -1,3 +1,6 @@
|
||||
# Static data required by backends
|
||||
|
||||
sysmon_schema = """
|
||||
<manifest schemaversion="4.2" binaryversion="8.00">
|
||||
<configuration>
|
||||
<options>
|
||||
@ -253,4 +256,5 @@
|
||||
<data name="Filter" inType="win:UnicodeString" outType="xs:string" />
|
||||
</event>
|
||||
</events>
|
||||
</manifest>
|
||||
</manifest>
|
||||
"""
|
Loading…
Reference in New Issue
Block a user