|
@@ -12,14 +12,11 @@
|
|
|
# query = 'process where serial_event_id = 1'
|
|
|
# expected_event_ids = [1]
|
|
|
|
|
|
-[[queries]]
|
|
|
-query = 'process where serial_event_id < 4'
|
|
|
-expected_event_ids = [1, 2, 3]
|
|
|
-
|
|
|
[[queries]]
|
|
|
query = 'process where true | head 6'
|
|
|
expected_event_ids = [1, 2, 3, 4, 5, 6]
|
|
|
|
|
|
+# presently not supported, throwing: org.elasticsearch.xpack.ql.rule.RuleExecutionException: Does not know how to handle a local relation
|
|
|
[[queries]]
|
|
|
query = 'process where false'
|
|
|
expected_event_ids = []
|
|
@@ -32,12 +29,6 @@ query = 'process where missing_field != null'
|
|
|
expected_event_ids = [1, 2, 3, 4, 5]
|
|
|
query = 'process where bad_field == null | head 5'
|
|
|
|
|
|
-[[queries]]
|
|
|
-query = '''
|
|
|
- process where process_name == "impossible name" or (serial_event_id < 4.5 and serial_event_id >= 3.1)
|
|
|
-'''
|
|
|
-expected_event_ids = [4]
|
|
|
-
|
|
|
[[queries]]
|
|
|
tags = ["comparisons", "pipes"]
|
|
|
query = '''
|
|
@@ -70,42 +61,6 @@ process where true
|
|
|
'''
|
|
|
expected_event_ids = [9, 10]
|
|
|
|
|
|
-[[queries]]
|
|
|
-query = '''
|
|
|
-process where serial_event_id<=8 and serial_event_id > 7
|
|
|
-'''
|
|
|
-expected_event_ids = [8]
|
|
|
-
|
|
|
-[[queries]]
|
|
|
-note = "check that comparisons against null values return false"
|
|
|
-expected_event_ids = [58, 64, 69, 74, 80, 85, 90, 93, 94, 75303]
|
|
|
-query = 'process where exit_code >= 0'
|
|
|
-
|
|
|
-[[queries]]
|
|
|
-note = "check that comparisons against null values return false"
|
|
|
-expected_event_ids = [58, 64, 69, 74, 80, 85, 90, 93, 94, 75303]
|
|
|
-query = 'process where 0 <= exit_code'
|
|
|
-
|
|
|
-[[queries]]
|
|
|
-note = "check that comparisons against null values return false"
|
|
|
-expected_event_ids = [58, 64, 69, 74, 80, 85, 90, 93, 94, 75303]
|
|
|
-query = 'process where exit_code <= 0'
|
|
|
-
|
|
|
-[[queries]]
|
|
|
-note = "check that comparisons against null values return false"
|
|
|
-expected_event_ids = [58, 64, 69, 74, 80, 85, 90, 93, 94, 75303]
|
|
|
-query = 'process where exit_code < 1'
|
|
|
-
|
|
|
-[[queries]]
|
|
|
-note = "check that comparisons against null values return false"
|
|
|
-expected_event_ids = [58, 64, 69, 74, 80, 85, 90, 93, 94, 75303]
|
|
|
-query = 'process where exit_code > -1'
|
|
|
-
|
|
|
-[[queries]]
|
|
|
-note = "check that comparisons against null values return false"
|
|
|
-expected_event_ids = [58, 64, 69, 74, 80, 85, 90, 93, 94, 75303]
|
|
|
-query = 'process where -1 < exit_code'
|
|
|
-
|
|
|
[[queries]]
|
|
|
note = "check that comparisons against null values return false"
|
|
|
expected_event_ids = []
|
|
@@ -125,26 +80,6 @@ note = "check that comparisons against null values return false"
|
|
|
expected_event_ids = [1, 2, 3, 4, 5, 6, 7]
|
|
|
query = 'process where not (-1 < exit_code) | head 7'
|
|
|
|
|
|
-[[queries]]
|
|
|
-query = 'process where exit_code > 0'
|
|
|
-expected_event_ids = []
|
|
|
-
|
|
|
-[[queries]]
|
|
|
-query = 'process where exit_code < 0'
|
|
|
-expected_event_ids = []
|
|
|
-
|
|
|
-[[queries]]
|
|
|
-query = 'process where 0 < exit_code'
|
|
|
-expected_event_ids = []
|
|
|
-
|
|
|
-[[queries]]
|
|
|
-query = 'process where 0 > exit_code'
|
|
|
-expected_event_ids = []
|
|
|
-
|
|
|
-[[queries]]
|
|
|
-query = 'process where (serial_event_id<=8 and serial_event_id > 7) and (opcode=3 and opcode>2)'
|
|
|
-expected_event_ids = [8]
|
|
|
-
|
|
|
[[queries]]
|
|
|
query = 'process where (serial_event_id<9 and serial_event_id >= 7) or (opcode == pid)'
|
|
|
expected_event_ids = [7, 8]
|
|
@@ -217,16 +152,6 @@ expected_event_ids = [57]
|
|
|
query = '''
|
|
|
registry where length(bytes_written_string_list) == 2 and bytes_written_string_list[1] == "EN"'''
|
|
|
|
|
|
-[[queries]]
|
|
|
-query = '''
|
|
|
-registry where key_path == "*\\MACHINE\\SAM\\SAM\\*\\Account\\Us*ers\\00*03E9\\F"'''
|
|
|
-expected_event_ids = [79]
|
|
|
-
|
|
|
-[[queries]]
|
|
|
-query = '''
|
|
|
-process where process_path == "*\\red_ttp\\wininit.*" and opcode in (0,1,2,3,4)'''
|
|
|
-expected_event_ids = [84, 85]
|
|
|
-
|
|
|
[[queries]]
|
|
|
query = '''
|
|
|
file where file_name == "csrss.exe" and opcode=0
|
|
@@ -253,34 +178,6 @@ process where opcode=1 and process_name == "smss.exe"
|
|
|
'''
|
|
|
expected_event_ids = [78]
|
|
|
|
|
|
-[[queries]]
|
|
|
-query = '''
|
|
|
-file where file_path="*\\red_ttp\\winin*.*"
|
|
|
- and opcode in (0,1,2) and user_name="vagrant"
|
|
|
-'''
|
|
|
-expected_event_ids = [83, 86]
|
|
|
-
|
|
|
-[[queries]]
|
|
|
-query = '''
|
|
|
-file where file_path="*\\red_ttp\\winin*.*"
|
|
|
- and opcode not in (0,1,2) and user_name="vagrant"
|
|
|
-'''
|
|
|
-expected_event_ids = []
|
|
|
-
|
|
|
-[[queries]]
|
|
|
-query = '''
|
|
|
-file where file_path="*\\red_ttp\\winin*.*"
|
|
|
- and opcode not in (3, 4, 5, 6 ,7) and user_name="vagrant"
|
|
|
-'''
|
|
|
-expected_event_ids = [83, 86]
|
|
|
-
|
|
|
-
|
|
|
-[[queries]]
|
|
|
-query = '''
|
|
|
-file where file_name in ("wininit.exe", "lsass.exe") and opcode == 2
|
|
|
-'''
|
|
|
-expected_event_ids = [65, 86]
|
|
|
-
|
|
|
[[queries]]
|
|
|
query = '''
|
|
|
file where true
|
|
@@ -612,15 +509,6 @@ query = '''
|
|
|
registry where length(bad_field) > 0
|
|
|
'''
|
|
|
|
|
|
-[[queries]]
|
|
|
-query = '''
|
|
|
-process where opcode == 1
|
|
|
- and process_name in ("net.exe", "net1.exe")
|
|
|
- and not (parent_process_name == "net.exe"
|
|
|
- and process_name == "net1.exe")
|
|
|
- and command_line == "*group *admin*" and command_line != "* /add*"'''
|
|
|
-expected_event_ids = [97]
|
|
|
-
|
|
|
[[queries]]
|
|
|
expected_event_ids = [1, 55, 57, 63, 75304]
|
|
|
query = '''
|
|
@@ -690,11 +578,6 @@ file where event of [process where process_name = "python.exe" ]
|
|
|
| unique unique_pid'''
|
|
|
expected_event_ids = [55, 95]
|
|
|
|
|
|
-[[queries]]
|
|
|
-query = '''
|
|
|
-process where process_name = "python.exe"'''
|
|
|
-expected_event_ids = [48, 50, 51, 54, 93]
|
|
|
-
|
|
|
[[queries]]
|
|
|
query = 'process where event of [process where process_name = "python.exe" ]'
|
|
|
expected_event_ids = [48, 50, 51, 54, 93]
|