Yara规则-Regex-语法错误:意外“')”
这里的答案——为了理解yara表面上的正则表达式规则,绝对值得一读——似乎适用于我正在寻找的给定二进制文件中的20个,例如:Yara规则-Regex-语法错误:意外“')”,regex,yara,Regex,Yara,这里的答案——为了理解yara表面上的正则表达式规则,绝对值得一读——似乎适用于我正在寻找的给定二进制文件中的20个,例如: cuckoo.filesystem.file_access(/^C:\\(.*\\)?dnx\.exe$/i) or cuckoo.filesystem.file_access(/C\:\\WINDOWS\\system32\\Dxcap.exe/) or cuckoo.filesystem.file_access(/C\:\\WINDOWS\\system32\\dxc
cuckoo.filesystem.file_access(/^C:\\(.*\\)?dnx\.exe$/i) or
cuckoo.filesystem.file_access(/C\:\\WINDOWS\\system32\\Dxcap.exe/) or
cuckoo.filesystem.file_access(/C\:\\WINDOWS\\system32\\dxcap.exe/) or
cuckoo.filesystem.file_access(/^C:\\Program Files\\(Microsoft Office\\)?(.*\\)?Excel\.exe$/i) or
cuckoo.filesystem.file_access(/^C:\\Program Files\\(Microsoft Office\\)?(.*\\)?EXCEL\.exe$/i) or
cuckoo.filesystem.file_access(/^C:\\Program Files\\(Microsoft Office\\)?(.*\\)?excel\.exe$/i) or
cuckoo.filesystem.file_access(/^C:\\Program Files (x86)\\(Microsoft Office\\)?(.*\\)?Excel\.exe$/i) or
cuckoo.filesystem.file_access(/^C:\\Program Files (x86)\\(Microsoft Office\\)?(.*\\)?EXCEL\.exe$/i) or
cuckoo.filesystem.file_access(/^C:\\Program Files (x86)\\(Microsoft Office\\)?(.*\\)?excel\.exe$/i) or
但是,以下行出现错误:
cuckoo.filesystem.file_access(/^C:\\Program Files (x86)\\)?(.*\\)?mftrace\.exe$/i) or
该错误为,第28行语法错误:意外
第27、28和29行为:
cuckoo.filesystem.file_access(/^C:\\Program Files (x86)\\(Microsoft Office\\)?(.*\\)?excel\.exe$/i) or
cuckoo.filesystem.file_access(/^C:\\Program Files (x86)\\)?(.*\\)?mftrace\.exe$/i) or
cuckoo.filesystem.file_access(/^C:\\Program Files\\)?(.*\\)?mftrace\.exe$/i) or
我的雅拉规则犯了什么错误
要匹配以下目录:
C:\Program Files (x86)\ * \ mftrace.exe
其中星号表示程序文件x86和mftrace.exe之间的任何中间路径,看起来第28行有一个额外的右括号:
cuckoo.filesystem.file_access(/^C:\\Program Files (x86)\\)?(.*\\)?mftrace\.exe$/i)
^
在下一行几乎相同的位置还有一个
此外,您可能希望对模式中的其他括号进行转义,这些括号应该像x86一样被视为文本。这不是问题,但您应该在x86中转义and