--[[[
-- @module oletools
--- This module contains oletools access functions
+-- This module contains oletools access functions.
+-- Olefy is needed: https://github.com/HeinleinSupport/olefy
--]]
local lua_util = require "lua_util"
task = task,
host = addr:to_string(),
port = addr:get_port(),
- timeout = rule['timeout'],
+ timeout = rule.timeout,
shutdown = true,
data = content,
callback = oletools_callback,
else
rspamd_logger.errx(task, '%s: failed to scan, maximum retransmits '..
'exceed', rule.log_prefix)
- task:insert_result(rule['symbol_fail'], 0.0, 'failed to scan and '..
+ task:insert_result(rule.symbol_fail, 0.0, 'failed to scan and '..
'retransmits exceed')
end
end
[9] = 'RETURN_ENCRYPTED',
}
- --lua_util.debugm(rule.module_name, task, '%s: result: %s', rule.log_prefix, result)
lua_util.debugm(rule.module_name, task, '%s: filename: %s', rule.log_prefix, result[2]['file'])
lua_util.debugm(rule.module_name, task, '%s: type: %s', rule.log_prefix, result[2]['type'])
end
lua_util.debugm(rule.module_name, task, '%s: extended: %s', rule.log_prefix, rule.extended)
+
if rule.extended == false and macro_autoexec and macro_suspicious then
lua_util.debugm(rule.module_name, task, '%s: found macro_autoexec and '..
task = task,
host = addr:to_string(),
port = addr:get_port(),
- timeout = rule['timeout'],
+ timeout = rule.timeout,
shutdown = true,
data = content,
callback = oletools_callback,
timeout = 15.0,
log_clean = false,
retransmits = 2,
- cache_expire = 7200, -- expire redis in 2h
+ cache_expire = 86400, -- expire redis in 1d
message = '${SCANNER}: Oletools threat message found: "${VIRUS}"',
detection_category = "office macro",
default_score = 1,
end
return {
- type = {module_name,'office macro scanner', 'hash', 'scanner'},
+ type = {module_name,'attachment scanner', 'hash', 'scanner'},
description = 'oletools office macro scanner',
configure = oletools_config,
check = oletools_check,