Commit Graph

1950 Commits

Author SHA1 Message Date
Thomas Roccia
21ad19c2ca Update installers.yara 2021-07-21 11:13:29 +02:00
Thomas Roccia
13b1d5a186 adding InnoSetup 6.1.0 2021-07-21 11:13:29 +02:00
Peter Matula
cdbfa6111a
CHANGELOG.md: add entry for #967 & #970 2021-07-20 12:17:56 +02:00
Ladislav Zezula
e6da1f748f
Fixed Lz issue 967 (#970)
* Data Directories are copied up do 16, regardless of NumberOfRvaAndSizes, because of .NET framework doesn't care

* Added handling of .NET edge cases

* Added image loader fix for Windows 11

Co-authored-by: Ladislav Zezula <ladislav.zezula@avast.com>
2021-07-20 12:13:51 +02:00
Peter Matula
3686b38450
CHANGELOG.md: add entry for #958 & #979 2021-07-20 11:15:15 +02:00
HoundThe
3d506f212f
Change the section name parsing to only remove trailing zeroes (#979)
* Change the section name parsing to only rstrip zeroes

* Remove accidental <algorithm> include

* Change formatting to match the existing code style
2021-07-20 11:10:50 +02:00
Peter Matula
bde3eb5753
CHANGELOG.md: add entry for #966 and #983 2021-07-16 14:46:41 +02:00
houndthe
6711d05756 Add check that the typelib customattribute parent points to Assembly table to ignore random GUIDs 2021-07-16 14:42:23 +02:00
Peter Matula
5e73460d6b
CHANGELOG.md: add entry for #988 2021-07-16 12:15:24 +02:00
Ladislav Zezula
5df3bd2d6e Fixed resource issue 2021-07-16 12:10:48 +02:00
Peter Matula
4b1915f8c8
CHANGELOG.md: add entry for #951 and #984 2021-07-16 12:08:01 +02:00
houndthe
c9fa7b0cdd Add virtual destructor for Resource class 2021-07-16 12:05:24 +02:00
HoundThe
a2a422634a
Fix UB due to iterator reaching before begin() in rich header parsing (#987)
* Fix UB due to iterator before begin()

* pelib/RichHeader: change it++ to ++it

Co-authored-by: Peter Matula <p3t3r.matula@gmail.com>
2021-07-15 15:30:03 +02:00
Peter Matula
b3ba8a87a3 CHANGELOG.md: add entry for #957, #978 2021-07-12 08:34:06 +02:00
Peter Matula
3cbb544425 CHANGELOG.md: add entry for #956, #976 2021-07-12 08:32:11 +02:00
Peter Matula
362b48a2fe CHANGELOG.md: add entry for #974 and #959 2021-07-12 08:32:11 +02:00
houndthe
27002fbfd4 Increased PE symbols max length 2021-07-12 08:30:54 +02:00
houndthe
9b5e1a97e6 Add certificate oneline subject/issuer for YARA comp to the json output 2021-07-12 08:21:05 +02:00
HoundThe
922745a749
Add sanity check for length of a PE resource type name (#974)
* Add sanity check for max resource string length

* Change code style to follow rest the existing code
2021-07-12 07:42:49 +02:00
Peter Matula
9e096a2c4a
CHANGELOG.md: add entry for #973 2021-07-09 19:24:45 +02:00
HoundThe
b337c6622a
Fix the Rich header analysis algorithm (#973)
* Change the Rich header analysis to bottom-up

* Propagate real offset from start of the file to the Rich header

* set default offset value

* Change code style to follow the rest of the file code
2021-07-09 19:19:36 +02:00
xbabka01
e59b1388c7
Make X509 serial number parsing code compatible with YARA (#954) (#955)
* Make X509 serial number parsing code compatible with YARA (#954)

* Return early
2021-06-03 23:19:25 +02:00
Petr Zemek
59d94dcc87
llvmir2hll: Fix -Wrange-loop-construct warnings.
This fixes the following two warnings reported by GCC 11:

    src/llvmir2hll/llvm/llvmir2bir_converter/structure_converter.cpp:1957:25:
    warning: loop variable ‘clause’ creates a copy from type ‘const
    std::shared_ptr<std::pair<std::vector<std::shared_ptr<retdec::llvmir2hll::Expression>

    src/llvmir2hll/llvmir2hll.cpp:894:25: warning: loop variable ‘pfId’ creates
    a copy from type ‘const std::__cxx11::basic_string<char>’
    [-Wrange-loop-construct]
2021-06-03 14:48:51 +02:00
Peter Matula
b37492014f CHANGELOG.md: add entry for #902 and #380 2021-05-20 14:07:39 +02:00
HoundThe
d80009788d
Add parsing of the PE Authenticode format (#902)
* init

* Some more glue

* Add Certificate processing

* Added ability to get signers cert chain, counter signer chain, restructuring start

* Solve merge conflicts

* Add printing of nested signatures

* Major refactor

* Refactoring, adding details

* Refactor

* refactor, extending authenticode to return signature abstraciton, restructuing certificate table to accept new Authenticode content

* large restructuring, implementing authenticode to general signature inteface

* Added prototype of new json format for certificates

* adhere to the code style

* commiting forgotten certificate TU

* Adding copyright header

* decluttering authenticode interfaces, removing obsolete comments

* decluttering authenticode interfaces, removing obsolete comments, updating copyright

* Remove <filesystem> dependency

* Restructure of ContentInfo parsing, better error checking based on MS Authenticode spec

* Completed parsing of all members of SignedData that are in the specification, added exception handler in pe_format

* Complete parsing of all SignerInfo information based on MS specification

* Added sha1 and sha256 certificate digests

* Finish extraction of all certificate information that was exported in existing fileinfo impl

* Improving error handling and proper deallocation

* Got rid of all leaks

* Added base for MsCounterSignatures and Pkcs9CounterSignatures and their  chain + signing time

* Remove fileinfo certificateTable

* Add more parsed information to the output, Implement plain text output

* Forgot to add ms_counter_signature files to git

* Adding better validation and feedback

* Add the renamed source files to git

* Add verification of Pkcs7 signatures and Pkcs9 countersignatures

* Implement ms counter signature verification and output of verification warnings

* remove non trivial intializers

* Polishing verification, adding all certificates to the output, redone chain bulding

* Improve error handling

* Fix uninitialized values due to parsing errors

* Get rid of exceptions

* Fix more edge cases

* Add verification if the signed and file hash match, modify the plain and json output

* Fix unhandled null dereferences and uninitialized branches

* Remove unnecessary copying

* Add programName from SpcOpusInfo to the output, remove dead code, add missing newlines, fix windows build

* Revert indent, add proper doxygen file comments

* Add certificate public key back to output

* Remove dots from error messages

* pkcs7_signature.cpp: fix doxygen

* pkcs7_signature.h: fix doxygen

* pkcs9_counter_signature.cpp: fix doxygen

* pkcs9_counter_signature.h: fix doxygen

* pkcs7_signature.cpp: fix doxygen and source

* authenticode_structs.h: fix doxygen

* authenticode_structs.cpp: fix doxygen

* Remove undefined behaviour, set default value of algorithm type

Co-authored-by: Karel Hájek <karel.hajek@avast.com>
Co-authored-by: Peter Matula <p3t3r.matula@gmail.com>
2021-05-20 13:56:14 +02:00
Marek Milkovič
4878585d1a Disable use of external database in the unpacker 2021-04-27 19:13:24 +02:00
Marek Milkovič
7086f80c40
Merge pull request #948 from avast/947/upx-new-lzma-stub
Added new x86 PE signatures for LZMA UPX stub for UPX 3.94+
2021-04-23 18:55:33 +02:00
Marek Milkovič
a5ea890cbf Added new x86 PE signatures for LZMA UPX stub for UPX 3.94+ 2021-04-23 04:09:50 +02:00
Peter Matula
fc73574a9a fileinfo/rich_header: present hashes also in verbose JSON 2021-04-20 13:41:44 +02:00
Peter Matula
0fc486480b CHANGELOG.md: add entry for #621, #945 2021-04-20 13:24:37 +02:00
houndthe
b2c271eec0 Implement calculation of decrypted Rich Header hash in versions: crc32, md5 and sha256 2021-04-20 13:15:27 +02:00
Peter Matula
b2079307db CHANGELOG.md: add entry for #286, #936 2021-04-14 14:11:28 +02:00
HoundThe
0cdc9a1de6
Implement telfhash for ELF import table (#936)
* Implement telfhash for import table and add TLSH to the project

* comment the import symbol filter regexes

* Use std::set for faster lookup

* Address code review comments

* better formatting

* Move TLSH to deps/ using cmake

* Forgot to commit tlsh headers

* Restructure elf_format to get symbols in the same manner as telfhash

* Ignore symbols from dynamic segments

* First exclude then convert to lower_case

* mask out symbol visibility from others

* Move telfhash outside import table to elf_format, use TLSH for all imphashes, create default imphash for ELF

* Fix uninitialized value

* Fixed TLSH build on Windows

* fileformat/CMakeLists.txt: do not add tlsh-related stuff

* deps/tlsh: refactor CMake

* cmake/options.cmake: move TLSH to deps section

* deps/tlsh/cmake: add new line at the end

* fileformat/elf_format: C comment -> C++ comment

* fileformat/elf_import_table.h: add missing new line

* fileformat: remove trailing spaces

Co-authored-by: Peter Matula <peter.matula@avast.com>
Co-authored-by: Peter Matula <p3t3r.matula@gmail.com>
2021-04-14 13:03:15 +02:00
Petr Zemek
dca4d73f5c
Add a CHANGELOG entry for #935. 2021-03-17 08:21:37 +01:00
Petr Zemek
397f05f751
Remove useless trailing whitespace from CHANGELOG. 2021-03-17 08:21:36 +01:00
Petr Zemek
469ed9e8aa
Merge pull request #935 from avast/LZ_sha512_yara_pattern
Detection of SHA512 improved. Prevented YARA DoS on d251e8b3a5818132d…
2021-03-17 08:18:33 +01:00
Ladislav Zezula
3a94c2aba7 Detection of SHA512 improved. Prevented YARA DoS on d251e8b3a5818132de9728ea01378f1f7bf5d41ba698c42ddb706761fd714113 2021-03-16 18:38:56 +01:00
Marek Milkovič
4da009ae61 Added #929 to CHANGELOG 2021-02-23 13:50:41 +01:00
Marek Milkovič
ab23f1a6da Minor changes to UPX unpacker improvements
* Added support for filter 0x51 (big-endian variant for ARM filter 0x50)
* Added compression algorithm into description of packer patterns
2021-02-22 20:36:29 +01:00
Marek Milkovič
4e9aa29fd4
Merge pull request #929 from TheDuchy/master
unpackertool: added signatures for new UPX versions
2021-02-22 20:35:23 +01:00
Jan Neduchal
898b8dfb44 unpackertool: added signatures for new UPX versions 2021-02-22 11:47:40 +01:00
Peter Matula
8693343c87
CHANGELOG.md: entry for added version info 2021-02-18 17:13:53 +01:00
Peter Matula
3cf0f3827d fileinfo: print Fileinfo version in verbose mode 2021-02-18 17:06:17 +01:00
Peter Matula
54214dfd76 retdec: add version info to all executable apps 2021-02-18 17:06:17 +01:00
Peter Matula
21baf36dc5
Make Fileinfo configurable via a JSON config file (#923)
* fileinfo: load config from JSON

* serdes: fix deserializeDouble()

* fileinfo: use serdes for deserialization of std values

* CHANGELOG.md: add entry for fileinfo JSON configuration

* fileinfo: replace cerr with our logger

* fileinfo: fix noHashes key in JSON config

* fileinfo: change defaut cal of maxMemoryHalf in JSON config

* fileinfo: fix json config loading
2021-02-12 20:52:55 +01:00
Petr Zemek
869cdd36cf
Add a CHANGELOG entry for #921. 2021-02-11 17:57:38 +01:00
Petr Zemek
3c5a61646d
pelib: Fix a typo in a comment in PeLib::ImageLoader::Load(). 2021-02-11 17:30:23 +01:00
Petr Zemek
a75fbf9823
Remove useless trailing whitespace. 2021-02-11 17:30:13 +01:00
Petr Zemek
2d903efcba
Merge pull request #922 from avast/LZ_Issue_921
Fixed issue https://github.com/avast/retdec/issues/921
2021-02-11 17:21:42 +01:00
Ladislav Zezula
4fe8298411 + PE Files cut in the middle of IMAGE_FILE_HEADER not cause fileinfo's loader to return ERROR_NONE and loaderError to LDR_ERROR_NTHEADER_OUT_OF_FILE 2021-02-08 22:01:14 +01:00