Commit graph

28 commits

Author SHA1 Message Date
Val Snyder
7ff29b8c37
Bump copyright dates for 2025 2025-02-14 10:24:30 -05:00
Micah Snyder
9cb28e51e6 Bump copyright dates for 2024 2024-01-22 11:27:17 -05:00
Mickey Sola
4b32eb40a9 clang format
Running clang format on codebase
2023-04-20 10:48:09 -07:00
Mickey Sola
0b90fe9814 2287 - fix ole2 vba temp file leak
Previous behaviour would remove temp files by deleting the subdirectory
This caused issues in cases (on Windows) where subdirectories aren't created
due to performance concerns

This commit removes tempfiles individually if keeptemp is off

Original patch authored by Thomas Vy
2023-04-20 10:48:09 -07:00
Micah Snyder
6eebecc303 Bump copyright for 2023 2023-02-12 11:20:22 -08:00
micasnyd
140c88aa4e Bump copyright for 2022
Includes minor format corrections.
2022-01-09 14:23:25 -07:00
Micah Snyder (micasnyd)
b9ca6ea103 Update copyright dates for 2021
Also fixes up clang-format.
2021-03-19 15:12:26 -07:00
Micah Snyder
860764eb16 Heuristic macro detection for imp VBA extraction
Notably the commit adds a heuristic alert when VBA is extracted using
the new VBA extraction code and similarly adds "HasMacros":true to the
JSON scan properties.

In addition, a change was added to the cli_sanitize_filepath() function
so it converts posix pathseps to Windows pathseps on Windows and also
outputs a sanitized basename pointer (optional) which is used when
generating a temporary filename so that using a prefix with pathseps in
it won't cause file creation failures (observed with --leave-temps where
original filenames are incorporated into temporarily filenames).

Included soem error handling improvements for cli_vba_scandir() to
better track alert and macro detections.

Downgraded utf8 conversion error messages to debug messages because they
are too verbose in files with invalid filenames (observed in some
malware).

Changed the xlm macro and vba project temp filenames to include
"xlm_macros" and "vba_project" prefix, to make it easier to find them.

Relocated XLM and VBA temp files from the top-level tmp directory to the
current sub_tmpdir, so tempfiles for a given scan are more organized.
2020-08-11 11:45:06 -07:00
Micah Snyder
e2f59af30a Clang-format touchup 2020-07-24 16:37:25 -07:00
Jonas Zaddach (jzaddach)
b7f8440965 Modernize VBA code extraction from Microsoft Office files
- Existing VBA extraction code uses undocumented cache structures.
  This code uses the documented way of accessing VBA projects.
- Adds additional detail to the dumped information:
  Project name, Project doc string, ...
  All VBA projects are dumped into a single file.
- Malware authors are currently evading detection by spreading
  malicious code over several projects. It is hard to write
  signatures if only part of the malicious code is visible.
2020-04-28 13:32:07 -07:00
Micah Snyder
206dbaefe8 Update copyright dates for 2020 2020-01-03 15:44:07 -05:00
Micah Snyder
4524c398f3 Argument and return types for fmap_readn(), cli_writen(), cli_readn() converted to use size_t instead of int. 2019-10-02 16:08:25 -04:00
Micah Snyder
50f178dc63 fuzz - 12166 - Fix for 4-byte out of bounds write wherein the an invalid struct pointer member variable is set to zero. The fix adds bounds checking to the Uniq storage 'add' function as well as error code checks. Included a lot of new inline documentation. 2019-10-02 16:08:19 -04:00
Micah Snyder
52cddcbcfd Updating and cleaning up copyright notices. 2019-10-02 16:08:18 -04:00
Micah Snyder
b3e82e5e61 Replacing libclamav/cltypes.h with clamav-types.h.in, which generates a header clamav-types.h that we install alongside clamav.h. 2019-10-02 16:08:17 -04:00
Micah Snyder
72fd33c8b2 clang-format'd using new .clang-format rules. 2019-10-02 16:08:16 -04:00
Mickey Sola
46a35abe56 mass update of copyright headers 2015-09-17 13:41:26 -04:00
Kevin Lin
4c37996842 doc/ppt: moved information stream parsing from vba source to ole2 source 2014-04-21 18:30:28 -04:00
Kevin Lin
09dddc5be3 doc/ppt: added SummaryInfo and DocumentSummary streams parsing, JSON or debug 2014-04-21 16:44:26 -04:00
Tomasz Kojm
33068e0973 libclamav: drop cl_settempdir(); use cl_engine_set() with CL_ENGINE_TMPDIR and CL_ENGINE_KEEPTMP instead
git-svn: trunk@4416
2008-11-14 22:23:39 +00:00
aCaB
937ade082c fix collisions in ole2/vba
git-svn: trunk@4068
2008-08-03 14:30:33 +00:00
Tomasz Kojm
72ce4b70eb improve handling of PDF, CAB, RTF, OLE2 and HTML files (sync with branch/0.93)
git-svn: trunk@3862
2008-05-27 16:30:47 +00:00
Tomasz Kojm
2023340a41 update copyrights and stick more files to GPLv2; move and add more credits to the AUTHORS file; add COPYING.BSD
git-svn: trunk@3749
2008-04-02 15:24:51 +00:00
aCaB
b5231f5f67 realign structs see bb#474
git-svn: trunk@3537
2008-01-24 13:24:02 +00:00
Nigel Horne
332987babf Change copyright
git-svn: trunk@3449
2007-12-21 16:26:12 +00:00
Nigel Horne
11d24f8a8f Code cleanup
git-svn: trunk@3432
2007-12-18 14:32:47 +00:00
Nigel Horne
9fe789f8b8 Many changes since 0.92
git-svn: trunk@3407
2007-12-13 16:18:18 +00:00
Sven Strickroth
a99111f050 remove old CVS-stuff and make the repository look more like SVN
git-svn: trunk@2755
2007-02-17 19:02:20 +00:00
Renamed from clamav-devel/libclamav/vba_extract.h (Browse further)