这里的答案-- https://stackoverflow.com/posts/58483988/revisions (绝对值得阅读以理解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\\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我的yara规则犯了什么错误。
若要匹配以下目录:
C:\Program Files (x86)\ * \ mftrace.exe星号基本上代表程序文件(x86)和mftrace.exe之间的任何中间路径。
发布于 2019-10-30 00:27:14
看起来您在第28行中有一个额外的右括号:
cuckoo.filesystem.file_access(/^C:\\Program Files (x86)\\)?(.*\\)?mftrace\.exe$/i)
^在下面一行的几乎相同的位置上还有另一个。
此外,您可能希望转义模式中的其他括号,这些括号应该被视为文本(如(x86))。
https://stackoverflow.com/questions/58617083
复制相似问题