Browse code

Changing numerous scan options' names, primarily those of heuristic signatature alert options. Original options (command line and clamd) will remain as deprecated & undocumented for a couple releases. Added 2 extra scan options to allow users to differentiate between alerting on encrypted archives vs encrypted documents (bb11911).

Micah Snyder (micasnyd) authored on 2018/10/10 22:02:28
Showing 17 changed files
... ...
@@ -923,31 +923,83 @@ int recvloop_th(int *socketds, unsigned nsockets, struct cl_engine *engine, unsi
923 923
     val = cl_engine_get_num(engine, CL_ENGINE_PCRE_MAX_FILESIZE, NULL);
924 924
     logg("Limits: PCREMaxFileSize limit set to %llu.\n", val);
925 925
 
926
-    if(optget(opts, "ScanArchive")->enabled) {
927
-	logg("Archive support enabled.\n");
928
-	options.parse |= CL_SCAN_PARSE_ARCHIVE;
926
+    if (optget(opts, "ScanArchive")->enabled) {
927
+        logg("Archive support enabled.\n");
928
+        options.parse |= CL_SCAN_PARSE_ARCHIVE;
929
+    } else {
930
+        logg("Archive support disabled.\n");
931
+    }
932
+
933
+    /* TODO: Remove deprecated option in a future feature release. */
934
+    if (optget(opts, "ArchiveBlockEncrypted")->enabled) {
935
+        if (options.parse & CL_SCAN_PARSE_ARCHIVE) {
936
+            logg(
937
+              "^Using deprecated option \"ArchiveBlockEncrypted\" to alert on "
938
+              "encrypted archives _and_ documents. Please update your "
939
+              "configuration to use replacement options \"AlertEncrypted\", or "
940
+              "\"AlertEncryptedArchive\" and/or \"AlertEncryptedDoc\".\n");
941
+            options.heuristic |= CL_SCAN_HEURISTIC_ENCRYPTED_ARCHIVE;
942
+            options.heuristic |= CL_SCAN_HEURISTIC_ENCRYPTED_DOC;
943
+        } else {
944
+            logg(
945
+              "^Using deprecated option \"ArchiveBlockEncrypted\" to alert on "
946
+              "encrypted documents. Please update your configuration to use "
947
+              "replacement options \"AlertEncrypted\", or "
948
+              "\"AlertEncryptedArchive\" and/or \"AlertEncryptedDoc\".\n");
949
+            options.heuristic |= CL_SCAN_HEURISTIC_ENCRYPTED_DOC;
950
+        }
951
+    }
929 952
 
930
-	if(optget(opts, "ArchiveBlockEncrypted")->enabled) {
931
-	    logg("Archive: Blocking encrypted archives.\n");
932
-	    options.heuristic |= CL_SCAN_HEURISTIC_ENCRYPTED;
933
-	}
953
+    if (optget(opts, "AlertEncrypted")->enabled) {
954
+        if (options.parse & CL_SCAN_PARSE_ARCHIVE) {
955
+            logg("Alerting of encrypted archives _and_ documents enabled.\n");
956
+            options.heuristic |= CL_SCAN_HEURISTIC_ENCRYPTED_ARCHIVE;
957
+            options.heuristic |= CL_SCAN_HEURISTIC_ENCRYPTED_DOC;
958
+        } else {
959
+            logg("Alerting of encrypted documents enabled.\n");
960
+            options.heuristic |= CL_SCAN_HEURISTIC_ENCRYPTED_DOC;
961
+        }
962
+    }
934 963
 
935
-    } else {
936
-	logg("Archive support disabled.\n");
964
+    if (optget(opts, "AlertEncryptedArchive")->enabled) {
965
+        if (options.parse & CL_SCAN_PARSE_ARCHIVE) {
966
+            logg("Alerting of encrypted archives _and_ documents enabled.\n");
967
+            options.heuristic |= CL_SCAN_HEURISTIC_ENCRYPTED_ARCHIVE;
968
+        } else {
969
+            logg("^Encrypted archive alerting requested, but archive support "
970
+                 "is disabled!\n");
971
+        }
972
+    }
973
+
974
+    if (optget(opts, "AlertEncryptedDoc")->enabled) {
975
+        logg("Alerting of encrypted documents enabled.\n");
976
+        options.heuristic |= CL_SCAN_HEURISTIC_ENCRYPTED_DOC;
937 977
     }
938 978
 
979
+    /* TODO: Remove deprecated option in a future feature release. */
939 980
     if (optget(opts, "BlockMax")->enabled) {
940
-        logg("BlockMax heuristic detection enabled.\n");
981
+        logg("^Using deprecated option \"BlockMax\" to enable heuristic alerts "
982
+             "when scans exceed set maximums. Please update your configuration "
983
+             "to use replacement option \"AlertExceedsMax\".\n");
984
+        options.heuristic |= CL_SCAN_HEURISTIC_EXCEEDS_MAX;
985
+    } else if (optget(opts, "AlertExceedsMax")->enabled) {
986
+        logg("Heuristic alerting enabled for scans that exceed set maximums.\n");
941 987
         options.heuristic |= CL_SCAN_HEURISTIC_EXCEEDS_MAX;
942 988
     } else {
943
-        logg("BlockMax heuristic detection disabled.\n");
944
-    }
945
-
946
-    if(optget(opts, "AlgorithmicDetection")->enabled) {
947
-	logg("Algorithmic detection enabled.\n");
948
-	options.general |= CL_SCAN_GENERAL_HEURISTICS;
989
+        logg("AlertExceedsMax heuristic detection disabled.\n");
990
+    }
991
+
992
+    /* TODO: Remove deprecated option in a future feature release. */
993
+    if (optget(opts, "AlgorithmicDetection")->enabled) {
994
+        logg("^Using deprecated option \"AlgorithmicDetection\" to enable "
995
+             "heuristic alerts. Please update your configuration to use "
996
+             "replacement option \"HeuristicAlerts\".\n");
997
+        options.heuristic |= CL_SCAN_GENERAL_HEURISTICS;
998
+    } else if (optget(opts, "HeuristicAlerts")->enabled) {
999
+        logg("Heuristic alerts enabled.\n");
1000
+        options.general |= CL_SCAN_GENERAL_HEURISTICS;
949 1001
     } else {
950
-	logg("Algorithmic detection disabled.\n");
1002
+        logg("Heuristic alerts disabled.\n");
951 1003
     }
952 1004
 
953 1005
     if(optget(opts, "ScanPE")->enabled) {
... ...
@@ -964,11 +1016,13 @@ int recvloop_th(int *socketds, unsigned nsockets, struct cl_engine *engine, unsi
964 964
 	logg("ELF support disabled.\n");
965 965
     }
966 966
 
967
-    if(optget(opts, "ScanPE")->enabled || optget(opts, "ScanELF")->enabled) {
968
-	if(optget(opts, "DetectBrokenExecutables")->enabled) {
969
-	    logg("Detection of broken executables enabled.\n");
970
-	    options.heuristic |= CL_SCAN_HEURISTIC_BROKEN;
971
-	}
967
+	/* TODO: Remove deprecated option in a future feature release */
968
+    if (optget(opts, "ScanPE")->enabled || optget(opts, "ScanELF")->enabled) {
969
+        if ((optget(opts, "DetectBrokenExecutables")->enabled) || 
970
+			(optget(opts, "AlertBrokenExecutables")->enabled)) {
971
+            logg("Alerting on broken executables enabled.\n");
972
+            options.heuristic |= CL_SCAN_HEURISTIC_BROKEN;
973
+        }
972 974
     }
973 975
 
974 976
     if(optget(opts, "ScanMail")->enabled) {
... ...
@@ -984,15 +1038,18 @@ int recvloop_th(int *socketds, unsigned nsockets, struct cl_engine *engine, unsi
984 984
 	logg("Mail files support disabled.\n");
985 985
     }
986 986
 
987
-    if(optget(opts, "ScanOLE2")->enabled) {
988
-	logg("OLE2 support enabled.\n");
989
-	options.parse |= CL_SCAN_PARSE_OLE2;
990
-	if(optget(opts, "OLE2BlockMacros")->enabled) {
991
-	    logg("OLE2: Blocking all VBA macros.\n");
992
-	    options.heuristic |= CL_SCAN_HEURISTIC_MACROS;
993
-	}
987
+    if (optget(opts, "ScanOLE2")->enabled) {
988
+        logg("OLE2 support enabled.\n");
989
+        options.parse |= CL_SCAN_PARSE_OLE2;
990
+		
991
+		/* TODO: Remove deprecated option in a future feature release */
992
+        if ((optget(opts, "OLE2BlockMacros")->enabled) ||
993
+        	(optget(opts, "AlertOLE2Macros")->enabled)) {
994
+            logg("OLE2: Alerting on all VBA macros.\n");
995
+            options.heuristic |= CL_SCAN_HEURISTIC_MACROS;
996
+        }
994 997
     } else {
995
-	logg("OLE2 support disabled.\n");
998
+        logg("OLE2 support disabled.\n");
996 999
     }
997 1000
 
998 1001
     if(optget(opts, "ScanPDF")->enabled) {
... ...
@@ -1030,22 +1087,26 @@ int recvloop_th(int *socketds, unsigned nsockets, struct cl_engine *engine, unsi
1030 1030
 	logg("HWP3 support disabled.\n");
1031 1031
     }
1032 1032
 
1033
-    if(optget(opts,"PhishingScanURLs")->enabled) {
1034
-
1035
-	if(optget(opts,"PhishingAlwaysBlockCloak")->enabled) {
1036
-	    options.heuristic |= CL_SCAN_HEURISTIC_PHISHING_CLOAK; 
1037
-	    logg("Phishing: Always checking for cloaked urls\n");
1038
-	}
1039
-
1040
-	if(optget(opts,"PhishingAlwaysBlockSSLMismatch")->enabled) {
1041
-	    options.heuristic |= CL_SCAN_HEURISTIC_PHISHING_SSL_MISMATCH;
1042
-	    logg("Phishing: Always checking for ssl mismatches\n");
1043
-	}
1033
+    if (optget(opts, "PhishingScanURLs")->enabled) {
1034
+		/* TODO: Remove deprecated option in a future feature release */
1035
+        if ((optget(opts, "PhishingAlwaysBlockCloak")->enabled) ||
1036
+            (optget(opts, "AlertPhishingCloak")->enabled)) {
1037
+            options.heuristic |= CL_SCAN_HEURISTIC_PHISHING_CLOAK;
1038
+            logg("Phishing: Always checking for cloaked urls\n");
1039
+        }
1040
+		/* TODO: Remove deprecated option in a future feature release */
1041
+        if ((optget(opts, "PhishingAlwaysBlockSSLMismatch")->enabled) ||
1042
+            (optget(opts, "AlertPhishingSSLMismatch")->enabled)) {
1043
+            options.heuristic |= CL_SCAN_HEURISTIC_PHISHING_SSL_MISMATCH;
1044
+            logg("Phishing: Always checking for ssl mismatches\n");
1045
+        }
1044 1046
     }
1045 1047
 
1046
-    if(optget(opts,"PartitionIntersection")->enabled) {
1048
+	/* TODO: Remove deprecated option in a future feature release */
1049
+    if ((optget(opts,"PartitionIntersection")->enabled) ||
1050
+		(optget(opts,"AlertPartitionIntersection")->enabled)) {
1047 1051
         options.heuristic |= CL_SCAN_HEURISTIC_PARTITION_INTXN;
1048
-        logg("Raw DMG: Always checking for partitions intersections\n");
1052
+        logg("Raw DMG: Alert on partitions intersections\n");
1049 1053
     }
1050 1054
 
1051 1055
     if(optget(opts,"HeuristicScanPrecedence")->enabled) {
... ...
@@ -251,13 +251,10 @@ void help(void)
251 251
     mprintf("    --structured-ssn-count=N             Min SSN count to generate a detect\n");
252 252
     mprintf("    --structured-cc-count=N              Min CC count to generate a detect\n");
253 253
     mprintf("    --scan-mail[=yes(*)/no]              Scan mail files\n");
254
-    mprintf("    --phishing-sigs[=yes(*)/no]          Signature-based phishing detection\n");
255
-    mprintf("    --phishing-scan-urls[=yes(*)/no]     URL-based phishing detection\n");
254
+    mprintf("    --phishing-sigs[=yes(*)/no]          Enable email signature-based phishing detection\n");
255
+    mprintf("    --phishing-scan-urls[=yes(*)/no]     Enable URL signature-based phishing detection\n");
256
+    mprintf("    --heuristic-alerts[=yes(*)/no]       Heuristic alerts\n");
256 257
     mprintf("    --heuristic-scan-precedence[=yes/no(*)] Stop scanning as soon as a heuristic match is found\n");
257
-    mprintf("    --phishing-ssl[=yes/no(*)]           Always block (flag) SSL mismatches in URLs (phishing module)\n");
258
-    mprintf("    --phishing-cloak[=yes/no(*)]         Always block (flag) cloaked URLs (phishing module)\n");
259
-    mprintf("    --partition-intersection[=yes/no(*)] Detect partition intersections in raw disk images using heuristics\n");
260
-    mprintf("    --algorithmic-detection[=yes(*)/no]  Algorithmic detection\n");
261 258
     mprintf("    --normalize[=yes(*)/no]              Normalize html, script, and text files. Use normalize=no for yara compatibility\n");
262 259
     mprintf("    --scan-pe[=yes(*)/no]                Scan PE files\n");
263 260
     mprintf("    --scan-elf[=yes(*)/no]               Scan ELF files\n");
... ...
@@ -268,10 +265,15 @@ void help(void)
268 268
     mprintf("    --scan-xmldocs[=yes(*)/no]           Scan xml-based document files\n");
269 269
     mprintf("    --scan-hwp3[=yes(*)/no]              Scan HWP3 files\n");
270 270
     mprintf("    --scan-archive[=yes(*)/no]           Scan archive files (supported by libclamav)\n");
271
-    mprintf("    --detect-broken[=yes/no(*)]          Try to detect broken executable files\n");
272
-    mprintf("    --block-encrypted[=yes/no(*)]        Block (flag) encrypted archives\n");
273
-    mprintf("    --block-macros[=yes/no(*)]           Block (flag) OLE2 files with VBA macros\n");
274
-    mprintf("    --block-max[=yes/no(*)]              Block (flag) files that exceed max file size, max scan size, or max recursion limit\n");
271
+    mprintf("    --alert-broken[=yes/no(*)]           Alert on broken executable files (PE & ELF)\n");
272
+    mprintf("    --alert-encrypted[=yes/no(*)]        Alert on encrypted archives and documents\n");
273
+    mprintf("    --alert-encrypted-archive[=yes/no(*)] Alert on encrypted archives\n");
274
+    mprintf("    --alert-encrypted-doc[=yes/no(*)]    Alert on encrypted documents\n");
275
+    mprintf("    --alert-macros[=yes/no(*)]           Alert on OLE2 files containing VBA macros\n");
276
+    mprintf("    --alert-exceeds-max[=yes/no(*)]      Alert on files that exceed max file size, max scan size, or max recursion limit\n");
277
+    mprintf("    --alert-phishing-ssl[=yes/no(*)]     Alert on emails containing SSL mismatches in URLs\n");
278
+    mprintf("    --alert-phishing-cloak[=yes/no(*)]   Alert on emails containing cloaked URLs\n");
279
+    mprintf("    --alert-partition-intersection[=yes/no(*)] Alert on raw DMG image files containing partition intersections\n");
275 280
     mprintf("    --nocerts                            Disable authenticode certificate chain verification in PE files\n");
276 281
     mprintf("    --dumpcerts                          Dump authenticode certificate chain in PE files\n");
277 282
     mprintf("\n");
... ...
@@ -1017,13 +1017,19 @@ int scanmanager(const struct optstruct *opts)
1017 1017
         options.general |= CL_SCAN_GENERAL_ALLMATCHES;
1018 1018
     }
1019 1019
 
1020
-    if(optget(opts,"phishing-ssl")->enabled)
1020
+    /* TODO: Remove deprecated option in a future feature release */
1021
+    if ((optget(opts,"phishing-ssl")->enabled) ||
1022
+        (optget(opts,"alert-phishing-ssl")->enabled))
1021 1023
         options.heuristic |= CL_SCAN_HEURISTIC_PHISHING_SSL_MISMATCH;
1022 1024
 
1023
-    if(optget(opts,"phishing-cloak")->enabled)
1025
+    /* TODO: Remove deprecated option in a future feature release */
1026
+    if ((optget(opts,"phishing-cloak")->enabled) ||
1027
+        (optget(opts,"alert-phishing-cloak")->enabled))
1024 1028
         options.heuristic |= CL_SCAN_HEURISTIC_PHISHING_CLOAK;
1025 1029
 
1026
-    if(optget(opts,"partition-intersection")->enabled)
1030
+    /* TODO: Remove deprecated option in a future feature release */
1031
+    if ((optget(opts,"partition-intersection")->enabled) ||
1032
+        (optget(opts,"alert-partition-intersection")->enabled))
1027 1033
         options.heuristic |= CL_SCAN_HEURISTIC_PARTITION_INTXN;
1028 1034
 
1029 1035
     if(optget(opts,"heuristic-scan-precedence")->enabled)
... ...
@@ -1032,14 +1038,30 @@ int scanmanager(const struct optstruct *opts)
1032 1032
     if(optget(opts, "scan-archive")->enabled)
1033 1033
         options.parse |= CL_SCAN_PARSE_ARCHIVE;
1034 1034
 
1035
-    if(optget(opts, "detect-broken")->enabled)
1035
+    /* TODO: Remove deprecated option in a future feature release */
1036
+    if ((optget(opts, "detect-broken")->enabled) || 
1037
+        (optget(opts, "alert-broken")->enabled)) {
1036 1038
         options.heuristic |= CL_SCAN_HEURISTIC_BROKEN;
1039
+    }
1040
+
1041
+    /* TODO: Remove deprecated option in a future feature release */
1042
+    if ((optget(opts, "block-encrypted")->enabled) ||
1043
+        (optget(opts, "alert-encrypted")->enabled)) {
1044
+        options.heuristic |= CL_SCAN_HEURISTIC_ENCRYPTED_ARCHIVE;
1045
+        options.heuristic |= CL_SCAN_HEURISTIC_ENCRYPTED_DOC;
1046
+    }
1037 1047
 
1038
-    if(optget(opts, "block-encrypted")->enabled)
1039
-        options.heuristic |= CL_SCAN_HEURISTIC_ENCRYPTED;
1048
+    if (optget(opts, "alert-encrypted-archive")->enabled)
1049
+        options.heuristic |= CL_SCAN_HEURISTIC_ENCRYPTED_ARCHIVE;
1040 1050
 
1041
-    if(optget(opts, "block-macros")->enabled)
1051
+    if (optget(opts, "alert-encrypted-doc")->enabled)
1052
+        options.heuristic |= CL_SCAN_HEURISTIC_ENCRYPTED_DOC;
1053
+
1054
+    /* TODO: Remove deprecated option in a future feature release */
1055
+    if ((optget(opts, "block-macros")->enabled) ||
1056
+        (optget(opts, "alert-macros")->enabled)) {
1042 1057
         options.heuristic |= CL_SCAN_HEURISTIC_MACROS;
1058
+    }
1043 1059
 
1044 1060
     if(optget(opts, "scan-pe")->enabled)
1045 1061
         options.parse |= CL_SCAN_PARSE_PE;
... ...
@@ -1071,7 +1093,9 @@ int scanmanager(const struct optstruct *opts)
1071 1071
     if(optget(opts, "algorithmic-detection")->enabled)
1072 1072
         options.general |= CL_SCAN_GENERAL_HEURISTICS;
1073 1073
 
1074
-    if(optget(opts, "block-max")->enabled) {
1074
+    /* TODO: Remove deprecated option in a future feature release */
1075
+    if ((optget(opts, "block-max")->enabled) || 
1076
+        (optget(opts, "alert-exceeds-max")->enabled)) {
1075 1077
         options.heuristic |= CL_SCAN_HEURISTIC_EXCEEDS_MAX;
1076 1078
     }
1077 1079
 
... ...
@@ -316,16 +316,18 @@ Supported flags for each of the fields are as follows:
316 316
 
317 317
 - **CL_SCAN_GENERAL_HEURISTIC_PRECEDENCE**
318 318
     Allow heuristic match to take precedence. When enabled, if a heuristic scan (such as phishingScan) detects a possible virus/phish it will stop scan immediately. Recommended, saves CPU scan-time. When *disabled*, virus/phish detected by heuristic scans will be reported only at the end of a scan. If an archive contains both a heuristically detected virus/phishing, and a real malware, the real malware will be reported.
319
-- **CL_SCAN_HEURISTIC_ENCRYPTED**
320
-    With this flag the library will mark encrypted archives as viruses (Encrypted.Zip, Encrypted.RAR).
319
+- **CL_SCAN_HEURISTIC_ENCRYPTED_ARCHIVE**
320
+    With this flag the library will mark encrypted archives as viruses (encrypted .zip, .7zip, .rar).
321
+- **CL_SCAN_HEURISTIC_ENCRYPTED_DOC**
322
+    With this flag the library will mark encrypted docuemnts as viruses (encrypted .pdf).
321 323
 - **CL_SCAN_HEURISTIC_BROKEN**
322 324
     libclamav will try to detect broken executables and mark them as Broken.Executable.
323 325
 - **CL_SCAN_HEURISTIC_EXCEEDS_MAX**
324 326
     Alert when the scan of any file exceeds maximums such as max filesize, max scansize, max recursion level.
325 327
 - **CL_SCAN_HEURISTIC_PHISHING_SSL_MISMATCH**
326
-    Heuristic for Phishing module: always block SSL mismatches in URLs.
328
+    Heuristic for phishing module: alert on SSL mismatches in URLs.
327 329
 - **CL_SCAN_HEURISTIC_PHISHING_CLOAK**
328
-    Phishing module: always block cloaked URLs.
330
+    Heuristic for phishing module: alert on cloaked URLs.
329 331
 - **CL_SCAN_HEURISTIC_MACROS**
330 332
     OLE2 containers, which contain VBA macros will be marked infected (Heuristics.OLE2.ContainsMacros).
331 333
 - **CL_SCAN_HEURISTIC_PARTITION_INTXN**
... ...
@@ -338,10 +338,15 @@ Only include a specific PUA category. This directive can be used multiple times.
338 338
 .br
339 339
 Default: disabled
340 340
 .TP 
341
-\fBAlgorithmicDetection BOOL\fR
341
+\fBHeuristicAlerts BOOL\fR
342 342
 In some cases (eg. complex malware, exploits in graphic files, and others), ClamAV uses special algorithms to provide accurate detection. This option controls the algorithmic detection.
343 343
 .br 
344 344
 Default: yes
345
+.TP
346
+\fBHeuristicScanPrecedence BOOL\fR
347
+Allow heuristic match to take precedence. When enabled, if a heuristic scan (such as phishingScan) detects a possible virus/phishing it will stop scanning immediately. Recommended, saves CPU scan-time. When disabled, virus/phishing detected by heuristic scans will be reported only at the end of a scan. If an archive contains both a heuristically detected virus/phishing, and a real malware, the real malware will be reported. Keep this disabled if you intend to handle "*.Heuristics.*" viruses  differently from "real" malware. If a non-heuristically-detected virus (signature-based) is found first, the scan is interrupted immediately, regardless of this config option.
348
+.br
349
+Default: no
345 350
 .TP 
346 351
 \fBScanPE BOOL\fR
347 352
 PE stands for Portable Executable \- it's an executable file format used in all 32 and 64\-bit versions of Windows operating systems. This option allows ClamAV to perform a deeper analysis of executable files and it's also required for decompression of popular executable packers such as UPX.  
... ...
@@ -357,11 +362,6 @@ If you turn off this option, the original files will still be scanned, but witho
357 357
 .br 
358 358
 Default: yes
359 359
 .TP 
360
-\fBDetectBrokenExecutables BOOL\fR
361
-With this option clamd will try to detect broken executables (both PE and ELF) and mark them as Broken.Executable.
362
-.br 
363
-Default: no
364
-.TP 
365 360
 \fBScanMail BOOL\fR
366 361
 Enable scanning of mail files. 
367 362
 .br
... ...
@@ -375,35 +375,15 @@ Scan RFC1341 messages split over many emails. You will need to periodically clea
375 375
 Default: no
376 376
 .TP
377 377
 \fBPhishingSignatures BOOL\fR
378
-With this option enabled ClamAV will try to detect phishing attempts by using signatures.
378
+Enable email signature-based phishing detection.
379 379
 .br 
380 380
 Default: yes
381 381
 .TP
382 382
 \fBPhishingScanURLs BOOL\fR
383
-Scan URLs found in mails for phishing attempts using heuristics. This will classify "Possibly Unwanted" phishing emails as Phishing.Heuristics.Email.*
383
+Enable URL signature-based phishing detection (Phishing.Heuristics.Email.*)
384 384
 .br
385 385
 Default: yes
386 386
 .TP
387
-\fBPhishingAlwaysBlockCloak BOOL\fR
388
-Always block cloaked URLs, even if URL isn't in database. This can lead to false positives.
389
-.br
390
-Default: no
391
-.TP
392
-\fBPhishingAlwaysBlockSSLMismatch BOOL\fR
393
-Always block SSL mismatches in URLs, even if the URL isn't in the database. This can lead to false positives.
394
-.br
395
-Default: no
396
-.TP
397
-\fBPartitionIntersection BOOL\fR
398
-Detect partition intersections in raw disk images using heuristics.
399
-.br
400
-Default: no
401
-.TP
402
-\fBHeuristicScanPrecedence BOOL\fR
403
-Allow heuristic match to take precedence. When enabled, if a heuristic scan (such as phishingScan) detects a possible virus/phishing it will stop scanning immediately. Recommended, saves CPU scan-time. When disabled, virus/phishing detected by heuristic scans will be reported only at the end of a scan. If an archive contains both a heuristically detected virus/phishing, and a real malware, the real malware will be reported. Keep this disabled if you intend to handle "*.Heuristics.*" viruses  differently from "real" malware. If a non-heuristically-detected virus (signature-based) is found first, the scan is interrupted immediately, regardless of this config option.
404
-.br
405
-Default: no
406
-.TP
407 387
 \fBStructuredDataDetection BOOL\fR
408 388
 Enable the DLP module.
409 389
 .br 
... ...
@@ -443,16 +423,6 @@ If you turn off this option, the original files will still be scanned, but witho
443 443
 .br 
444 444
 Default: yes
445 445
 .TP 
446
-\fBOLE2BlockMacros BOOL\fR
447
-With this option enabled OLE2 files with VBA macros, which were not detected by signatures will be marked as "Heuristics.OLE2.ContainsMacros".
448
-.br 
449
-Default: no
450
-.TP
451
-\fBBlockMax BOOL\fR
452
- Flag files with "Heuristics.Limits.Exceeded" when scanning is incomplete due to exceeding a scan or file size limit.
453
-.br 
454
-Default: no
455
-.TP 
456 446
 \fBScanPDF BOOL\fR
457 447
 This option enables scanning within PDF files.
458 448
 .br
... ...
@@ -487,9 +457,49 @@ Scan within archives and compressed files.
487 487
 If you turn off this option, the original files will still be scanned, but without unpacking and additional processing.
488 488
 .br 
489 489
 Default: yes
490
+.TP 
491
+\fBAlertBrokenExecutables BOOL\fR
492
+Alert on broken executable files (PE & ELF).
493
+.br 
494
+Default: no
495
+.TP
496
+\fBAlertEncrypted BOOL\fR
497
+Alert on encrypted archives and documents (encrypted .zip, .7zip, .rar, .pdf).
498
+.br
499
+Default: no
500
+.TP
501
+\fBAlertEncryptedArchive BOOL\fR
502
+Alert on encrypted archives (encrypted .zip, .7zip, .rar).
503
+.br
504
+Default: no
505
+.TP
506
+\fBAlertEncryptedDoc BOOL\fR
507
+Alert on encrypted documents (encrypted .pdf).
508
+.br
509
+Default: no
510
+.TP 
511
+\fBAlertOLE2Macros BOOL\fR
512
+Alert on OLE2 files containing VBA macros (Heuristics.OLE2.ContainsMacros).
513
+.br 
514
+Default: no
515
+.TP
516
+\fBAlertExceedsMax BOOL\fR
517
+Alert on files that exceed max file size, max scan size, or max recursion limit (Heuristics.Limits.Exceeded).
518
+.br 
519
+Default: no
520
+.TP
521
+\fBAlertPhishingSSLMismatch BOOL\fR
522
+Alert on emails containing SSL mismatches in URLs (might lead to false positives!).
523
+.br
524
+Default: no
525
+.TP
526
+\fBAlertPhishingCloak BOOL\fR
527
+Alert on emails containing cloaked URLs (might lead to some false positives).
528
+.br
529
+Default: no
490 530
 .TP
491
-\fBArchiveBlockEncrypted BOOL\fR
492
-Mark encrypted archives as viruses (Encrypted.Zip, Encrypted.RAR).
531
+\fBAlertPartitionIntersection BOOL\fR
532
+Alert on raw DMG image files containing partition intersections.
493 533
 .br
494 534
 Default: no
495 535
 .TP
... ...
@@ -133,26 +133,17 @@ This option sets the lowest number of Credit Card numbers found in a file to gen
133 133
 Scan mail files. If you turn off this option, the original files will still be scanned, but without parsing individual messages/attachments.
134 134
 .TP 
135 135
 \fB\-\-phishing\-sigs[=yes(*)/no]\fR
136
-Use the signature-based phishing detection.
136
+Enable email signature-based phishing detection.
137 137
 .TP 
138 138
 \fB\-\-phishing\-scan\-urls[=yes(*)/no]\fR
139
-Use the url-based heuristic phishing detection (Phishing.Heuristics.Email.*)
139
+Enable URL signature-based phishing detection (Phishing.Heuristics.Email.*)
140
+.TP
141
+\fB\-\-heuristic\-alerts[=yes(*)/no]\fR
142
+In some cases (eg. complex malware, exploits in graphic files, and others), ClamAV uses special algorithms to provide accurate detection. This option can be used to control the algorithmic detection.
140 143
 .TP
141 144
 \fB\-\-heuristic\-scan\-precedence[=yes/no(*)]\fR
142 145
 Allow heuristic match to take precedence. When enabled, if a heuristic scan (such as phishingScan) detects a possible virus/phish it will stop scan immediately. Recommended, saves CPU scan-time. When disabled, virus/phish detected by heuristic scans will be reported only at the end of a scan. If an archive contains both a heuristically detected  virus/phish, and a real malware, the real malware will be reported Keep this disabled if you intend to handle "*.Heuristics.*" viruses  differently from "real" malware. If a non-heuristically-detected virus (signature-based) is found first,  the scan is interrupted immediately, regardless of this config option.
143 146
 .TP
144
-\fB\-\-phishing\-ssl[=yes/no(*)]\fR
145
-Block SSL mismatches in URLs (might lead to false positives!).
146
-.TP
147
-\fB\-\-phishing\-cloak[=yes/no(*)]\fR
148
-Block cloaked URLs (might lead to some false positives).
149
-.TP
150
-\fB\-\-partition\-intersection[=yes/no(*)]\fR
151
-Detect partition intersections in raw disk images using heuristics.
152
-.TP
153
-\fB\-\-algorithmic\-detection[=yes(*)/no]\fR
154
-In some cases (eg. complex malware, exploits in graphic files, and others), ClamAV uses special algorithms to provide accurate detection. This option can be used to control the algorithmic detection.
155
-.TP
156 147
 \fB\-\-normalize[=yes(*)/no]\fR
157 148
 Normalize (compress whitespace, downcase, etc.) html, script, and text files. Use normalize=no for yara compatibility. 
158 149
 .TP 
... ...
@@ -183,17 +174,32 @@ Scan HWP3 files. If you turn off this option, the original files will still be s
183 183
 \fB\-\-scan\-archive[=yes(*)/no]\fR
184 184
 Scan archives supported by libclamav. If you turn off this option, the original files will still be scanned, but without unpacking and additional processing.
185 185
 .TP 
186
-\fB\-\-detect\-broken[=yes/no(*)]\fR
187
-Mark broken executables as viruses (Broken.Executable).
186
+\fB\-\-alert\-broken[=yes/no(*)]\fR
187
+Alert on broken executable files (PE & ELF).
188
+.TP 
189
+\fB\-\-alert\-encrypted[=yes/no(*)]\fR
190
+Alert on encrypted archives and documents (encrypted .zip, .7zip, .rar, .pdf).
191
+.TP 
192
+\fB\-\-alert\-encrypted-archive[=yes/no(*)]\fR
193
+Alert on encrypted archives (encrypted .zip, .7zip, .rar, .pdf).
194
+.TP 
195
+\fB\-\-alert\-encrypted-doc[=yes/no(*)]\fR
196
+Alert on encrypted documents (encrypted .zip, .7zip, .rar, .pdf).
188 197
 .TP 
189
-\fB\-\-block\-encrypted[=yes/no(*)]\fR
190
-Mark encrypted archives as viruses (Encrypted.Zip, Encrypted.RAR).
198
+\fB\-\-alert\-macros[=yes/no(*)]\fR
199
+Alert on OLE2 files containing VBA macros (Heuristics.OLE2.ContainsMacros).
191 200
 .TP 
192
-\fB\-\-block\-macros[=yes/no(*)]\fR
193
-Mark OLE2 files containing VBA macros as viruses (Heuristics.OLE2.ContainsMacros).
201
+\fB\-\-alert\-exceeds\-max[=yes/no(*)]\fR
202
+Alert on files that exceed max file size, max scan size, or max recursion limit (Heuristics.Limits.Exceeded).
194 203
 .TP 
195
-\fB\-\-block\-max[=yes/no(*)]\fR
196
-Flag files with "Heuristics.Limits.Exceeded" when scanning is incomplete due to exceeding a scan or file size limit.
204
+\fB\-\-alert\-phishing\-ssl[=yes/no(*)]\fR
205
+Alert on emails containing SSL mismatches in URLs (might lead to false positives!).
206
+.TP
207
+\fB\-\-alert\-phishing\-cloak[=yes/no(*)]\fR
208
+Alert on emails containing cloaked URLs (might lead to some false positives).
209
+.TP
210
+\fB\-\-alert\-partition\-intersection[=yes/no(*)]\fR
211
+Detect partition intersections in raw disk images using heuristics.
197 212
 .TP 
198 213
 \fB\-\-max\-filesize=#n\fR
199 214
 Extract and scan at most #n bytes from each archive. You may pass the value in kilobytes in format xK or xk, or megabytes in format xM or xm, where x is a number. This option protects your system against DoS attacks (default: 25 MB, max: <4 GB)
... ...
@@ -244,12 +244,6 @@ Example
244 244
 #IncludePUA Scanner
245 245
 #IncludePUA RAT
246 246
 
247
-# In some cases (eg. complex malware, exploits in graphic files, and others),
248
-# ClamAV uses special algorithms to provide accurate detection. This option
249
-# controls the algorithmic detection.
250
-# Default: yes
251
-#AlgorithmicDetection yes
252
-
253 247
 # This option causes memory or nested map scans to dump the content to disk.
254 248
 # If you turn on this option, more data is written to disk and is available
255 249
 # when the LeaveTemporaryFiles option is enabled.
... ...
@@ -262,6 +256,71 @@ Example
262 262
 # Default: no
263 263
 #DisableCache yes
264 264
 
265
+# In some cases (eg. complex malware, exploits in graphic files, and others),
266
+# ClamAV uses special algorithms to detect abnormal patterns and behaviors that
267
+# may be malicious.  This option enables alerting on such heuristically
268
+# detected potential threats.
269
+# Default: yes
270
+#HeuristicAlerts yes
271
+
272
+# Allow heuristic alerts to take precedence.
273
+# When enabled, if a heuristic scan (such as phishingScan) detects
274
+# a possible virus/phish it will stop scan immediately. Recommended, saves CPU
275
+# scan-time.
276
+# When disabled, virus/phish detected by heuristic scans will be reported only at
277
+# the end of a scan. If an archive contains both a heuristically detected
278
+# virus/phish, and a real malware, the real malware will be reported
279
+#
280
+# Keep this disabled if you intend to handle "*.Heuristics.*" viruses 
281
+# differently from "real" malware.
282
+# If a non-heuristically-detected virus (signature-based) is found first, 
283
+# the scan is interrupted immediately, regardless of this config option.
284
+#
285
+# Default: no
286
+#HeuristicScanPrecedence yes
287
+
288
+
289
+##
290
+## Heuristic Alerts
291
+##
292
+
293
+# With this option clamav will try to detect broken executables (both PE and
294
+# ELF) and alert on them with the Broken.Executable heuristic signature.
295
+# Default: no
296
+#AlertBrokenExecutables yes
297
+
298
+# Alert on encrypted archives _and_ documents with heuristic signature (encrypted .zip, .7zip, .rar, .pdf).
299
+# Default: no
300
+#AlertEncrypted yes
301
+
302
+# Alert on encrypted archives with heuristic signature (encrypted .zip, .7zip, .rar).
303
+# Default: no
304
+#AlertEncryptedArchive yes
305
+
306
+# Alert on encrypted archives with heuristic signature (encrypted .pdf).
307
+# Default: no
308
+#AlertEncryptedDoc yes
309
+
310
+# With this option enabled OLE2 files containing VBA macros, which were not
311
+# detected by signatures will be marked as "Heuristics.OLE2.ContainsMacros".
312
+# Default: no
313
+#AlertOLE2Macros yes
314
+
315
+# Alert on SSL mismatches in URLs, even if the URL isn't in the database.
316
+# This can lead to false positives.
317
+# Default: no
318
+#AlertPhishingSSLMismatch yes
319
+
320
+# Alert on cloaked URLs, even if URL isn't in database.
321
+# This can lead to false positives.
322
+# Default: no
323
+#AlertPhishingCloak yes
324
+
325
+# Alert on raw DMG image files containing partition intersections
326
+# Default: no
327
+#AlertPartitionIntersection yes
328
+
329
+
265 330
 ##
266 331
 ## Executable files
267 332
 ##
... ...
@@ -292,11 +351,6 @@ Example
292 292
 # Default: yes
293 293
 #ScanELF yes
294 294
 
295
-# With this option clamav will try to detect broken executables (both PE and
296
-# ELF) and mark them as Broken.Executable.
297
-# Default: no
298
-#DetectBrokenExecutables yes
299
-
300 295
 
301 296
 ##
302 297
 ## Documents
... ...
@@ -309,11 +363,6 @@ Example
309 309
 # Default: yes
310 310
 #ScanOLE2 yes
311 311
 
312
-# With this option enabled OLE2 files with VBA macros, which were not
313
-# detected by signatures will be marked as "Heuristics.OLE2.ContainsMacros".
314
-# Default: no
315
-#OLE2BlockMacros no
316
-
317 312
 # This option enables scanning within PDF files.
318 313
 # If you turn off this option, the original files will still be scanned, but
319 314
 # without decoding and additional processing.
... ...
@@ -358,45 +407,14 @@ Example
358 358
 #ScanPartialMessages yes
359 359
 
360 360
 # With this option enabled ClamAV will try to detect phishing attempts by using
361
-# signatures.
361
+# HTML.Phishing and Email.Phishing NDB signatures.
362 362
 # Default: yes
363
-#PhishingSignatures yes
363
+#PhishingSignatures no
364 364
 
365
-# Scan URLs found in mails for phishing attempts using heuristics.
365
+# With this option enabled ClamAV will try to detect phishing attempts by
366
+# analyzing URLs found in emails using WDB and PDB signature databases.
366 367
 # Default: yes
367
-#PhishingScanURLs yes
368
-
369
-# Always block SSL mismatches in URLs, even if the URL isn't in the database.
370
-# This can lead to false positives.
371
-#
372
-# Default: no
373
-#PhishingAlwaysBlockSSLMismatch no
374
-
375
-# Always block cloaked URLs, even if URL isn't in database.
376
-# This can lead to false positives.
377
-#
378
-# Default: no
379
-#PhishingAlwaysBlockCloak no
380
-
381
-# Detect partition intersections in raw disk images using heuristics.
382
-# Default: no
383
-#PartitionIntersection no
384
-
385
-# Allow heuristic match to take precedence.
386
-# When enabled, if a heuristic scan (such as phishingScan) detects
387
-# a possible virus/phish it will stop scan immediately. Recommended, saves CPU
388
-# scan-time.
389
-# When disabled, virus/phish detected by heuristic scans will be reported
390
-# only at the end of a scan. If an archive contains both a heuristically
391
-# detected virus/phish, and a real malware, the real malware will be reported.
392
-#
393
-# Keep this disabled if you intend to handle "*.Heuristics.*" viruses 
394
-# differently from "real" malware.
395
-# If a non-heuristically-detected virus (signature-based) is found first, 
396
-# the scan is interrupted immediately, regardless of this config option.
397
-#
398
-# Default: no
399
-#HeuristicScanPrecedence yes
368
+#PhishingScanURLs no
400 369
 
401 370
 
402 371
 ##
... ...
@@ -449,10 +467,6 @@ Example
449 449
 # Default: yes
450 450
 #ScanArchive yes
451 451
 
452
-# Mark encrypted archives as viruses (Encrypted.Zip, Encrypted.RAR).
453
-# Default: no
454
-#ArchiveBlockEncrypted no
455
-
456 452
 
457 453
 ##
458 454
 ## Limits
... ...
@@ -589,11 +603,12 @@ Example
589 589
 # Default: 25M
590 590
 #PCREMaxFileSize 100M
591 591
 
592
-# When BlockMax is set, files exceeding the MaxFileSize, MaxScanSize, or
592
+# When AlertExceedsMax is set, files exceeding the MaxFileSize, MaxScanSize, or
593 593
 # MaxRecursion limit will be flagged with the virus
594 594
 # "Heuristics.Limits.Exceeded".
595 595
 # Default: no
596
-#BlockMax yes
596
+#AlertExceedsMax yes
597
+
597 598
 
598 599
 ##
599 600
 ## On-access Scan Settings
... ...
@@ -106,7 +106,7 @@ int cli_7unz (cli_ctx *ctx, size_t offset) {
106 106
 
107 107
     SzArEx_Init(&db);
108 108
     res = SzArEx_Open(&db, &lookStream.s, &allocImp, &allocTempImp);
109
-    if(res == SZ_ERROR_ENCRYPTED && SCAN_HEURISTIC_ENCRYPTED) {
109
+    if(res == SZ_ERROR_ENCRYPTED && SCAN_HEURISTIC_ENCRYPTED_ARCHIVE) {
110 110
 	cli_dbgmsg("cli_7unz: Encrypted header found in archive.\n");
111 111
 	found = cli_append_virus(ctx, "Heuristics.Encrypted.7Zip");
112 112
     } else if(res == SZ_OK) {
... ...
@@ -158,7 +158,7 @@ int cli_7unz (cli_ctx *ctx, size_t offset) {
158 158
 	    res = SzArEx_Extract(&db, &lookStream.s, i, &blockIndex, &outBuffer, &outBufferSize, &offset, &outSizeProcessed, &allocImp, &allocTempImp);
159 159
 	    if(res == SZ_ERROR_ENCRYPTED) {
160 160
 		encrypted = 1;
161
-		if(SCAN_HEURISTIC_ENCRYPTED) {
161
+		if(SCAN_HEURISTIC_ENCRYPTED_ARCHIVE) {
162 162
 		    cli_dbgmsg("cli_7unz: Encrypted files found in archive.\n");
163 163
 		    found = cli_append_virus(ctx, "Heuristics.Encrypted.7Zip");
164 164
                     if (found != CL_CLEAN) {
... ...
@@ -1319,7 +1319,8 @@ uint32_t cli_bcapi_engine_scan_options(struct cli_bc_ctx *ctx)
1319 1319
         options |= CL_SCAN_PHISHING_BLOCKCLOAK;
1320 1320
     if (cctx->options->heuristic & CL_SCAN_HEURISTIC_MACROS)
1321 1321
         options |= CL_SCAN_BLOCKMACROS;
1322
-    if (cctx->options->heuristic & CL_SCAN_HEURISTIC_ENCRYPTED)
1322
+    if ((cctx->options->heuristic & CL_SCAN_HEURISTIC_ENCRYPTED_ARCHIVE) || 
1323
+        (cctx->options->heuristic & CL_SCAN_HEURISTIC_ENCRYPTED_DOC))
1323 1324
         options |= CL_SCAN_BLOCKENCRYPTED;
1324 1325
     if (cctx->options->heuristic & CL_SCAN_HEURISTIC_PARTITION_INTXN)
1325 1326
         options |= CL_SCAN_PARTITION_INTXN;
... ...
@@ -1429,8 +1430,11 @@ uint32_t cli_bcapi_engine_scan_options_ex(struct cli_bc_ctx *ctx, const uint8_t
1429 1429
         if (cli_memstr(option_name_l, name_len, "macros", sizeof("macros"))) {
1430 1430
             return (cctx->options->heuristic & CL_SCAN_HEURISTIC_MACROS) ? 1 : 0;
1431 1431
         }
1432
-        if (cli_memstr(option_name_l, name_len, "encrypted", sizeof("encrypted"))) {
1433
-            return (cctx->options->heuristic & CL_SCAN_HEURISTIC_ENCRYPTED) ? 1 : 0;
1432
+        if (cli_memstr(option_name_l, name_len, "encrypted archive", sizeof("encrypted archive"))) {
1433
+            return (cctx->options->heuristic & CL_SCAN_HEURISTIC_ENCRYPTED_ARCHIVE) ? 1 : 0;
1434
+        }
1435
+        if (cli_memstr(option_name_l, name_len, "encrypted doc", sizeof("encrypted doc"))) {
1436
+            return (cctx->options->heuristic & CL_SCAN_HEURISTIC_ENCRYPTED_DOC) ? 1 : 0;
1434 1437
         }
1435 1438
         if (cli_memstr(option_name_l, name_len, "partition intxn", sizeof("partition intxn"))) {
1436 1439
             return (cctx->options->heuristic & CL_SCAN_HEURISTIC_PARTITION_INTXN) ? 1 : 0;
... ...
@@ -175,16 +175,17 @@ struct cl_scan_options {
175 175
 #define CL_SCAN_PARSE_PE                            0x200
176 176
 
177 177
 /* heuristic alerting options */
178
-#define CL_SCAN_HEURISTIC_BROKEN                    0x2
179
-#define CL_SCAN_HEURISTIC_EXCEEDS_MAX               0x4
180
-#define CL_SCAN_HEURISTIC_PHISHING_SSL_MISMATCH     0x8
181
-#define CL_SCAN_HEURISTIC_PHISHING_CLOAK            0x10
182
-#define CL_SCAN_HEURISTIC_MACROS                    0x20
183
-#define CL_SCAN_HEURISTIC_ENCRYPTED                 0x40
184
-#define CL_SCAN_HEURISTIC_PARTITION_INTXN           0x80 /* alert if partition table size doesn't make sense */
185
-#define CL_SCAN_HEURISTIC_STRUCTURED                0x100 /* data loss prevention options, i.e. alert when detecting personal information */
186
-#define CL_SCAN_HEURISTIC_STRUCTURED_SSN_NORMAL     0x200 /* alert when detecting social security numbers */
187
-#define CL_SCAN_HEURISTIC_STRUCTURED_SSN_STRIPPED   0x400 /* alert when detecting stripped social security numbers */
178
+#define CL_SCAN_HEURISTIC_BROKEN                    0x2   /* alert on broken PE and broken ELF files */
179
+#define CL_SCAN_HEURISTIC_EXCEEDS_MAX               0x4   /* alert when files exceed scan limits (filesize, max scansize, or max recursion depth) */
180
+#define CL_SCAN_HEURISTIC_PHISHING_SSL_MISMATCH     0x8   /* alert on SSL mismatches */
181
+#define CL_SCAN_HEURISTIC_PHISHING_CLOAK            0x10  /* alert on cloaked URLs in emails */
182
+#define CL_SCAN_HEURISTIC_MACROS                    0x20  /* alert on OLE2 files containing macros */
183
+#define CL_SCAN_HEURISTIC_ENCRYPTED_ARCHIVE         0x40  /* alert if archive is encrypted (rar, zip, etc) */
184
+#define CL_SCAN_HEURISTIC_ENCRYPTED_DOC             0x80  /* alert if a document is encrypted (pdf, docx, etc) */
185
+#define CL_SCAN_HEURISTIC_PARTITION_INTXN           0x100 /* alert if partition table size doesn't make sense */
186
+#define CL_SCAN_HEURISTIC_STRUCTURED                0x200 /* data loss prevention options, i.e. alert when detecting personal information */
187
+#define CL_SCAN_HEURISTIC_STRUCTURED_SSN_NORMAL     0x400 /* alert when detecting social security numbers */
188
+#define CL_SCAN_HEURISTIC_STRUCTURED_SSN_STRIPPED   0x800 /* alert when detecting stripped social security numbers */
188 189
 
189 190
 /* mail scanning options */
190 191
 #define CL_SCAN_MAIL_PARTIAL_MESSAGE                0x1
... ...
@@ -511,7 +511,8 @@ extern int have_rar;
511 511
 #define SCAN_HEURISTIC_PHISHING_SSL_MISMATCH    (ctx->options->heuristic & CL_SCAN_HEURISTIC_PHISHING_SSL_MISMATCH)
512 512
 #define SCAN_HEURISTIC_PHISHING_CLOAK           (ctx->options->heuristic & CL_SCAN_HEURISTIC_PHISHING_CLOAK)
513 513
 #define SCAN_HEURISTIC_MACROS                   (ctx->options->heuristic & CL_SCAN_HEURISTIC_MACROS)
514
-#define SCAN_HEURISTIC_ENCRYPTED                (ctx->options->heuristic & CL_SCAN_HEURISTIC_ENCRYPTED)
514
+#define SCAN_HEURISTIC_ENCRYPTED_ARCHIVE        (ctx->options->heuristic & CL_SCAN_HEURISTIC_ENCRYPTED_ARCHIVE)
515
+#define SCAN_HEURISTIC_ENCRYPTED_DOC            (ctx->options->heuristic & CL_SCAN_HEURISTIC_ENCRYPTED_DOC)
515 516
 #define SCAN_HEURISTIC_PARTITION_INTXN          (ctx->options->heuristic & CL_SCAN_HEURISTIC_PARTITION_INTXN)
516 517
 #define SCAN_HEURISTIC_STRUCTURED               (ctx->options->heuristic & CL_SCAN_HEURISTIC_STRUCTURED)
517 518
 #define SCAN_HEURISTIC_STRUCTURED_SSN_NORMAL    (ctx->options->heuristic & CL_SCAN_HEURISTIC_STRUCTURED_SSN_NORMAL)
... ...
@@ -3099,7 +3099,7 @@ cl_error_t pdf_find_and_extract_objs(struct pdf_struct *pdf, uint32_t *alerts)
3099 3099
                (pdf->flags & (1 << DECRYPTABLE_PDF)) ?
3100 3100
                "decryptable" : "not decryptable, stream will probably fail to decompress");
3101 3101
 
3102
-    if (SCAN_HEURISTIC_ENCRYPTED &&
3102
+    if (SCAN_HEURISTIC_ENCRYPTED_DOC &&
3103 3103
        (pdf->flags & (1 << ENCRYPTED_PDF)) &&
3104 3104
        !(pdf->flags & (1 << DECRYPTABLE_PDF)))
3105 3105
     {
... ...
@@ -243,7 +243,7 @@ static int cli_unrar_scanmetadata(int desc, unrar_metadata_t *metadata, cli_ctx
243 243
         virus_found = 1;
244 244
     }
245 245
 
246
-    if (SCAN_HEURISTIC_ENCRYPTED && metadata->encrypted)
246
+    if (SCAN_HEURISTIC_ENCRYPTED_ARCHIVE && metadata->encrypted)
247 247
     {
248 248
         cli_dbgmsg("RAR: Encrypted files found in archive.\n");
249 249
         ret = cli_scandesc(desc, ctx, 0, 0, NULL, AC_SCAN_VIR, NULL);
... ...
@@ -292,7 +292,7 @@ static int cli_scanrar(int desc, cli_ctx *ctx, off_t sfx_offset, uint32_t *sfx_c
292 292
         if (ret == UNRAR_PASSWD)
293 293
         {
294 294
             cli_dbgmsg("RAR: Encrypted main header\n");
295
-            if (SCAN_HEURISTIC_ENCRYPTED)
295
+            if (SCAN_HEURISTIC_ENCRYPTED_ARCHIVE)
296 296
             {
297 297
                 if (lseek(desc, 0, SEEK_SET) == -1)
298 298
                 {
... ...
@@ -554,7 +554,7 @@ static unsigned int lhdr(fmap_t *map, uint32_t loff,uint32_t zsize, unsigned int
554 554
     return 0;
555 555
   }
556 556
 
557
-  if(detect_encrypted && (LH_flags & F_ENCR) && SCAN_HEURISTIC_ENCRYPTED) {
557
+  if(detect_encrypted && (LH_flags & F_ENCR) && SCAN_HEURISTIC_ENCRYPTED_ARCHIVE) {
558 558
     cli_dbgmsg("cli_unzip: Encrypted files found in archive.\n");
559 559
     *ret = cli_append_virus(ctx, "Heuristics.Encrypted.Zip");
560 560
     if ((*ret == CL_VIRUS && !SCAN_ALLMATCHES) || *ret != CL_CLEAN) {
... ...
@@ -186,7 +186,7 @@ const struct clam_option __clam_options[] = {
186 186
     { NULL, "deb", 0, CLOPT_TYPE_STRING, NULL, -1, "foo", 0, OPT_CLAMSCAN | OPT_DEPRECATED, "", "" },
187 187
 
188 188
     /* config file/cmdline options */
189
-    { "BlockMax", "block-max", 0, CLOPT_TYPE_BOOL, MATCH_BOOL, 0, NULL, 0, OPT_CLAMD | OPT_CLAMSCAN, "", "" },
189
+    { "AlertExceedsMax", "alert-exceeds-max", 0, CLOPT_TYPE_BOOL, MATCH_BOOL, 0, NULL, 0, OPT_CLAMD | OPT_CLAMSCAN, "", "" },
190 190
 
191 191
     { "PreludeEnable", "prelude-enable", 0, CLOPT_TYPE_BOOL, MATCH_BOOL, 0, NULL, 0, OPT_CLAMD, "Enable prelude"},
192 192
 
... ...
@@ -308,14 +308,10 @@ const struct clam_option __clam_options[] = {
308 308
 
309 309
     { "IncludePUA", "include-pua", 0, CLOPT_TYPE_STRING, NULL, -1, NULL, FLAG_MULTIPLE, OPT_CLAMD | OPT_CLAMSCAN, "Only include a specific PUA category. This directive can be used multiple\ntimes.", "Spy\nScanner\nRAT" },
310 310
 
311
-    { "AlgorithmicDetection", "algorithmic-detection", 0, CLOPT_TYPE_BOOL, MATCH_BOOL, 1, NULL, 0, OPT_CLAMD | OPT_CLAMSCAN, "In some cases (eg. complex malware, exploits in graphic files, and others),\nClamAV uses special algorithms to provide accurate detection. This option\ncontrols the algorithmic detection.", "yes" },
312
-
313 311
     { "ScanPE", "scan-pe", 0, CLOPT_TYPE_BOOL, MATCH_BOOL, 1, NULL, 0, OPT_CLAMD | OPT_CLAMSCAN, "PE stands for Portable Executable - it's an executable file format used\nin all 32- and 64-bit versions of Windows operating systems. This option\nallows ClamAV to perform a deeper analysis of executable files and it's also\nrequired for decompression of popular executable packers such as UPX or FSG.\nIf you turn off this option, the original files will still be scanned, but\nwithout additional processing.", "yes" },
314 312
 
315 313
     { "ScanELF", "scan-elf", 0, CLOPT_TYPE_BOOL, MATCH_BOOL, 1, NULL, 0, OPT_CLAMD | OPT_CLAMSCAN, "Executable and Linking Format is a standard format for UN*X executables.\nThis option allows you to control the scanning of ELF files.\nIf you turn off this option, the original files will still be scanned, but\nwithout additional processing.", "yes" },
316 314
 
317
-    { "DetectBrokenExecutables", "detect-broken", 0, CLOPT_TYPE_BOOL, MATCH_BOOL, 0, NULL, 0, OPT_CLAMD | OPT_CLAMSCAN, "With this option enabled clamav will try to detect broken executables\n(both PE and ELF) and mark them as Broken.Executable.", "yes" },
318
-
319 315
     { "ScanMail", "scan-mail", 0, CLOPT_TYPE_BOOL, MATCH_BOOL, 1, NULL, 0, OPT_CLAMD | OPT_CLAMSCAN, "Enable the built in email scanner.\nIf you turn off this option, the original files will still be scanned, but\nwithout parsing individual messages/attachments.", "yes" },
320 316
 
321 317
     { "ScanPartialMessages", NULL, 0, CLOPT_TYPE_BOOL, MATCH_BOOL, 0, NULL, 0, OPT_CLAMD, "Scan RFC1341 messages split over many emails. You will need to\nperiodically clean up $TemporaryDirectory/clamav-partial directory.\nWARNING: This option may open your system to a DoS attack. Please don't use\nthis feature on highly loaded servers.", "no" },
... ...
@@ -324,11 +320,7 @@ const struct clam_option __clam_options[] = {
324 324
 
325 325
     { "PhishingScanURLs", "phishing-scan-urls", 0, CLOPT_TYPE_BOOL, MATCH_BOOL, 1, NULL, 0, OPT_CLAMD | OPT_CLAMSCAN, "Scan URLs found in mails for phishing attempts using heuristics.", "yes" },
326 326
 
327
-    { "PhishingAlwaysBlockCloak", "phishing-cloak", 0, CLOPT_TYPE_BOOL, MATCH_BOOL, 0, NULL, 0, OPT_CLAMD | OPT_CLAMSCAN, "Always block cloaked URLs, even if they're not in the database.\nThis feature can lead to false positives.", "no" },
328
-
329
-    { "PhishingAlwaysBlockSSLMismatch", "phishing-ssl", 0, CLOPT_TYPE_BOOL, MATCH_BOOL, 0, NULL, 0, OPT_CLAMD | OPT_CLAMSCAN, "Always block SSL mismatches in URLs, even if they're not in the database.\nThis feature can lead to false positives.", "" },
330
-
331
-    { "PartitionIntersection", "partition-intersection", 0, CLOPT_TYPE_BOOL, MATCH_BOOL, 0, NULL, 0, OPT_CLAMD | OPT_CLAMSCAN, "Detect partition intersections in raw disk images using heuristics.", "yes" },
327
+    { "HeuristicAlerts", "heuristic-alerts", 0, CLOPT_TYPE_BOOL, MATCH_BOOL, 1, NULL, 0, OPT_CLAMD | OPT_CLAMSCAN, "In some cases (eg. complex malware, exploits in graphic files, and others),\nClamAV uses special algorithms to provide accurate detection. This option\ncontrols the algorithmic detection.", "yes" },
332 328
 
333 329
     { "HeuristicScanPrecedence", "heuristic-scan-precedence", 0, CLOPT_TYPE_BOOL, MATCH_BOOL, 0, NULL, 0, OPT_CLAMD | OPT_CLAMSCAN, "Allow heuristic match to take precedence.\nWhen enabled, if a heuristic scan (such as phishingScan) detects\na possible virus/phish it will stop scan immediately. Recommended, saves CPU\nscan-time.\nWhen disabled, virus/phish detected by heuristic scans will be reported only\nat the end of a scan. If an archive contains both a heuristically detected\nvirus/phish, and a real malware, the real malware will be reported.\nKeep this disabled if you intend to handle \"*.Heuristics.*\" viruses\ndifferently from \"real\" malware.\nIf a non-heuristically-detected virus (signature-based) is found first,\nthe scan is interrupted immediately, regardless of this config option.", "yes" },
334 330
 
... ...
@@ -346,7 +338,21 @@ const struct clam_option __clam_options[] = {
346 346
 
347 347
     { "ScanOLE2", "scan-ole2", 0, CLOPT_TYPE_BOOL, MATCH_BOOL, 1, NULL, 0, OPT_CLAMD | OPT_CLAMSCAN, "This option enables scanning of OLE2 files, such as Microsoft Office\ndocuments and .msi files.\nIf you turn off this option, the original files will still be scanned, but\nwithout additional processing.", "yes" },
348 348
 
349
-    { "OLE2BlockMacros", "block-macros", 0, CLOPT_TYPE_BOOL, MATCH_BOOL, 0, NULL, 0, OPT_CLAMD | OPT_CLAMSCAN, "With this option enabled OLE2 files with VBA macros, which were not\ndetected by signatures will be marked as \"Heuristics.OLE2.ContainsMacros\".", "no" },
349
+    { "AlertBrokenExecutables", "alert-broken", 0, CLOPT_TYPE_BOOL, MATCH_BOOL, 0, NULL, 0, OPT_CLAMD | OPT_CLAMSCAN, "With this option enabled clamav will try to detect broken executables\n(both PE and ELF) and alert on them with the Broken.Executable heuristic signature.", "yes" },
350
+
351
+    { "AlertEncrypted", "alert-encrypted", 0, CLOPT_TYPE_BOOL, MATCH_BOOL, 0, NULL, 0, OPT_CLAMD | OPT_CLAMSCAN, "Alert on encrypted archives and documents (encrypted .zip, .7zip, .rar, .pdf).", "no" },
352
+
353
+    { "AlertEncryptedArchive", "alert-encrypted-archive", 0, CLOPT_TYPE_BOOL, MATCH_BOOL, 0, NULL, 0, OPT_CLAMD | OPT_CLAMSCAN, "Alert on encrypted archives (encrypted .zip, .7zip, .rar).", "no" },
354
+
355
+    { "AlertEncryptedDoc", "alert-encrypted-doc", 0, CLOPT_TYPE_BOOL, MATCH_BOOL, 0, NULL, 0, OPT_CLAMD | OPT_CLAMSCAN, "Alert on encrypted documents (encrypted .pdf).", "no" },
356
+
357
+    { "AlertOLE2Macros", "alert-macros", 0, CLOPT_TYPE_BOOL, MATCH_BOOL, 0, NULL, 0, OPT_CLAMD | OPT_CLAMSCAN, "With this option enabled OLE2 files with VBA macros, which were not\ndetected by signatures will be marked as \"Heuristics.OLE2.ContainsMacros\".", "no" },
358
+
359
+    { "AlertPhishingSSLMismatch", "alert-phishing-ssl", 0, CLOPT_TYPE_BOOL, MATCH_BOOL, 0, NULL, 0, OPT_CLAMD | OPT_CLAMSCAN, "Alert on SSL mismatches in URLs, even if they're not in the database.\nThis feature can lead to false positives.", "" },
360
+
361
+    { "AlertPhishingCloak", "alert-phishing-cloak", 0, CLOPT_TYPE_BOOL, MATCH_BOOL, 0, NULL, 0, OPT_CLAMD | OPT_CLAMSCAN, "Alert on cloaked URLs, even if they're not in the database.\nThis feature can lead to false positives.", "no" },
362
+
363
+    { "AlertPartitionIntersection", "alert-partition-intersection", 0, CLOPT_TYPE_BOOL, MATCH_BOOL, 0, NULL, 0, OPT_CLAMD | OPT_CLAMSCAN, "Alert on raw DMG image files containing partition intersections.", "yes" },
350 364
 
351 365
     { "ScanPDF", "scan-pdf", 0, CLOPT_TYPE_BOOL, MATCH_BOOL, 1, NULL, 0, OPT_CLAMD | OPT_CLAMSCAN, "This option enables scanning within PDF files.\nIf you turn off this option, the original files will still be scanned, but\nwithout decoding and additional processing.", "yes" },
352 366
 
... ...
@@ -358,8 +364,6 @@ const struct clam_option __clam_options[] = {
358 358
 
359 359
     { "ScanArchive", "scan-archive", 0, CLOPT_TYPE_BOOL, MATCH_BOOL, 1, NULL, 0, OPT_CLAMD | OPT_CLAMSCAN, "Scan within archives and compressed files.\nIf you turn off this option, the original files will still be scanned, but\nwithout unpacking and additional processing.", "yes" },
360 360
 
361
-    { "ArchiveBlockEncrypted", "block-encrypted", 0, CLOPT_TYPE_BOOL, MATCH_BOOL, 0, NULL, 0, OPT_CLAMD | OPT_CLAMSCAN, "Mark encrypted archives as viruses (Encrypted.Zip, Encrypted.RAR).", "no" },
362
-
363 361
     { "ForceToDisk", "force-to-disk", 0, CLOPT_TYPE_BOOL, MATCH_BOOL, 0, NULL, 0, OPT_CLAMD | OPT_CLAMSCAN, "This option causes memory or nested map scans to dump the content to disk.\nIf you turn on this option, more data is written to disk and is available\nwhen the leave-temps option is enabled at the cost of more disk writes.", "no" },
364 362
 
365 363
     { "MaxScanSize", "max-scansize", 0, CLOPT_TYPE_SIZE, MATCH_SIZE, CLI_DEFAULT_MAXSCANSIZE, NULL, 0, OPT_CLAMD | OPT_CLAMSCAN, "This option sets the maximum amount of data to be scanned for each input file.\nArchives and other containers are recursively extracted and scanned up to this\nvalue.\nThe value of 0 disables the limit.\nWARNING: disabling this limit or setting it too high may result in severe\ndamage.", "100M" },
... ...
@@ -487,6 +491,14 @@ const struct clam_option __clam_options[] = {
487 487
 
488 488
     /* Deprecated options */
489 489
 
490
+    { "DetectBrokenExecutables", "detect-broken", 0, CLOPT_TYPE_BOOL, MATCH_BOOL, 0, NULL, 0, OPT_CLAMD | OPT_CLAMSCAN | OPT_DEPRECATED, "Deprecated option to alert on broken PE and ELF executable files.", "no" },
491
+    { "AlgorithmicDetection", "algorithmic-detection", 0, CLOPT_TYPE_BOOL, MATCH_BOOL, 1, NULL, 0, OPT_CLAMD | OPT_CLAMSCAN | OPT_DEPRECATED, "Deprecated option to enable heuristic alerts (e.g. \"Heuristics.<sig name>\")", "no" },
492
+    { "BlockMax", "block-max", 0, CLOPT_TYPE_BOOL, MATCH_BOOL, 0, NULL, 0, OPT_CLAMD | OPT_CLAMSCAN | OPT_DEPRECATED, "", "" },
493
+    { "PhishingAlwaysBlockSSLMismatch", "phishing-ssl", 0, CLOPT_TYPE_BOOL, MATCH_BOOL, 0, NULL, 0, OPT_CLAMD | OPT_CLAMSCAN | OPT_DEPRECATED, "Deprecated option to alert on SSL mismatches in URLs, even if they're not in the database.\nThis feature can lead to false positives.", "no" },
494
+    { "PhishingAlwaysBlockCloak", "phishing-cloak", 0, CLOPT_TYPE_BOOL, MATCH_BOOL, 0, NULL, 0, OPT_CLAMD | OPT_CLAMSCAN | OPT_DEPRECATED, "Deprecated option to alert on cloaked URLs, even if they're not in the database.\nThis feature can lead to false positives.", "no" },
495
+    { "PartitionIntersection", "partition-intersection", 0, CLOPT_TYPE_BOOL, MATCH_BOOL, 0, NULL, 0, OPT_CLAMD | OPT_CLAMSCAN | OPT_DEPRECATED, "Deprecated option to alert on raw DMG image files containing partition intersections.", "no" },
496
+    { "OLE2BlockMacros", "block-macros", 0, CLOPT_TYPE_BOOL, MATCH_BOOL, 0, NULL, 0, OPT_CLAMD | OPT_CLAMSCAN | OPT_DEPRECATED, "With this option enabled OLE2 files with VBA macros, which were not\ndetected by signatures will be marked as \"Heuristics.OLE2.ContainsMacros\".", "no" },
497
+    { "ArchiveBlockEncrypted", "block-encrypted", 0, CLOPT_TYPE_BOOL, MATCH_BOOL, 0, NULL, 0, OPT_CLAMD | OPT_CLAMSCAN | OPT_DEPRECATED, "Deprecated option to alert on encrypted archives and documents (encrypted .zip, .7zip, .rar, .pdf).", "no" },
490 498
     { "MailMaxRecursion", NULL, 0, CLOPT_TYPE_NUMBER, NULL, -1, NULL, 0, OPT_CLAMD | OPT_DEPRECATED, "", "" },
491 499
     { "ArchiveMaxScanSize", NULL, 0, CLOPT_TYPE_SIZE, NULL, -1, NULL, 0, OPT_CLAMD | OPT_DEPRECATED, "", "" },
492 500
     { "ArchiveMaxRecursion", NULL, 0, CLOPT_TYPE_NUMBER, NULL, -1, NULL, 0, OPT_CLAMD | OPT_DEPRECATED, "", "" },
... ...
@@ -171,7 +171,7 @@ EOF
171 171
 	die "Failed to run clamscan (phish-test)";
172 172
     fi
173 173
 
174
-    if test_run 1 $CLAMSCAN --quiet --phishing-ssl --phishing-cloak -dtest-db $abs_srcdir/input/phish-test-* --log=clamscan3.log; then
174
+    if test_run 1 $CLAMSCAN --quiet --alert-phishing-ssl --alert-phishing-cloak -dtest-db $abs_srcdir/input/phish-test-* --log=clamscan3.log; then
175 175
 	cat clamscan3.log;
176 176
 	die "Failed to run clamscan (phish-test2)";
177 177
     fi
... ...
@@ -216,12 +216,6 @@ TCPAddr 127.0.0.1
216 216
 #IncludePUA Scanner
217 217
 #IncludePUA RAT
218 218
 
219
-# In some cases (eg. complex malware, exploits in graphic files, and others),
220
-# ClamAV uses special algorithms to provide accurate detection. This option
221
-# controls the algorithmic detection.
222
-# Default: yes
223
-#AlgorithmicDetection yes
224
-
225 219
 # This option causes memory or nested map scans to dump the content to disk.
226 220
 # If you turn on this option, more data is written to disk and is available
227 221
 # when the LeaveTemporaryFiles option is enabled.
... ...
@@ -234,6 +228,71 @@ TCPAddr 127.0.0.1
234 234
 # Default: no
235 235
 #DisableCache yes
236 236
 
237
+# In some cases (eg. complex malware, exploits in graphic files, and others),
238
+# ClamAV uses special algorithms to detect abnormal patterns and behaviors that
239
+# may be malicious.  This option enables alerting on such heuristically
240
+# detected potential threats.
241
+# Default: yes
242
+#HeuristicAlerts yes
243
+
244
+# Allow heuristic alerts to take precedence.
245
+# When enabled, if a heuristic scan (such as phishingScan) detects
246
+# a possible virus/phish it will stop scan immediately. Recommended, saves CPU
247
+# scan-time.
248
+# When disabled, virus/phish detected by heuristic scans will be reported only at
249
+# the end of a scan. If an archive contains both a heuristically detected
250
+# virus/phish, and a real malware, the real malware will be reported
251
+#
252
+# Keep this disabled if you intend to handle "*.Heuristics.*" viruses 
253
+# differently from "real" malware.
254
+# If a non-heuristically-detected virus (signature-based) is found first, 
255
+# the scan is interrupted immediately, regardless of this config option.
256
+#
257
+# Default: no
258
+#HeuristicScanPrecedence yes
259
+
260
+
261
+##
262
+## Heuristic Alerts
263
+##
264
+
265
+# With this option clamav will try to detect broken executables (both PE and
266
+# ELF) and alert on them with the Broken.Executable heuristic signature.
267
+# Default: no
268
+#AlertBrokenExecutables yes
269
+
270
+# Alert on encrypted archives _and_ documents with heuristic signature (encrypted .zip, .7zip, .rar, .pdf).
271
+# Default: no
272
+#AlertEncrypted yes
273
+
274
+# Alert on encrypted archives with heuristic signature (encrypted .zip, .7zip, .rar).
275
+# Default: no
276
+#AlertEncryptedArchive yes
277
+
278
+# Alert on encrypted archives with heuristic signature (encrypted .pdf).
279
+# Default: no
280
+#AlertEncryptedDoc yes
281
+
282
+# With this option enabled OLE2 files containing VBA macros, which were not
283
+# detected by signatures will be marked as "Heuristics.OLE2.ContainsMacros".
284
+# Default: no
285
+#AlertOLE2Macros yes
286
+
287
+# Alert on SSL mismatches in URLs, even if the URL isn't in the database.
288
+# This can lead to false positives.
289
+# Default: no
290
+#AlertPhishingSSLMismatch yes
291
+
292
+# Alert on cloaked URLs, even if URL isn't in database.
293
+# This can lead to false positives.
294
+# Default: no
295
+#AlertPhishingCloak yes
296
+
297
+# Alert on raw DMG image files containing partition intersections.
298
+# Default: no
299
+#PartitionIntersection yes
300
+
301
+
237 302
 ##
238 303
 ## Executable files
239 304
 ##
... ...
@@ -264,11 +323,6 @@ TCPAddr 127.0.0.1
264 264
 # Default: yes
265 265
 #ScanELF yes
266 266
 
267
-# With this option clamav will try to detect broken executables (both PE and
268
-# ELF) and mark them as Broken.Executable.
269
-# Default: no
270
-#DetectBrokenExecutables yes
271
-
272 267
 
273 268
 ##
274 269
 ## Documents
... ...
@@ -281,11 +335,6 @@ TCPAddr 127.0.0.1
281 281
 # Default: yes
282 282
 #ScanOLE2 yes
283 283
 
284
-# With this option enabled OLE2 files with VBA macros, which were not
285
-# detected by signatures will be marked as "Heuristics.OLE2.ContainsMacros".
286
-# Default: no
287
-#OLE2BlockMacros no
288
-
289 284
 # This option enables scanning within PDF files.
290 285
 # If you turn off this option, the original files will still be scanned, but
291 286
 # without decoding and additional processing.
... ...
@@ -329,45 +378,14 @@ TCPAddr 127.0.0.1
329 329
 #ScanPartialMessages yes
330 330
 
331 331
 # With this option enabled ClamAV will try to detect phishing attempts by using
332
-# signatures.
332
+# HTML.Phishing and Email.Phishing NDB signatures.
333 333
 # Default: yes
334
-#PhishingSignatures yes
334
+#PhishingSignatures no
335 335
 
336
-# Scan URLs found in mails for phishing attempts using heuristics.
336
+# With this option enabled ClamAV will try to detect phishing attempts by
337
+# analyzing URLs found in emails using WDB and PDB signature databases.
337 338
 # Default: yes
338
-#PhishingScanURLs yes
339
-
340
-# Always block SSL mismatches in URLs, even if the URL isn't in the database.
341
-# This can lead to false positives.
342
-#
343
-# Default: no
344
-#PhishingAlwaysBlockSSLMismatch no
345
-
346
-# Always block cloaked URLs, even if URL isn't in database.
347
-# This can lead to false positives.
348
-#
349
-# Default: no
350
-#PhishingAlwaysBlockCloak no
351
-
352
-# Detect partition intersections in raw disk images using heuristics.
353
-# Default: no
354
-#PartitionIntersection no
355
-
356
-# Allow heuristic match to take precedence.
357
-# When enabled, if a heuristic scan (such as phishingScan) detects
358
-# a possible virus/phish it will stop scan immediately. Recommended, saves CPU
359
-# scan-time.
360
-# When disabled, virus/phish detected by heuristic scans will be reported only at
361
-# the end of a scan. If an archive contains both a heuristically detected
362
-# virus/phish, and a real malware, the real malware will be reported
363
-#
364
-# Keep this disabled if you intend to handle "*.Heuristics.*" viruses 
365
-# differently from "real" malware.
366
-# If a non-heuristically-detected virus (signature-based) is found first, 
367
-# the scan is interrupted immediately, regardless of this config option.
368
-#
369
-# Default: no
370
-#HeuristicScanPrecedence yes
339
+#PhishingScanURLs no
371 340
 
372 341
 
373 342
 ##
... ...
@@ -420,10 +438,6 @@ TCPAddr 127.0.0.1
420 420
 # Default: yes
421 421
 #ScanArchive yes
422 422
 
423
-# Mark encrypted archives as viruses (Encrypted.Zip, Encrypted.RAR).
424
-# Default: no
425
-#ArchiveBlockEncrypted no
426
-
427 423
 
428 424
 ##
429 425
 ## Limits
... ...
@@ -500,74 +514,93 @@ TCPAddr 127.0.0.1
500 500
 # Default: 1M
501 501
 #MaxZipTypeRcg 1M
502 502
 
503
-# This option sets the maximum number of partitions of a raw disk image to be scanned.
504
-# Raw disk images with more partitions than this value will have up to the value number
505
-# partitions scanned. Negative values are not allowed.
506
-# Note: setting this limit too high may result in severe damage or impact performance.
503
+# This option sets the maximum number of partitions of a raw disk image to be
504
+# scanned.
505
+# Raw disk images with more partitions than this value will have up to
506
+# the value number partitions scanned. Negative values are not allowed.
507
+# Note: setting this limit too high may result in severe damage or impact
508
+# performance.
507 509
 # Default: 50
508 510
 #MaxPartitions 128
509 511
 
510 512
 # This option sets the maximum number of icons within a PE to be scanned.
511
-# PE files with more icons than this value will have up to the value number icons scanned.
513
+# PE files with more icons than this value will have up to the value number
514
+# icons scanned.
512 515
 # Negative values are not allowed.
513
-# WARNING: setting this limit too high may result in severe damage or impact performance.
516
+# WARNING: setting this limit too high may result in severe damage or impact
517
+# performance.
514 518
 # Default: 100
515 519
 #MaxIconsPE 200
516 520
 
517
-# This option sets the maximum recursive calls for HWP3 parsing during scanning.
518
-# HWP3 files using more than this limit will be terminated and alert the user.
519
-# Scans will be unable to scan any HWP3 attachments if the recursive limit is reached.
521
+# This option sets the maximum recursive calls for HWP3 parsing during
522
+# scanning. HWP3 files using more than this limit will be terminated and
523
+# alert the user.
524
+# Scans will be unable to scan any HWP3 attachments if the recursive limit
525
+# is reached.
520 526
 # Negative values are not allowed.
521
-# WARNING: setting this limit too high may result in severe damage or impact performance.
527
+# WARNING: setting this limit too high may result in severe damage or impact
528
+# performance.
522 529
 # Default: 16
523 530
 #MaxRecHWP3 16
524 531
 
525
-# This option sets the maximum calls to the PCRE match function during an instance of regex matching.
526
-# Instances using more than this limit will be terminated and alert the user but the scan will continue.
532
+# This option sets the maximum calls to the PCRE match function during
533
+# an instance of regex matching.
534
+# Instances using more than this limit will be terminated and alert the user
535
+# but the scan will continue.
527 536
 # For more information on match_limit, see the PCRE documentation.
528 537
 # Negative values are not allowed.
529 538
 # WARNING: setting this limit too high may severely impact performance.
530 539
 # Default: 100000
531 540
 #PCREMatchLimit 20000
532 541
 
533
-# This option sets the maximum recursive calls to the PCRE match function during an instance of regex matching.
534
-# Instances using more than this limit will be terminated and alert the user but the scan will continue.
542
+# This option sets the maximum recursive calls to the PCRE match function
543
+# during an instance of regex matching.
544
+# Instances using more than this limit will be terminated and alert the user
545
+# but the scan will continue.
535 546
 # For more information on match_limit_recursion, see the PCRE documentation.
536 547
 # Negative values are not allowed and values > PCREMatchLimit are superfluous.
537 548
 # WARNING: setting this limit too high may severely impact performance.
538 549
 # Default: 2000
539 550
 #PCRERecMatchLimit 10000
540 551
 
541
-# This option sets the maximum filesize for which PCRE subsigs will be executed.
542
-# Files exceeding this limit will not have PCRE subsigs executed unless a subsig is encompassed to a smaller buffer.
552
+# This option sets the maximum filesize for which PCRE subsigs will be
553
+# executed. Files exceeding this limit will not have PCRE subsigs executed
554
+# unless a subsig is encompassed to a smaller buffer.
543 555
 # Negative values are not allowed.
544 556
 # Setting this value to zero disables the limit.
545
-# WARNING: setting this limit too high or disabling it may severely impact performance.
557
+# WARNING: setting this limit too high or disabling it may severely impact
558
+# performance.
546 559
 # Default: 25M
547 560
 #PCREMaxFileSize 100M
548 561
 
549
-# When BlockMax is set, files exceeding the MaxFileSize, MaxScanSize, or MaxRecursion limit will be flagged
550
-# with the virus "Heuristics.Limits.Exceeded".
562
+# When AlertExceedsMax is set, files exceeding the MaxFileSize, MaxScanSize, or
563
+# MaxRecursion limit will be flagged with the virus
564
+# "Heuristics.Limits.Exceeded".
551 565
 # Default: no
552
-#BlockMax yes
566
+#AlertExceedsMax yes
567
+
553 568
 
554 569
 ##
555 570
 ## Bytecode
556 571
 ##
557 572
 
558 573
 # With this option enabled ClamAV will load bytecode from the database. 
559
-# It is highly recommended you keep this option on, otherwise you'll miss detections for many new viruses.
574
+# It is highly recommended you keep this option on, otherwise you'll miss
575
+# detections for many new viruses.
560 576
 # Default: yes
561 577
 #Bytecode yes
562 578
 
563 579
 # Set bytecode security level.
564 580
 # Possible values:
565
-#       None - no security at all, meant for debugging. DO NOT USE THIS ON PRODUCTION SYSTEMS
566
-#         This value is only available if clamav was built with --enable-debug!
567
-#       TrustSigned - trust bytecode loaded from signed .c[lv]d files,
568
-#                insert runtime safety checks for bytecode loaded from other sources
569
-#       Paranoid - don't trust any bytecode, insert runtime checks for all
570
-# Recommended: TrustSigned, because bytecode in .cvd files already has these checks
581
+#   None -      No security at all, meant for debugging.
582
+#               DO NOT USE THIS ON PRODUCTION SYSTEMS.
583
+#               This value is only available if clamav was built
584
+#               with --enable-debug!
585
+#   TrustSigned - Trust bytecode loaded from signed .c[lv]d files, insert
586
+#               runtime safety checks for bytecode loaded from other sources.
587
+#   Paranoid -  Don't trust any bytecode, insert runtime checks for all.
588
+# Recommended: TrustSigned, because bytecode in .cvd files already has these
589
+# checks.
571 590
 # Note that by default only signed bytecode is loaded, currently you can only
572 591
 # load unsigned bytecode in --enable-debug mode.
573 592
 #