Skip to content

Commit dfc58a6

Browse files
authored
Add support for using the 'dotnet' module in YARA rules (#749)
* deps/yara: #747, enable .NET module * support/yara_patterns/tools/pe/x86/packers: use .NET module * cpdetect: refactor formating - mosty long lines * cpdetect/raw_data: fix typo * cpdetect: refactor Signatures * cpdetect: remove version solver module * cpdetect: refactor * cpdetect: do not use new and delete * cpdetect: use YARA rules without matches as heuristic detections * cpdetect: refactor YARA signature files selection * cpdetect: fix doxygen
1 parent 8bcd650 commit dfc58a6

57 files changed

Lines changed: 1485 additions & 1601 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
* Enhancement: Improved detection of many packers in `retdec-fileinfo`, including Armadillo ([#733](https://github.com/avast/retdec/pull/733)), VMProtect ([#734](https://github.com/avast/retdec/pull/734)), Petite ([#735](https://github.com/avast/retdec/pull/735)), Enigma ([#741](https://github.com/avast/retdec/pull/741)), ASPack ([#743](https://github.com/avast/retdec/pull/743)), Eziriz ([#746](https://github.com/avast/retdec/pull/746)).
66
* Enhancement: Added a detection of PyInstaller to `retdec-fileinfo` ([#748](https://github.com/avast/retdec/pull/748)).
7+
* Enhancement: Enable .NET module in RetDec's YARA ([#747](https://github.com/avast/retdec/issues/747)).
78
* Fix: Fixed build on some systems by adding missing includes of `<limits>` into `retdec-fileinfo` ([#745](https://github.com/avast/retdec/pull/745)).
89

910
# v4.0 (2020-04-07)

deps/yara/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ if(NOT MSVC)
9595
COMMAND ./bootstrap.sh
9696
COMMAND ./configure
9797
--prefix=${YARA_INSTALL_DIR}
98+
--enable-dotnet
9899
--enable-macho
99100
--disable-shared
100101
--without-crypto

deps/yara/patch.cmake

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ function(patch_vcxproj file)
66

77
string(REPLACE
88
"<PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;CUCKOO_MODULE;HASH_MODULE;DOTNET_MODULE;HAVE_LIBCRYPTO;USE_WINDOWS_PROC;YR_BUILDING_STATIC_LIB;PROFILING_ENABLED</PreprocessorDefinitions>"
9-
"<PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;MACHO_MODULE;USE_WINDOWS_PROC</PreprocessorDefinitions>"
9+
"<PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;DOTNET_MODULE;MACHO_MODULE;USE_WINDOWS_PROC</PreprocessorDefinitions>"
1010
new_content
1111
"${new_content}"
1212
)
@@ -18,7 +18,7 @@ function(patch_vcxproj file)
1818
)
1919
string(REPLACE
2020
"<PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;CUCKOO_MODULE;HASH_MODULE;DOTNET_MODULE;HAVE_LIBCRYPTO;USE_WINDOWS_PROC;YR_BUILDING_STATIC_LIBC;PROFILING_ENABLED</PreprocessorDefinitions>"
21-
"<PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;MACHO_MODULE;USE_WINDOWS_PROC</PreprocessorDefinitions>"
21+
"<PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;DOTNET_MODULE;MACHO_MODULE;USE_WINDOWS_PROC</PreprocessorDefinitions>"
2222
new_content
2323
"${new_content}"
2424
)
@@ -30,13 +30,13 @@ function(patch_vcxproj file)
3030
)
3131
string(REPLACE
3232
"<PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;CUCKOO_MODULE;HASH_MODULE;DOTNET_MODULE;HAVE_LIBCRYPTO;USE_WINDOWS_PROC;YR_BUILDING_STATIC_LIB</PreprocessorDefinitions>"
33-
"<PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;MACHO_MODULE;USE_WINDOWS_PROC</PreprocessorDefinitions>"
33+
"<PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;DOTNET_MODULE;MACHO_MODULE;USE_WINDOWS_PROC</PreprocessorDefinitions>"
3434
new_content
3535
"${new_content}"
3636
)
3737
string(REPLACE
3838
"<PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;CUCKOO_MODULE;HASH_MODULE;DOTNET_MODULE;HAVE_LIBCRYPTO;USE_WINDOWS_PROC;YR_BUILDING_STATIC_LIB;NDEBUG=1</PreprocessorDefinitions>"
39-
"<PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;MACHO_MODULE;USE_WINDOWS_PROC;NDEBUG=1</PreprocessorDefinitions>"
39+
"<PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;DOTNET_MODULE;MACHO_MODULE;USE_WINDOWS_PROC;NDEBUG=1</PreprocessorDefinitions>"
4040
new_content
4141
"${new_content}"
4242
)

include/retdec/cpdetect/compiler_detector/coff_compiler.h

Lines changed: 0 additions & 28 deletions
This file was deleted.

include/retdec/cpdetect/compiler_detector/compiler_detector.h

Lines changed: 0 additions & 75 deletions
This file was deleted.

include/retdec/cpdetect/compiler_detector/elf_compiler.h

Lines changed: 0 additions & 28 deletions
This file was deleted.

include/retdec/cpdetect/compiler_detector/intel_hex_compiler.h

Lines changed: 0 additions & 28 deletions
This file was deleted.

include/retdec/cpdetect/compiler_detector/macho_compiler.h

Lines changed: 0 additions & 28 deletions
This file was deleted.

include/retdec/cpdetect/compiler_detector/pe_compiler.h

Lines changed: 0 additions & 28 deletions
This file was deleted.

include/retdec/cpdetect/compiler_detector/raw_data_compiler.h

Lines changed: 0 additions & 28 deletions
This file was deleted.

0 commit comments

Comments
 (0)