mirror of
https://github.com/valitydev/atomic-threat-coverage.git
synced 2024-11-06 01:25:21 +00:00
#192 for confluence
This commit is contained in:
parent
71551b9de0
commit
9e89eea0b0
@ -227,10 +227,30 @@ class DetectionRule:
|
|||||||
det_queries = {}
|
det_queries = {}
|
||||||
|
|
||||||
for output in queries:
|
for output in queries:
|
||||||
cmd = ATCconfig.get('sigmac_path') + \
|
if output == "powershell":
|
||||||
' --shoot-yourself-in-the-foot -t "' + \
|
cmd = ATCconfig.get('sigmac_path') + " -t " + output + \
|
||||||
output + '" --ignore-backend-errors "' + self.yaml_file + \
|
" --config " + ATCconfig.get('powershell_sigma_config') + \
|
||||||
'" 2> /dev/null'
|
" --ignore-backend-errors " + self.yaml_file
|
||||||
|
elif output == "es-qs":
|
||||||
|
cmd = ATCconfig.get('sigmac_path') + " -t " + output + \
|
||||||
|
" --config " + ATCconfig.get('es-qs_sigma_config') + \
|
||||||
|
" --ignore-backend-errors " + self.yaml_file
|
||||||
|
elif output == "xpack-watcher":
|
||||||
|
cmd = ATCconfig.get('sigmac_path') + " -t " + output + \
|
||||||
|
" --config " + ATCconfig.get('xpack-watcher_sigma_config') + \
|
||||||
|
" --ignore-backend-errors " + self.yaml_file
|
||||||
|
elif output == "splunk":
|
||||||
|
cmd = ATCconfig.get('sigmac_path') + " -t " + output + \
|
||||||
|
" --config " + ATCconfig.get('splunk_sigma_config') + \
|
||||||
|
" --ignore-backend-errors " + self.yaml_file
|
||||||
|
elif output == "logpoint":
|
||||||
|
cmd = ATCconfig.get('sigmac_path') + " -t " + output + \
|
||||||
|
" --config " + ATCconfig.get('logpoint_sigma_config') + \
|
||||||
|
" --ignore-backend-errors " + self.yaml_file
|
||||||
|
else:
|
||||||
|
cmd = ATCconfig.get('sigmac_path') + ' --shoot-yourself-in-the-foot -t "' + \
|
||||||
|
output + '" --ignore-backend-errors "' + self.yaml_file + '"'
|
||||||
|
|
||||||
p = subprocess.Popen(cmd, stdout=subprocess.PIPE, shell=True)
|
p = subprocess.Popen(cmd, stdout=subprocess.PIPE, shell=True)
|
||||||
(query, err) = p.communicate()
|
(query, err) = p.communicate()
|
||||||
# Wait for date to terminate. Get return returncode ##
|
# Wait for date to terminate. Get return returncode ##
|
||||||
|
Loading…
Reference in New Issue
Block a user