|
@@ -1,6 +1,6 @@
|
|
|
[[queries]]
|
|
|
name = "simpleQueryEqual"
|
|
|
-query = 'process where serial_event_id = 1'
|
|
|
+query = 'process where serial_event_id == 1'
|
|
|
expected_event_ids = [1]
|
|
|
|
|
|
[[queries]]
|
|
@@ -161,7 +161,7 @@ expected_event_ids = []
|
|
|
|
|
|
[[queries]]
|
|
|
name = "processWithMultipleConditions1"
|
|
|
-query = 'process where (serial_event_id<=8 and serial_event_id > 7) and (opcode=3 and opcode>2)'
|
|
|
+query = 'process where (serial_event_id<=8 and serial_event_id > 7) and (opcode==3 and opcode>2)'
|
|
|
expected_event_ids = [8]
|
|
|
|
|
|
[[queries]]
|
|
@@ -371,27 +371,27 @@ expected_event_ids = [84, 85]
|
|
|
[[queries]]
|
|
|
name = "descendant1"
|
|
|
query = '''
|
|
|
-file where file_name == "csrss.exe" and opcode=0
|
|
|
- and descendant of [process where opcode in (1,3) and process_name="cmd.exe"]
|
|
|
+file where file_name == "csrss.exe" and opcode==0
|
|
|
+ and descendant of [process where opcode in (1,3) and process_name=="cmd.exe"]
|
|
|
'''
|
|
|
expected_event_ids = [72]
|
|
|
|
|
|
[[queries]]
|
|
|
name = "descendant2"
|
|
|
query = '''
|
|
|
-process where opcode=1 and process_name == "csrss.exe"
|
|
|
- and descendant of [file where file_name == "csrss.exe" and opcode=0]
|
|
|
+process where opcode==1 and process_name == "csrss.exe"
|
|
|
+ and descendant of [file where file_name == "csrss.exe" and opcode==0]
|
|
|
'''
|
|
|
expected_event_ids = [73]
|
|
|
|
|
|
[[queries]]
|
|
|
name = "descendant3"
|
|
|
query = '''
|
|
|
-process where opcode=1 and process_name == "smss.exe"
|
|
|
+process where opcode==1 and process_name == "smss.exe"
|
|
|
and descendant of [
|
|
|
- file where file_name == "csrss.exe" and opcode=0
|
|
|
+ file where file_name == "csrss.exe" and opcode==0
|
|
|
and descendant of [
|
|
|
- process where opcode in(1,3) and process_name="cmd.exe"
|
|
|
+ process where opcode in(1,3) and process_name=="cmd.exe"
|
|
|
]
|
|
|
]
|
|
|
'''
|
|
@@ -400,24 +400,24 @@ expected_event_ids = [78]
|
|
|
[[queries]]
|
|
|
name = "wildcardAndMultipleConditions1"
|
|
|
query = '''
|
|
|
-file where file_path="*\\red_ttp\\winin*.*"
|
|
|
- and opcode in (0,1,2) and user_name="vagrant"
|
|
|
+file where file_path=="*\\red_ttp\\winin*.*"
|
|
|
+ and opcode in (0,1,2) and user_name=="vagrant"
|
|
|
'''
|
|
|
expected_event_ids = [83, 86]
|
|
|
|
|
|
[[queries]]
|
|
|
name = "wildcardAndMultipleConditions2"
|
|
|
query = '''
|
|
|
-file where file_path="*\\red_ttp\\winin*.*"
|
|
|
- and opcode not in (0,1,2) and user_name="vagrant"
|
|
|
+file where file_path=="*\\red_ttp\\winin*.*"
|
|
|
+ and opcode not in (0,1,2) and user_name=="vagrant"
|
|
|
'''
|
|
|
expected_event_ids = []
|
|
|
|
|
|
[[queries]]
|
|
|
name = "wildcardAndMultipleConditions3"
|
|
|
query = '''
|
|
|
-file where file_path="*\\red_ttp\\winin*.*"
|
|
|
- and opcode not in (3, 4, 5, 6 ,7) and user_name="vagrant"
|
|
|
+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]
|
|
|
|
|
@@ -513,8 +513,8 @@ process where true
|
|
|
name = "sequenceOneOneMatch"
|
|
|
query = '''
|
|
|
sequence
|
|
|
- [process where serial_event_id = 1]
|
|
|
- [process where serial_event_id = 2]
|
|
|
+ [process where serial_event_id == 1]
|
|
|
+ [process where serial_event_id == 2]
|
|
|
'''
|
|
|
expected_event_ids = [1, 2]
|
|
|
|
|
@@ -523,7 +523,7 @@ name = "sequenceManyOneMatch"
|
|
|
query = '''
|
|
|
sequence
|
|
|
[process where serial_event_id < 5]
|
|
|
- [process where serial_event_id = 5]
|
|
|
+ [process where serial_event_id == 5]
|
|
|
'''
|
|
|
expected_event_ids = [4, 5]
|
|
|
|
|
@@ -720,7 +720,7 @@ expected_event_ids = [54, 55, 61, 67]
|
|
|
name = "sequenceOneManyWithJoin"
|
|
|
query = '''
|
|
|
sequence
|
|
|
- [process where serial_event_id=1] by unique_pid
|
|
|
+ [process where serial_event_id==1] by unique_pid
|
|
|
[process where true] by unique_ppid
|
|
|
'''
|
|
|
expected_event_ids = [1, 2]
|
|
@@ -762,7 +762,7 @@ expected_event_ids = [1, 2,
|
|
|
name = "sequencesOnDifferentEventTypes1"
|
|
|
query = '''
|
|
|
sequence by unique_pid
|
|
|
- [process where opcode=1 and process_name == "MSBuild.exe"]
|
|
|
+ [process where opcode==1 and process_name == "MSBuild.exe"]
|
|
|
[network where true]
|
|
|
'''
|
|
|
expected_event_ids = [75273, 75304]
|
|
@@ -867,7 +867,7 @@ expected_event_ids = [1, 2,
|
|
|
name = "sequencesOnDifferentEventTypesWithBy"
|
|
|
query = '''
|
|
|
sequence
|
|
|
- [file where opcode=0 and file_name="svchost.exe"] by unique_pid
|
|
|
+ [file where opcode==0 and file_name=="svchost.exe"] by unique_pid
|
|
|
[process where opcode == 1] by unique_ppid
|
|
|
'''
|
|
|
expected_event_ids = [55, 56]
|
|
@@ -876,8 +876,8 @@ expected_event_ids = [55, 56]
|
|
|
name = "doubleSameSequenceWithBy"
|
|
|
query = '''
|
|
|
sequence
|
|
|
- [file where opcode=0] by unique_pid
|
|
|
- [file where opcode=0] by unique_pid
|
|
|
+ [file where opcode==0] by unique_pid
|
|
|
+ [file where opcode==0] by unique_pid
|
|
|
| head 1
|
|
|
'''
|
|
|
expected_event_ids = [55, 61]
|
|
@@ -886,8 +886,8 @@ expected_event_ids = [55, 61]
|
|
|
name = "doubleSameSequenceWithByAndFilter"
|
|
|
query = '''
|
|
|
sequence
|
|
|
- [file where opcode=0] by unique_pid
|
|
|
- [file where opcode=0] by unique_pid
|
|
|
+ [file where opcode==0] by unique_pid
|
|
|
+ [file where opcode==0] by unique_pid
|
|
|
| filter events[1].serial_event_id == 92
|
|
|
'''
|
|
|
expected_event_ids = [87, 92]
|
|
@@ -896,9 +896,9 @@ expected_event_ids = [87, 92]
|
|
|
name = "doubleSameSequenceWithByUntilAndHead1"
|
|
|
query = '''
|
|
|
sequence
|
|
|
- [file where opcode=0 and file_name="*.exe"] by unique_pid
|
|
|
- [file where opcode=0 and file_name="*.exe"] by unique_pid
|
|
|
-until [process where opcode=5000] by unique_ppid
|
|
|
+ [file where opcode==0 and file_name=="*.exe"] by unique_pid
|
|
|
+ [file where opcode==0 and file_name=="*.exe"] by unique_pid
|
|
|
+until [process where opcode==5000] by unique_ppid
|
|
|
| head 1
|
|
|
'''
|
|
|
expected_event_ids = [55, 61]
|
|
@@ -907,9 +907,9 @@ expected_event_ids = [55, 61]
|
|
|
name = "doubleSameSequenceWithByUntilAndHead2"
|
|
|
query = '''
|
|
|
sequence
|
|
|
- [file where opcode=0 and file_name="*.exe"] by unique_pid
|
|
|
- [file where opcode=0 and file_name="*.exe"] by unique_pid
|
|
|
-until [process where opcode=1] by unique_ppid
|
|
|
+ [file where opcode==0 and file_name=="*.exe"] by unique_pid
|
|
|
+ [file where opcode==0 and file_name=="*.exe"] by unique_pid
|
|
|
+until [process where opcode==1] by unique_ppid
|
|
|
| head 1
|
|
|
'''
|
|
|
expected_event_ids = []
|
|
@@ -918,9 +918,9 @@ expected_event_ids = []
|
|
|
name = "doubleJoinWithByUntilAndHead"
|
|
|
query = '''
|
|
|
join
|
|
|
- [file where opcode=0 and file_name="*.exe"] by unique_pid
|
|
|
- [file where opcode=2 and file_name="*.exe"] by unique_pid
|
|
|
-until [process where opcode=1] by unique_ppid
|
|
|
+ [file where opcode==0 and file_name=="*.exe"] by unique_pid
|
|
|
+ [file where opcode==2 and file_name=="*.exe"] by unique_pid
|
|
|
+until [process where opcode==1] by unique_ppid
|
|
|
| head 1
|
|
|
'''
|
|
|
expected_event_ids = [61, 59]
|
|
@@ -929,7 +929,7 @@ expected_event_ids = [61, 59]
|
|
|
name = "twoJoins1"
|
|
|
query = '''
|
|
|
join by user_name
|
|
|
- [process where opcode in (1,3) and process_name="smss.exe"]
|
|
|
+ [process where opcode in (1,3) and process_name=="smss.exe"]
|
|
|
[process where opcode in (1,3) and process_name == "python.exe"]
|
|
|
'''
|
|
|
expected_event_ids = [78, 48]
|
|
@@ -938,8 +938,8 @@ expected_event_ids = [78, 48]
|
|
|
name = "threeJoins1"
|
|
|
query = '''
|
|
|
join by unique_pid
|
|
|
- [process where opcode=1]
|
|
|
- [file where opcode=0 and file_name="svchost.exe"]
|
|
|
+ [process where opcode==1]
|
|
|
+ [file where opcode==0 and file_name=="svchost.exe"]
|
|
|
[file where opcode == 0 and file_name == "lsass.exe"]
|
|
|
'''
|
|
|
expected_event_ids = [54, 55, 61]
|
|
@@ -948,8 +948,8 @@ expected_event_ids = [54, 55, 61]
|
|
|
name = "threeJoins2"
|
|
|
query = '''
|
|
|
join by string(unique_pid)
|
|
|
- [process where opcode=1]
|
|
|
- [file where opcode=0 and file_name="svchost.exe"]
|
|
|
+ [process where opcode==1]
|
|
|
+ [file where opcode==0 and file_name=="svchost.exe"]
|
|
|
[file where opcode == 0 and file_name == "lsass.exe"]
|
|
|
'''
|
|
|
expected_event_ids = [54, 55, 61]
|
|
@@ -958,8 +958,8 @@ expected_event_ids = [54, 55, 61]
|
|
|
name = "threeJoinsWithUntil1"
|
|
|
query = '''
|
|
|
join by unique_pid
|
|
|
- [process where opcode=1]
|
|
|
- [file where opcode=0 and file_name="svchost.exe"]
|
|
|
+ [process where opcode==1]
|
|
|
+ [file where opcode==0 and file_name=="svchost.exe"]
|
|
|
[file where opcode == 0 and file_name == "lsass.exe"]
|
|
|
until [file where opcode == 2]
|
|
|
'''
|
|
@@ -969,8 +969,8 @@ expected_event_ids = []
|
|
|
name = "threeJoinsWithUntil2"
|
|
|
query = '''
|
|
|
join by string(unique_pid), unique_pid, unique_pid * 2
|
|
|
- [process where opcode=1]
|
|
|
- [file where opcode=0 and file_name="svchost.exe"]
|
|
|
+ [process where opcode==1]
|
|
|
+ [file where opcode==0 and file_name=="svchost.exe"]
|
|
|
[file where opcode == 0 and file_name == "lsass.exe"]
|
|
|
until [file where opcode == 2]
|
|
|
'''
|
|
@@ -980,7 +980,7 @@ expected_event_ids = []
|
|
|
name = "twoJoins2"
|
|
|
query = '''
|
|
|
join
|
|
|
- [file where opcode=0 and file_name="svchost.exe"] by unique_pid
|
|
|
+ [file where opcode==0 and file_name=="svchost.exe"] by unique_pid
|
|
|
[process where opcode == 1] by unique_ppid
|
|
|
'''
|
|
|
expected_event_ids = [55, 56]
|
|
@@ -989,7 +989,7 @@ expected_event_ids = [55, 56]
|
|
|
name = "twoJoins3"
|
|
|
query = '''
|
|
|
join by unique_pid
|
|
|
- [process where opcode in (1,3) and process_name="python.exe"]
|
|
|
+ [process where opcode in (1,3) and process_name=="python.exe"]
|
|
|
[file where file_name == "*.exe"]
|
|
|
'''
|
|
|
expected_event_ids = [54, 55]
|
|
@@ -998,7 +998,7 @@ expected_event_ids = [54, 55]
|
|
|
name = "twoJoins4"
|
|
|
query = '''
|
|
|
join by user_name
|
|
|
- [process where opcode in (1,3) and process_name="python.exe"]
|
|
|
+ [process where opcode in (1,3) and process_name=="python.exe"]
|
|
|
[process where opcode in (1,3) and process_name == "smss.exe"]
|
|
|
'''
|
|
|
expected_event_ids = [48, 78]
|
|
@@ -1007,7 +1007,7 @@ expected_event_ids = [48, 78]
|
|
|
name = "twoJoins5"
|
|
|
query = '''
|
|
|
join
|
|
|
- [process where opcode in (1,3) and process_name="python.exe"]
|
|
|
+ [process where opcode in (1,3) and process_name=="python.exe"]
|
|
|
[process where opcode in (1,3) and process_name == "smss.exe"]
|
|
|
'''
|
|
|
expected_event_ids = [48, 3, 50, 78]
|
|
@@ -1076,7 +1076,7 @@ any where true
|
|
|
[[queries]]
|
|
|
name = "multipleConditionsWithDescendant1"
|
|
|
query = '''
|
|
|
-process where opcode=1 and process_name in ("services.exe", "smss.exe", "lsass.exe")
|
|
|
+process where opcode==1 and process_name in ("services.exe", "smss.exe", "lsass.exe")
|
|
|
and descendant of [process where process_name == "cmd.exe" ]
|
|
|
'''
|
|
|
expected_event_ids = [62, 68, 78]
|
|
@@ -1092,7 +1092,7 @@ expected_event_ids = [62, 64, 68, 69, 78, 80]
|
|
|
[[queries]]
|
|
|
name = "multipleConditionsWithDescendant2"
|
|
|
query = '''
|
|
|
-process where opcode=2 and process_name in ("services.exe", "smss.exe", "lsass.exe")
|
|
|
+process where opcode==2 and process_name in ("services.exe", "smss.exe", "lsass.exe")
|
|
|
and descendant of [process where process_name == "cmd.exe" ]
|
|
|
'''
|
|
|
expected_event_ids = [64, 69, 80]
|
|
@@ -1100,16 +1100,16 @@ expected_event_ids = [64, 69, 80]
|
|
|
[[queries]]
|
|
|
name = "childOf1"
|
|
|
query = '''
|
|
|
-process where process_name="svchost.exe"
|
|
|
- and child of [file where file_name="svchost.exe" and opcode=0]
|
|
|
+process where process_name=="svchost.exe"
|
|
|
+ and child of [file where file_name=="svchost.exe" and opcode==0]
|
|
|
'''
|
|
|
expected_event_ids = [56, 58]
|
|
|
|
|
|
[[queries]]
|
|
|
name = "childOf2"
|
|
|
query = '''
|
|
|
-process where process_name="svchost.exe"
|
|
|
- and not child of [file where file_name="svchost.exe" and opcode=0]
|
|
|
+process where process_name=="svchost.exe"
|
|
|
+ and not child of [file where file_name=="svchost.exe" and opcode==0]
|
|
|
| head 3
|
|
|
'''
|
|
|
expected_event_ids = [11, 13, 15]
|
|
@@ -1117,10 +1117,10 @@ expected_event_ids = [11, 13, 15]
|
|
|
[[queries]]
|
|
|
name = "nestedChildOf1"
|
|
|
query = '''
|
|
|
-process where process_name="lsass.exe"
|
|
|
+process where process_name=="lsass.exe"
|
|
|
and child of [
|
|
|
- process where process_name="python.exe"
|
|
|
- and child of [process where process_name="cmd.exe"]
|
|
|
+ process where process_name=="python.exe"
|
|
|
+ and child of [process where process_name=="cmd.exe"]
|
|
|
]
|
|
|
'''
|
|
|
expected_event_ids = [62, 64]
|
|
@@ -1130,7 +1130,7 @@ name = "nestedChildOf2"
|
|
|
query = '''
|
|
|
file where child of [
|
|
|
process where child of [
|
|
|
- process where child of [process where process_name="*wsmprovhost.exe"]
|
|
|
+ process where child of [process where process_name=="*wsmprovhost.exe"]
|
|
|
]
|
|
|
]
|
|
|
| tail 1
|
|
@@ -1140,7 +1140,7 @@ expected_event_ids = [91]
|
|
|
[[queries]]
|
|
|
name = "fileByUniquePid1"
|
|
|
query = '''
|
|
|
-file where process_name = "python.exe"
|
|
|
+file where process_name == "python.exe"
|
|
|
| unique unique_pid
|
|
|
'''
|
|
|
expected_event_ids = [55, 95]
|
|
@@ -1148,7 +1148,7 @@ expected_event_ids = [55, 95]
|
|
|
[[queries]]
|
|
|
name = "fileByUniquePid2"
|
|
|
query = '''
|
|
|
-file where event of [process where process_name = "python.exe" ]
|
|
|
+file where event of [process where process_name == "python.exe" ]
|
|
|
| unique unique_pid
|
|
|
'''
|
|
|
expected_event_ids = [55, 95]
|
|
@@ -1156,20 +1156,20 @@ expected_event_ids = [55, 95]
|
|
|
[[queries]]
|
|
|
name = "simpleStringEquality"
|
|
|
query = '''
|
|
|
-process where process_name = "python.exe"
|
|
|
+process where process_name == "python.exe"
|
|
|
'''
|
|
|
expected_event_ids = [48, 50, 51, 54, 93]
|
|
|
|
|
|
[[queries]]
|
|
|
name = "eventOfProcess"
|
|
|
-query = 'process where event of [process where process_name = "python.exe" ]'
|
|
|
+query = 'process where event of [process where process_name == "python.exe" ]'
|
|
|
expected_event_ids = [48, 50, 51, 54, 93]
|
|
|
|
|
|
[[queries]]
|
|
|
name = "twoSequencesWithKeys2"
|
|
|
query = '''
|
|
|
sequence
|
|
|
- [file where file_name="lsass.exe"] by file_path,process_path
|
|
|
+ [file where file_name=="lsass.exe"] by file_path,process_path
|
|
|
[process where true] by process_path,parent_process_path
|
|
|
'''
|
|
|
expected_event_ids = [61, 62]
|
|
@@ -1178,7 +1178,7 @@ expected_event_ids = [61, 62]
|
|
|
name = "twoSequencesWithKeys3"
|
|
|
query = '''
|
|
|
sequence by user_name
|
|
|
- [file where file_name="lsass.exe"] by file_path, process_path
|
|
|
+ [file where file_name=="lsass.exe"] by file_path, process_path
|
|
|
[process where true] by process_path, parent_process_path
|
|
|
'''
|
|
|
expected_event_ids = [61, 62]
|
|
@@ -1187,7 +1187,7 @@ expected_event_ids = [61, 62]
|
|
|
name = "twoSequencesWithKeys4"
|
|
|
query = '''
|
|
|
sequence by pid
|
|
|
- [file where file_name="lsass.exe"] by file_path,process_path
|
|
|
+ [file where file_name=="lsass.exe"] by file_path,process_path
|
|
|
[process where true] by process_path,parent_process_path
|
|
|
'''
|
|
|
expected_event_ids = []
|
|
@@ -1196,10 +1196,10 @@ expected_event_ids = []
|
|
|
name = "fourSequencesByMixedFields"
|
|
|
query = '''
|
|
|
sequence by user_name
|
|
|
- [file where opcode=0] by file_path
|
|
|
- [process where opcode=1] by process_path
|
|
|
- [process where opcode=2] by process_path
|
|
|
- [file where opcode=2] by file_path
|
|
|
+ [file where opcode==0] by file_path
|
|
|
+ [process where opcode==1] by process_path
|
|
|
+ [process where opcode==2] by process_path
|
|
|
+ [file where opcode==2] by file_path
|
|
|
| tail 1
|
|
|
'''
|
|
|
expected_event_ids = [88, 89, 90, 91]
|
|
@@ -1208,8 +1208,8 @@ expected_event_ids = [88, 89, 90, 91]
|
|
|
name = "twoSequencesWithTwoKeysAndUntil"
|
|
|
query = '''
|
|
|
sequence by user_name
|
|
|
- [file where opcode=0] by pid,file_path
|
|
|
- [file where opcode=2] by pid,file_path
|
|
|
+ [file where opcode==0] by pid,file_path
|
|
|
+ [file where opcode==2] by pid,file_path
|
|
|
until
|
|
|
[process where opcode == 2] by ppid,process_path
|
|
|
'''
|
|
@@ -1219,8 +1219,8 @@ expected_event_ids = []
|
|
|
name = "twoSequencesWithUntil"
|
|
|
query = '''
|
|
|
sequence by user_name
|
|
|
- [file where opcode=0] by pid,file_path
|
|
|
- [file where opcode=2] by pid,file_path
|
|
|
+ [file where opcode==0] by pid,file_path
|
|
|
+ [file where opcode==2] by pid,file_path
|
|
|
until
|
|
|
[process where opcode == 5] by ppid,process_path
|
|
|
| head 2
|
|
@@ -1231,10 +1231,10 @@ expected_event_ids = [55, 59, 61, 65]
|
|
|
name = "fourSequencesWithTail"
|
|
|
query = '''
|
|
|
sequence by pid
|
|
|
- [file where opcode=0] by file_path
|
|
|
- [process where opcode=1] by process_path
|
|
|
- [process where opcode=2] by process_path
|
|
|
- [file where opcode=2] by file_path
|
|
|
+ [file where opcode==0] by file_path
|
|
|
+ [process where opcode==1] by process_path
|
|
|
+ [process where opcode==2] by process_path
|
|
|
+ [file where opcode==2] by file_path
|
|
|
| tail 1
|
|
|
'''
|
|
|
expected_event_ids = []
|
|
@@ -1436,7 +1436,7 @@ name = "stringEqualsCaseInsensitive1"
|
|
|
case_insensitive = true
|
|
|
query = '''
|
|
|
process where "net.EXE" == original_file_name
|
|
|
-| filter process_name="net*.exe"
|
|
|
+| filter process_name=="net*.exe"
|
|
|
'''
|
|
|
expected_event_ids = [97]
|
|
|
note = "check that case insensitive comparisons are performed even for lhs strings."
|
|
@@ -1445,7 +1445,7 @@ note = "check that case insensitive comparisons are performed even for lhs strin
|
|
|
name = "stringEqualsCaseInsensitive2"
|
|
|
case_insensitive = true
|
|
|
query = '''
|
|
|
-process where process_name == original_file_name and process_name="net*.exe"
|
|
|
+process where process_name == original_file_name and process_name=="net*.exe"
|
|
|
'''
|
|
|
expected_event_ids = [97, 98]
|
|
|
note = "check that case insensitive comparisons are performed for fields."
|
|
@@ -1463,7 +1463,7 @@ description = "check that case insensitive comparisons are performed for fields.
|
|
|
name = "startsWithCaseSensitive"
|
|
|
case_sensitive = true
|
|
|
query = '''
|
|
|
-file where opcode=0 and startsWith(file_name, "explorer.")
|
|
|
+file where opcode==0 and startsWith(file_name, "explorer.")
|
|
|
'''
|
|
|
expected_event_ids = [88]
|
|
|
description = "check built-in string functions"
|
|
@@ -1473,7 +1473,7 @@ description = "check built-in string functions"
|
|
|
name = "startsWithCaseInsensitive1"
|
|
|
case_insensitive = true
|
|
|
query = '''
|
|
|
-file where opcode=0 and startsWith(file_name, "explorer.")
|
|
|
+file where opcode==0 and startsWith(file_name, "explorer.")
|
|
|
'''
|
|
|
expected_event_ids = [88, 92]
|
|
|
description = "check built-in string functions"
|
|
@@ -1483,7 +1483,7 @@ description = "check built-in string functions"
|
|
|
name = "startsWithCaseInsensitive2"
|
|
|
case_insensitive = true
|
|
|
query = '''
|
|
|
-file where opcode=0 and startsWith(file_name, "exploRER.")
|
|
|
+file where opcode==0 and startsWith(file_name, "exploRER.")
|
|
|
'''
|
|
|
expected_event_ids = [88, 92]
|
|
|
description = "check built-in string functions"
|
|
@@ -1492,7 +1492,7 @@ description = "check built-in string functions"
|
|
|
name = "startsWithCaseInsensitive3"
|
|
|
case_insensitive = true
|
|
|
query = '''
|
|
|
-file where opcode=0 and startsWith(file_name, "expLORER.exe")
|
|
|
+file where opcode==0 and startsWith(file_name, "expLORER.exe")
|
|
|
'''
|
|
|
expected_event_ids = [88, 92]
|
|
|
description = "check built-in string functions"
|
|
@@ -1500,7 +1500,7 @@ description = "check built-in string functions"
|
|
|
[[queries]]
|
|
|
name = "endsWith1"
|
|
|
query = '''
|
|
|
-file where opcode=0 and endsWith(file_name, "lorer.exe")
|
|
|
+file where opcode==0 and endsWith(file_name, "lorer.exe")
|
|
|
'''
|
|
|
expected_event_ids = [88]
|
|
|
description = "check built-in string functions"
|
|
@@ -1510,7 +1510,7 @@ description = "check built-in string functions"
|
|
|
name = "endsWithCaseInsensitive"
|
|
|
case_insensitive = true
|
|
|
query = '''
|
|
|
-file where opcode=0 and endsWith(file_name, "loREr.exe")
|
|
|
+file where opcode==0 and endsWith(file_name, "loREr.exe")
|
|
|
'''
|
|
|
expected_event_ids = [88]
|
|
|
description = "check built-in string functions"
|
|
@@ -1518,7 +1518,7 @@ description = "check built-in string functions"
|
|
|
[[queries]]
|
|
|
name = "endsWith2"
|
|
|
query = '''
|
|
|
-file where opcode=0 and startsWith("explorer.exeaaaaaaaa", file_name)
|
|
|
+file where opcode==0 and startsWith("explorer.exeaaaaaaaa", file_name)
|
|
|
'''
|
|
|
expected_event_ids = [88]
|
|
|
description = "check built-in string functions"
|
|
@@ -1527,7 +1527,7 @@ description = "check built-in string functions"
|
|
|
name = "endsWithAndCondition"
|
|
|
case_insensitive = true
|
|
|
query = '''
|
|
|
-file where opcode=0 and serial_event_id = 88 and startsWith("explorer.exeaAAAA", "EXPLORER.exe")
|
|
|
+file where opcode==0 and serial_event_id == 88 and startsWith("explorer.exeaAAAA", "EXPLORER.exe")
|
|
|
'''
|
|
|
expected_event_ids = [88]
|
|
|
description = "check built-in string functions"
|
|
@@ -1535,7 +1535,7 @@ description = "check built-in string functions"
|
|
|
[[queries]]
|
|
|
name = "stringContains2"
|
|
|
query = '''
|
|
|
-file where opcode=0 and stringContains("ABCDEFGHIexplorer.exeJKLMNOP", file_name)
|
|
|
+file where opcode==0 and stringContains("ABCDEFGHIexplorer.exeJKLMNOP", file_name)
|
|
|
'''
|
|
|
expected_event_ids = [88]
|
|
|
description = "check built-in string functions"
|
|
@@ -1544,7 +1544,7 @@ description = "check built-in string functions"
|
|
|
name = "indexOfCaseInsensitive"
|
|
|
case_insensitive = true
|
|
|
query = '''
|
|
|
-file where opcode=0 and indexOf(file_name, "plore") == 2 and indexOf(file_name, ".pf") == null
|
|
|
+file where opcode==0 and indexOf(file_name, "plore") == 2 and indexOf(file_name, ".pf") == null
|
|
|
'''
|
|
|
expected_event_ids = [88]
|
|
|
description = "check built-in string functions"
|
|
@@ -1552,7 +1552,7 @@ description = "check built-in string functions"
|
|
|
[[queries]]
|
|
|
name = "indexOf1"
|
|
|
query = '''
|
|
|
-file where opcode=0 and indexOf(file_name, "explorer.") > 0 and indexOf(file_name, "plore", 100) > 0
|
|
|
+file where opcode==0 and indexOf(file_name, "explorer.") > 0 and indexOf(file_name, "plore", 100) > 0
|
|
|
'''
|
|
|
expected_event_ids = []
|
|
|
description = "check built-in string functions"
|
|
@@ -1561,7 +1561,7 @@ description = "check built-in string functions"
|
|
|
name = "indexOf2"
|
|
|
case_sensitive = true
|
|
|
query = '''
|
|
|
-file where opcode=0 and indexOf(file_name, "plorer.", 0) == 2
|
|
|
+file where opcode==0 and indexOf(file_name, "plorer.", 0) == 2
|
|
|
'''
|
|
|
expected_event_ids = [88]
|
|
|
description = "check built-in string functions"
|
|
@@ -1570,7 +1570,7 @@ description = "check built-in string functions"
|
|
|
name = "indexOf3"
|
|
|
case_insensitive = true
|
|
|
query = '''
|
|
|
-file where opcode=0 and indexOf(file_name, "plorer.", 0) == 2
|
|
|
+file where opcode==0 and indexOf(file_name, "plorer.", 0) == 2
|
|
|
'''
|
|
|
expected_event_ids = [88, 92]
|
|
|
description = "check built-in string functions"
|
|
@@ -1579,7 +1579,7 @@ description = "check built-in string functions"
|
|
|
name = "indexOf4"
|
|
|
case_sensitive = true
|
|
|
query = '''
|
|
|
-file where opcode=0 and indexOf(file_name, "plorer.", 2) != null
|
|
|
+file where opcode==0 and indexOf(file_name, "plorer.", 2) != null
|
|
|
'''
|
|
|
expected_event_ids = [88]
|
|
|
description = "check built-in string functions"
|
|
@@ -1588,7 +1588,7 @@ description = "check built-in string functions"
|
|
|
name = "indexOf5"
|
|
|
case_insensitive = true
|
|
|
query = '''
|
|
|
-file where opcode=0 and indexOf(file_name, "plorer.", 2) != null
|
|
|
+file where opcode==0 and indexOf(file_name, "plorer.", 2) != null
|
|
|
'''
|
|
|
expected_event_ids = [88, 92]
|
|
|
description = "check built-in string functions"
|
|
@@ -1596,7 +1596,7 @@ description = "check built-in string functions"
|
|
|
[[queries]]
|
|
|
name = "indexOf6"
|
|
|
query = '''
|
|
|
-file where opcode=0 and indexOf(file_name, "plorer.", 4) != null
|
|
|
+file where opcode==0 and indexOf(file_name, "plorer.", 4) != null
|
|
|
'''
|
|
|
expected_event_ids = []
|
|
|
description = "check built-in string functions"
|
|
@@ -1604,7 +1604,7 @@ description = "check built-in string functions"
|
|
|
[[queries]]
|
|
|
name = "indexOf7"
|
|
|
query = '''
|
|
|
-file where opcode=0 and indexOf(file_name, "thing that never happened") != null
|
|
|
+file where opcode==0 and indexOf(file_name, "thing that never happened") != null
|
|
|
'''
|
|
|
expected_event_ids = []
|
|
|
description = "check built-in string functions"
|
|
@@ -1613,7 +1613,7 @@ description = "check built-in string functions"
|
|
|
name = "indexOf8"
|
|
|
case_insensitive = true
|
|
|
query = '''
|
|
|
-file where opcode=0 and indexOf(file_name, "plorer.", 2) == 2
|
|
|
+file where opcode==0 and indexOf(file_name, "plorer.", 2) == 2
|
|
|
'''
|
|
|
expected_event_ids = [88, 92]
|
|
|
description = "check substring ranges"
|
|
@@ -1622,7 +1622,7 @@ description = "check substring ranges"
|
|
|
name = "indexOf9"
|
|
|
case_sensitive = true
|
|
|
query = '''
|
|
|
-file where opcode=0 and indexOf(file_name, "plorer.", 2) == 2
|
|
|
+file where opcode==0 and indexOf(file_name, "plorer.", 2) == 2
|
|
|
'''
|
|
|
expected_event_ids = [88]
|
|
|
description = "check substring ranges"
|
|
@@ -1631,7 +1631,7 @@ description = "check substring ranges"
|
|
|
name = "indexOf10"
|
|
|
case_sensitive = true
|
|
|
query = '''
|
|
|
-file where opcode=0 and indexOf(file_name, "explorer.", 0) == 0
|
|
|
+file where opcode==0 and indexOf(file_name, "explorer.", 0) == 0
|
|
|
'''
|
|
|
expected_event_ids = [88]
|
|
|
description = "check substring ranges"
|
|
@@ -1640,7 +1640,7 @@ description = "check substring ranges"
|
|
|
name = "indexOf11"
|
|
|
case_insensitive = true
|
|
|
query = '''
|
|
|
-file where opcode=0 and indexOf(file_name, "explorer.", 0) == 0
|
|
|
+file where opcode==0 and indexOf(file_name, "explorer.", 0) == 0
|
|
|
'''
|
|
|
expected_event_ids = [88, 92]
|
|
|
description = "check substring ranges"
|
|
@@ -1649,7 +1649,7 @@ description = "check substring ranges"
|
|
|
name = "substring1"
|
|
|
case_insensitive = true
|
|
|
query = '''
|
|
|
-file where serial_event_id=88 and substring(file_name, 0, 4) == "expl"
|
|
|
+file where serial_event_id==88 and substring(file_name, 0, 4) == "expl"
|
|
|
'''
|
|
|
expected_event_ids = [88]
|
|
|
description = "check substring ranges"
|