Sophos 防病毒保护
Sophos 防病毒扫描程序使用本地内部缓存来维护来自外部列表服务器的查询响应,以提高查找性能。Sophos 防病毒扫描是完全基于文件的防病毒功能的 CPU 密集度较低的替代方案。有关详细信息,请参阅以下主题:
Sophos 防病毒保护概述
Sophos 防病毒软件是一种云端防病毒解决方案。病毒码和恶意软件数据库位于由 Sophos(Sophos 可扩展列表)服务器维护的外部服务器上,因此无需在瞻博网络设备上下载和维护大型病毒码数据库。在 Junos OS 23.1R1 版之前,Sophos 防病毒扫描程序还使用本地内部缓存来维护来自外部列表服务器的查询响应,以提高查找性能。
由于瞻博网络内容安全处理的大量流量基于 HTTP,因此使用统一资源标识符 (URI) 检查来有效防止恶意内容到达端点客户端或服务器。对 HTTP 流量执行以下检查:URI 查找、真实文件类型检测和文件校验和查找。支持以下应用层协议:HTTP、FTP、SMTP、POP3 和 IMAP。
从 Junos OS 15.1X49-D10 版和 Junos OS 17.3R1 版开始,不支持完整的基于文件的防病毒功能。对于以前的版本,Sophos 防病毒扫描是作为完全基于文件的防病毒功能的 CPU 密集度较低的替代方案提供的。Sophos 支持与完全防病毒相同的协议,并以大致相同的方式运行;但是,它具有较小的内存占用,并且与内存较少的低端设备兼容。
从 Junos OS 15.1X49-D100 版开始,Sophos 防病毒、Web 过滤和内容过滤安全功能支持 HTTP、HTTPS、FTP、SMTP、POPP3、IMAP 协议的 IPv6 直通流量。
从 Junos OS 12.3X48-D35 版和 Junos OS 17.3R1 版开始,内容安全 Sophos 防病毒 (SAV) 单会话吞吐量得到提升,以优化 TCP 代理转发。
从 Junos OS 19.4R1 版开始,防病毒功能支持隐式和显式 SMTPS、IMAP 和 POP3S 协议,并且仅支持显式被动模式 FTPS。
隐式模式 — 使用安全通道连接到 SSL/TLS 加密端口。
显式模式 — 首先连接到不安全的通道,然后通过发出 STARTTLS 命令来保护通信。对于 POP3S,请使用 STLS 命令。
从 Junos OS 23.1R1 版开始,内容安全支持新的防病毒软件 Sophos Live Protection 2.0 版。新版本的 Sophos 防病毒软件使用 HTTPS 连接进行设备到服务器的通信。对于 HTTPS 连接,您必须创建 SSL 初始化配置文件,并将该配置文件添加到 Sophos 引擎的默认配置中。
参见
Sophos 防病毒功能
Sophos 防病毒软件具有以下主要功能:
Sophos antivirus expanded MIME decoding supportSophos 防病毒软件提供对 HTTP、POP3、SMTP 和 IMAP 的解码支持。对于每个受支持的协议,MIME 解码支持包括以下内容:
多部分和嵌套标头解码
主题字段中的 Base64 解码、打印引号解码和编码字解码
Sophos antivirus supports HTTPS traffic— 从 Junos OS 12.3X48-D25 版和 Junos OS 17.3R1 版开始,通过 SSL 转发代理的 Sophos 防病毒软件支持 HTTPS 流量。基于 SSL 转发代理的 Sophos 防病毒软件通过拦截通过 SRX 系列防火墙的 HTTPS 流量来实现此目的。来自 SRX 系列防火墙的安全通道分为客户端与 SRX 系列防火墙之间的一个 SSL 通道以及 SRX 系列防火墙与 HTTPS 服务器之间的另一个 SSL 通道。SSL 转发代理充当两个通道的终端,并将明文流量转发到 Content Security。内容安全从明文流量中提取 URL 和文件校验和信息。Sophos 防病毒扫描程序确定是阻止还是允许请求。
SSL 转发代理不支持客户端身份验证。如果服务器需要客户端身份验证,则内容安全将绕过流量。在以下情况下,内容安全性会绕过 HTTPS 流量:
如果 SSL 代理未解析来自客户端的第一个握手数据包,则 SSL 转发代理将绕过该流量。
如果由于兼容性问题而导致与客户端和服务器的 SSL 代理握手不完整,则连接将断开。
如果系统资源不足,SSL 转发代理将无法处理新连接,Sophos 防病毒软件会绕过流量。
如果 HTTPS 流量命中 SSL 转发代理的允许列表,SSL 转发代理和 Sophos 防病毒软件将绕过该流量。
Sophos antivirus scan result handling—借助 Sophos 防病毒软件 TCP,当发现病毒并丢弃数据内容时,流量将正常关闭。
支持以下失败模式选项:内容大小、默认、引擎未就绪、资源不足、超时和请求过多。您可以设置以下操作:阻止、记录并允许以及允许。Sophos 对支持选项的故障模式处理与完全防病毒非常相似。
Sophos Uniform Resource Identifier checking—Sophos 提供统一资源标识符 (URI) 检查,类似于反垃圾邮件实时空路由列表 (RBL) 查找。URI 检查是一种针对 Sophos 数据库分析 HTTP 流量中的 URI 内容以识别恶意软件或恶意内容的方法。由于恶意软件主要是静态的,因此使用校验和机制来识别恶意软件以提高性能。能够使用校验和的文件包括 .exe、.zip、.rar、.swf、.pdf 和 .ole2(doc 和 xls)。
如果您的瞻博网络设备保护没有 HTTP 流量的内部网络,或者具有外部世界无法访问的 Web 服务器,则可能需要关闭 URI 检查。如果外部世界无法访问 Web 服务器,则它们不太可能包含 Sophos URI 数据库中的 URI 信息。默认情况下,URI 检查处于启用状态。
从 Junos OS 版本 18.4R1 开始,URI 检查默认处于关闭状态。
参见
了解 Sophos 防病毒数据文件更新
Sophos 防病毒软件使用一小组需要定期更新的数据文件。这些数据文件仅包含有关指导扫描逻辑的信息,不包含完整的模式数据库。主模式数据库位于由 Sophos 维护的远程 Sophos 可扩展列表服务器上,包括针对关键病毒、URI 检查、恶意软件、蠕虫、特洛伊木马和间谍软件的保护。
Sophos 数据文件通过 HTTP 或 HTTPS 更新,可以手动更新或计划自动更新。使用 Sophos 防病毒软件:
缺省情况下,特征码数据库自动更新间隔为每天一次。可以更改此间隔。
在数据文件更新期间,病毒扫描功能不会中断。如果更新失败,将继续使用现有数据文件。
默认情况下,Sophos 防病毒数据文件更新的 URL 为 http://update.juniper-updates.net/SAV/。
Sophos 防病毒扫描功能是一项单独许可的订阅服务。当您的防病毒许可证密钥过期时,功能将不再有效,因为模式查找数据库位于远程 Sophos 服务器上。您有 30 天的宽限期来更新您的许可证。
参见
Sophos 防病毒软件与卡巴斯基防病毒软件的比较
从 Junos OS 15.1x49-D10 版和 Junos OS 17.3R1 版开始不支持卡巴斯基和 Express 防病毒功能。对于以前的版本,Sophos Antivirus 与 Juniper Express Antivirus 非常相似,并且与 Full Antivirus 功能也有相似之处:
与瞻博网络 Express 和完整防病毒解决方案不同,Sophos 的防病毒和恶意软件数据库存储在一组远程 Sophos 可扩展列表服务器上。查询使用 DNS 协议执行。Sophos 维护这些服务器,因此无需在瞻博网络设备上下载和维护大型模式数据库。因为数据库是远程的,并且对新病毒爆发的响应速度更快。防病毒数据库没有大小限制,但扫描文件大小有限制。
注意:Sophos 防病毒软件使用一组需要定期更新的数据文件。这些不是典型的病毒码文件;它们是一组小文件,有助于指导病毒扫描逻辑。您可以手动下载数据文件或设置自动下载。
Sophos 不提供与卡巴斯基反病毒软件相同的预筛选检测。Sophos 确实提供了类似的解决方案,它是 Sophos 引擎的一部分,不能打开和关闭。
Sophos 防病毒扫描功能是一项单独许可的订阅服务。此外,模式查找数据库位于 Sophos 维护的远程服务器上,因此当您的防病毒许可证密钥过期时,功能将不再有效。您有 30 天的宽限期来更新您的许可证。
参见
Sophos 防病毒配置概述
Sophos 防病毒是内容安全功能集的一部分,因此您首先配置内容安全选项(自定义对象),配置 Sophos 功能,然后创建内容安全策略和安全策略。安全策略控制设备转发的所有流量,内容安全策略指定用于扫描流量的参数。内容安全策略还用于将一组协议绑定到一个或多个内容安全功能配置文件,包括本例中的 Sophos 防病毒软件。
您必须完成以下任务才能配置 Sophos 防病毒软件:
- 配置内容安全自定义对象和 MIME 列表。请参阅 示例:配置 Sophos 防病毒自定义对象,
- 配置 Sophos 防病毒功能配置文件。请参阅 示例:配置 Sophos 防病毒功能配置文件。
- 配置内容安全策略。请参阅 示例:配置 Sophos 防病毒内容安全策略
- 配置安全策略。请参阅 示例:配置 Sophos 防病毒防火墙安全策略。
要配置 Sophos 防病毒实时保护版本 2.0,请参阅 示例:配置 Sophos 防病毒实时保护版本 2.0。
要通过 SSL 转发代理配置 Sophos 防病毒软件以支持 HTTPS 流量,请参阅 配置具有内容安全性的 SSL 代理。
示例:配置 Sophos 防病毒自定义对象
此示例说明如何创建要与 Sophos 防病毒软件一起使用的内容安全全局自定义对象。
要求
在开始之前,请阅读内容安全自定义对象。请参阅 内容安全概述。
概述
配置 MIME 列表。这包括为防病毒扫描创建 MIME 允许列表和 MIME 例外列表。在此示例中,您将绕过对 QuickTime 视频的扫描,除非它们包含 MIME 类型“不合适”。
配置
程序
GUI 快速配置
分步过程
要配置 MIME 列表:
单击任务栏中的“ 配置 ”选项卡,然后选择 “安全>UTM>自定义对象”。
单击“ MIME 模式列表 ”选项卡,然后单击“ 添加”。
在“MIME 模式名称”框中,键入 avmime2。
在“MIME 模式值”框中,键入 video/quicktime,然后单击“ 添加”。
在“MIME 模式值”框中,键入 image/x-portable-anympa,然后单击“ 添加”。
在“MIME 模式值”框中,键入 x-world/x-vrml,然后单击“ 添加”。
分步过程
要配置 MIME 例外列表,请执行以下操作:
单击任务栏中的“ 配置 ”选项卡,然后选择 “安全>UTM>自定义对象”。
单击“ MIME 模式列表” 选项卡,然后选择“ 添加”。
在“MIME 模式名称”框中,键入 exception-avmime2。
在“MIME 模式值”框中,键入 video/quicktime-inappropriate ,然后单击“ 添加”。
分步过程
配置防病毒扫描将绕过的 URL 或地址的 URL 模式列表(允许列表)。创建 URL 模式列表后,您将创建自定义 URL 类别列表并将模式列表添加到其中。
由于您使用 URL 模式列表创建自定义 URL 类别列表,因此必须先配置 URL 模式列表自定义对象,然后再配置自定义 URL 类别列表。
要配置 URL 模式允许列表,请执行以下操作:
单击任务栏中的“ 配置 ”选项卡,然后选择 “安全>UTM>自定义对象”。
单击“ URL 模式列表 ”选项卡,然后单击“ 添加”。
在“URL 模式名称”框中,输入 urlist2。
在“URL 模式值”框中,输入 http://example.net。(您也可以使用服务器的IP地址而不是URL。
分步过程
保存您的配置:
单击 确定 检查您的配置并将其另存为候选配置。
如果完成设备配置,请单击 操作>提交。
URL 模式通配符支持 — 通配符规则如下所示: \*\.[]\?* 并且必须在所有通配符 URL 前面加上 http://。仅当“*”位于 URL 的开头且后跟“.”时,才能使用它。您只能在 URL 末尾使用“?”。
支持以下通配符语法:http://*。example.net,http://www.example.ne?,http://www.example.n??。不支持以下通配符语法:*.example.net 、www.example.ne?、http://*example.net、http://*。
分步过程
要使用 CLI 配置防病毒保护,必须按以下顺序创建自定义对象:
创建 MIME 允许列表。
[edit security utm] user@host# set custom-objects mime-pattern avmime2 value [video/quicktime image/x-portable-anymap x-world/x-vrml]
创建 MIME 例外列表。
[edit security utm] user@host# set custom-objects mime-pattern exception-avmime2 value [video/quicktime-inappropriate]
配置要绕过的网址或地址的网址模式列表(允许列表)。创建 URL 模式列表后,创建自定义 URL 类别列表并向其中添加模式列表。通过创建列表名称并向其添加值来配置 URL 模式列表自定义对象,如下所示。使用 URL 模式列表创建自定义 URL 类别列表时,必须先配置 URL 模式列表自定义对象,然后再配置自定义 URL 类别列表。
[edit security utm] user@host# set custom-objects url-pattern urllist2 value [http://www. example.net 192.168.1.5]
注意:URL 模式通配符支持 — 通配符规则如下所示:\*\.[]\?* 并且必须在所有通配符 URL 前面加上 http://。如果“*”位于 URL 的开头且后跟“.”,则只能使用“*”。您只能在 URL 末尾使用“?”。
支持以下通配符语法:http://*。example.net,http://www.example.ne?,http://www.example.n??。不支持以下通配符语法:*.example.net 、www.example.ne?、http://*example.net、http://*。
使用您之前创建的 URL 模式列表 urllist2 配置自定义 URL 类别列表自定义对象:
[edit security utm] user@host# set custom-objects custom-url-category custurl2 value urllist2
示例:配置 Sophos 防病毒功能配置文件
此示例说明如何配置 Sophos 防病毒配置文件,该配置文件定义将用于病毒扫描的参数。
要求
准备工作:
安装 Sophos 防病毒许可证。请参阅 安装和升级指南。
为内容安全性配置自定义对象。请参阅 示例:配置 Sophos 防病毒自定义对象。
概述
以下配置将 Sophos 定义为防病毒引擎并设置参数,例如数据文件更新间隔、管理员通知选项、回退选项和文件大小限制。
[edit security utm feature-profile]
层次结构级别在 Junos OS 18.2R1 版中已弃用。有关详细信息,请参阅内容安全概述。
配置
程序
GUI 快速配置
分步过程
以下示例说明如何创建自定义 Sophos 配置文件。如果要使用瞻博网络预配置配置文件,请在内容安全策略中使用名为 junos-sophos-av-defaults 的配置文件。请参阅 示例:配置 Sophos 防病毒内容安全策略。
选择并配置引擎类型。因为您正在配置 Sophos 防病毒软件,所以请配置 sophos 引擎:
分步过程
单击任务栏中的 “配置 ”选项卡,然后选择 “安全>UTM>防病毒”。
单击 “全局选项 ”选项卡,然后单击 Sophos。
单击 “确定 ”并提交更改。
像在步骤 1 中一样返回到防病毒全局选项屏幕,并设置以下参数:
分步过程
在“MIME 允许列表”列表中,选择 “例外-avmime2”。
在“URL 允许列表”列表中,选择 “custurl2”。
在“模式更新间隔(秒)”框中,键入 2880。
在框中,键入将接收 SophosAdmin 电子邮件数据文件更新通知的电子邮件地址。例如 - admin@ example.net。
在“自定义邮件主题”框中,键入 “Sophos 数据文件已更新”。
单击 确定 检查您的配置并将其另存为候选配置。
配置 sophos 引擎配置文件并设置参数。
分步过程
单击任务栏中的 “配置 ”选项卡,然后选择 “安全>UTM>防病毒”。单击 “添加”。
在“添加配置文件”框中,单击 “主要 ”选项卡。
在“配置文件名称”框中,键入 sophos-prof1。
在“滴流超时”框中,键入 180。
启用滴流选项时,请务必了解滴流可能会在防病毒扫描期间将部分文件发送到客户端。客户端可能会接收某些内容,并且客户端可能会在完全扫描文件之前被感染。
默认情况下,URI 检查处于启用状态。若要将其关闭,请在“URI”复选框中清除“ 是 ”。
在“内容大小限制”框中,键入 20000。
在“扫描引擎超时”框中,键入 1800。
通过单击“ 回退设置 ”选项卡配置回退设置。在此示例中,所有回退选项都设置为“日志”和“允许”。单击 日志并允许 以下项目:默认操作、内容大小、引擎未就绪、超时、资源不足、请求过多。
通过单击 通知选项 选项卡配置通知选项。您可以为回退阻止和回退非阻止操作以及病毒检测配置通知。
分步过程
要为回退设置配置通知,请执行以下操作:
对于通知类型,单击 协议。
对于通知邮件发件人,单击 是。
在“自定义消息”框中,键入 “发生回退阻止操作”。
在“自定义消息主题”框中,键入 “防病毒回退警报****”。
要配置病毒检测的通知选项,请单击 通知选项持续... 选项卡。
分步过程
对于“通知类型”选项按钮,请选择 “协议”。
对于“通知邮件发件人”选项按钮,选择 “是”。
在“自定义消息”框中,键入 “检测到病毒”。
在“自定义邮件主题”框中,键入“检测到病毒***”。
单击 确定 检查您的配置并将其另存为候选配置。
如果完成设备配置,请单击 操作>提交。
分步过程
要使用 CLI 配置 Sophos 防病毒功能配置文件:
以下示例说明如何创建自定义 Sophos 配置文件。如果要使用瞻博网络预配置配置文件,请在内容安全策略中使用名为 junos-sophos-av-defaults 的配置文件。请参阅 示例:配置 Sophos 防病毒内容安全策略。
选择并配置引擎类型。因为您正在配置 Sophos 防病毒软件,所以请配置 sophos 引擎。
[edit] user@host# set security utm default-configuration anti-virus type sophos-engine
提交配置。
选择更新数据文件的时间间隔。默认防病毒模式更新间隔为 1440 分钟(每 24 小时)。您可以选择保留此默认值,也可以更改它。如果需要,您还可以强制进行手动更新。要将默认值从每 24 小时更改为每 48 小时:
[edit security utm default-configuration anti-virus] user@host# set sophos-engine pattern-update interval 2880
使用代理服务器详细信息配置网络设备,以从远程服务器下载特征码更新:
[edit security utm default-configuration anti-virus] user@host# set sophos-engine pattern-update proxy
在大多数情况下,您无需更改 URL 即可更新模式数据库。如果确实需要更改此选项,请使用以下命令:
[edit security utm default-configuration anti-virus] user@host# set sophos-engine pattern-update url http://www.example.net/test-download
您可以将设备配置为在数据文件更新时通知指定的管理员。这是一封包含自定义邮件和自定义主题行的电子邮件通知。
[edit security utm default-configuration anti-virus] user@host# set sophos-engine pattern-update email-notify admin-email admin@example.net custom-message “Sophos antivirus data file was updated” custom-message-subject “AV data file updated”
将回退选项列表配置为阻止、日志和允许或允许。默认设置为日志和许可。您可以使用默认设置,也可以更改它们。
配置内容大小操作。在此示例中,如果超出内容大小,则执行的操作为阻止。
首先创建名为 sophos-prof1 的配置文件。
[edit security utm feature-profile anti-virus] user@host# set profile sophos-prof1
将内容大小回退选项配置为阻止。
[edit security utm feature-profile anti-virus profile sophos-prof1] user@host# set fallback-options content-size block
将默认回退选项配置为日志和允许。
[edit security utm feature-profile anti-virus profile sophos-prof1] user@host# set fallback-options default log-and-permit
如果防病毒引擎尚未准备就绪,请配置日志和允许。
[edit security utm feature-profile anti-virus profile sophos-prof1] user@host# set fallback-options engine-not-ready log-and-permit
配置日志和允许(如果设备资源不足)。
[edit security utm feature-profile anti-virus profile sophos-prof1] user@host# set fallback-options out-of-resources log-and-permit
配置发生病毒扫描超时时的日志和允许。
[edit security utm feature-profile anti-virus profile sophos-prof1] user@host# set fallback-options timeout log-and-permit
配置日志和允许(如果病毒引擎无法处理的请求过多)。
[edit security utm feature-profile anti-virus profile sophos-prof1] user@host# set fallback-options too-many-requests log-and-permit
配置通知选项。您可以配置回退阻止、回退非阻止操作和病毒检测的通知。
在此步骤中,为回退阻止操作配置自定义消息,并向管理员和发件人发送仅协议操作的通知。
[edit security utm feature-profile anti-virus profile sophos-prof1] user@host# set notification-options fallback-block custom-message ***Fallback block action occurred*** custom-message-subject Antivirus Fallback Alert notify-mail-sender type protocol-only allow email administrator-email admin@example.net
为仅协议病毒检测配置通知,并发送通知。
[edit security utm feature-profile anti-virus profile sophos-prof1] user@host#set notification-options virus-detection type protocol-only notify-mail-sender custom-message-subject ***Virus detected*** custom-message Virus has been detected
配置内容大小参数。
配置内容大小值时,请记住,在某些情况下,协议标头中提供了内容大小,因此在发送扫描请求之前应用最大内容大小回退。但是,在许多情况下,协议标头中未提供内容大小。在这些情况下,TCP 有效负载将发送到防病毒扫描程序并累积,直到有效负载结束。如果累积的有效负载超过最大内容大小值,则应用最大内容大小回退。默认回退操作是日志和允许,因此您可能希望将此选项更改为阻止,在这种情况下,将丢弃此类数据包并向客户端发送阻止消息。
在此示例中,如果内容大小超过 20 MB,则会丢弃数据包。
[edit security utm default-configuration anti-virus] user@host# set scan-options content-size-limit 20000
默认情况下,URI 检查处于启用状态。要关闭 URI 检查,请执行以下操作:
[edit security utm default-configuration anti-virus] user@host# set scan-options no-uri-check
将扫描操作的超时设置为 1800 秒。
[edit security utm default-configuration anti-virus] user@host# set scan-options timeout 1800
Sophos 可扩展列表服务器包含用于扫描操作的病毒和恶意软件数据库。将这些服务器的响应超时设置为 3 秒(默认值为 2 秒)。
[edit security utm default-configuration anti-virus] user@host# set scan-options sxl-timeout 3
将 Sophos 可扩展列表服务器重试选项配置为 2 次重试(默认值为 1)。
[edit security utm default-configuration anti-virus] user@host# set scan-options sxl-retry 2
将滴流设置配置为 180 秒。如果使用滴流,还可以设置超时参数。涓流仅适用于 HTTP。HTTP 滴流是一种机制,用于防止 HTTP 客户端或服务器在文件传输或防病毒扫描期间超时。
启用滴流选项时,请记住,滴流可能会在防病毒扫描期间将部分文件发送到客户端。因此,在完全扫描文件之前,客户端可能会收到某些内容。
[edit security utm default-configuration anti-virus] user@host# set trickling timeout 180
将防病毒模块配置为使用 MIME 绕过列表和例外列表。您可以使用自己的自定义对象列表,也可以使用设备附带的名为 junos-default-bypass-mime 的默认列表。在此示例中,您将使用之前设置的列表。
[edit security utm default-configuration anti-virus] user@host# set mime-whitelist list avmime2 [edit security utm feature-profile anti-virus] user@host# set mime-whitelist list exception-avmime2
将防病毒模块配置为使用 URL 绕过列表。如果您使用的是网址许可名单,则这是您之前配置为自定义对象的自定义网址类别。网址许可名单仅对 HTTP 流量有效。在此示例中,您将使用之前设置的列表。
[edit security utm default-configuration anti-virus] user@host# set url-whitelist custurl2
验证
获取有关当前防病毒状态的信息
目的
行动
在操作模式下,输入 show security utm anti-virus status
命令以查看防病毒状态。
user@host>show security utm anti-virus status
意义
防病毒密钥到期日期 - 许可证密钥到期日期。
更新服务器 - 数据文件更新服务器的 URL。
间隔 - 设备从更新服务器更新数据文件的时间段(以分钟为单位)。
模式更新状态 - 下次更新数据文件的时间,以分钟为单位显示。
上次结果 - 上次更新的结果。如果您已经拥有最新版本,则会显示
already have latest database
。
防病毒签名版本 - 当前数据文件的版本。
扫描引擎类型 - 当前正在运行的防病毒引擎类型。
扫描引擎信息 - 当前扫描引擎发生的最后一操作的结果。
示例:配置 Sophos 防病毒内容安全策略
此示例说明如何为 Sophos 防病毒软件创建内容安全策略。
要求
在创建内容安全策略之前,请创建自定义对象和 Sophos 功能配置文件。
-
配置内容安全自定义对象和 MIME 列表。请参阅 示例:配置 Sophos 防病毒自定义对象。
配置 Sophos 防病毒功能配置文件。请参阅 示例:配置 Sophos 防病毒功能配置文件。
概述
创建防病毒功能配置文件后,可以为防病毒扫描协议配置内容安全策略,并将此策略附加到功能配置文件。在此示例中,将扫描 HTTP 以查找病毒,如语句所示 http-profile
。您也可以通过创建不同的配置文件或向配置文件添加其他协议来扫描其他协议,例如:imap-profile、pop3-profile 和 smtp-profile。
配置
程序
GUI 快速配置
分步过程
要为 Sophos 防病毒软件配置内容安全策略:
单击任务栏中的“ 配置 ”选项卡,然后选择 “安全>策略>UTM 策略”。然后单击“ 添加”。
单击 主要 选项卡。在“策略名称”框中,键入 utmp3。
单击 防病毒配置文件 选项卡。在 HTTP 配置文件列表中,选择 sophos-prof1。
单击 确定 检查您的配置并将其另存为候选配置。
如果已完成设备配置,请选择 “操作>提交”。
分步过程
要为 Sophos 防病毒软件配置内容安全策略:
-
转到编辑安全内容安全层次结构。
[edit] user@host# edit security utm
-
创建内容安全策略 utmp3 并将其附加到 http 配置文件 sophos-prof1。您可以使用默认的 Sophos 功能配置文件设置,方法是将上述语句中的 sophos-prof1 替换为 junos-sophos-av-defaults。
[edit security utm] user@host# set utm-policy utmp3 anti-virus http-profile sophos-prof1
示例:配置 Sophos 防病毒防火墙安全策略
此示例说明如何为 Sophos 防病毒软件创建安全策略。
要求
在创建安全策略之前,请创建自定义对象、Sophos 功能配置文件和内容安全策略。
-
配置内容安全自定义对象和 MIME 列表。请参阅 示例:配置 Sophos 防病毒自定义对象。
配置 Sophos 防病毒功能配置文件。请参阅 示例:配置 Sophos 防病毒功能配置文件。
-
配置内容安全策略。请参阅 示例:配置 Sophos 防病毒内容安全策略。
概述
创建一个防火墙安全策略,该策略将导致 Sophos 防病毒软件使用 示例:配置 Sophos 防病毒功能配置文件中定义的功能配置文件设置扫描从不信任区域到信任区域的流量。由于匹配应用程序配置设置为 any,因此将扫描所有应用程序类型。
配置
程序
GUI 快速配置
分步过程
要为 Sophos 防病毒软件配置安全策略:
配置不信任到信任策略以匹配任何源地址或目标地址,然后选择要扫描到
any
的应用程序。分步过程
单击任务栏中的 “配置 ”选项卡,然后选择 “安全>策略>FW 策略”。然后选择“ 添加”。
在“策略名称”框中,键入 p3。
在“策略操作”框中,选择“ 允许”。
在“从区域”列表中,选择 “不信任”。
在“目标区域”列表中,选择“ 信任”。
在“源地址”和“目标地址”框中,确保将“匹配”设置为 “任意”。
在“应用程序”框中,从“应用程序/集”列表中选择 任何应用程序 ,然后将其移动到“匹配”列表中。
-
将名为 utmp3 的内容安全策略附加到防火墙安全策略。这将导致 Sophos 防病毒功能扫描匹配的流量。
分步过程
-
从“编辑策略”框中,单击 “应用程序服务 ”选项卡。
-
在“内容安全策略”列表中,选择 utmp3。
-
单击 确定 检查您的配置并将其另存为候选配置。
如果完成设备配置,请选择 “操作>提交”。
分步过程
要为 Sophos 防病毒软件配置安全策略:
配置不信任到信任策略以匹配任何源地址。
[edit security] user@host# set policies from-zone untrust to-zone trust policy p3 match source-address any
配置不信任到信任策略以匹配任何目标地址。
[edit security] user@host# set policies from-zone untrust to-zone trust policy p3 match destination-address any
配置不信任到信任策略以匹配任何应用程序类型。
[edit security] user@host# set policies from-zone untrust to-zone trust policy p3 match application any
-
将名为 utmp3 的内容安全策略附加到防火墙安全策略。这将导致 Sophos 防病毒功能扫描匹配的流量。
[edit security] user@host# set policies from-zone untrust to-zone trust policy p3 then permit application-services utm-policy utmp3
示例:配置 Sophos 防病毒实时保护版本 2.0
使用此配置示例来配置和验证设备上的 Sophos 防病毒实时保护版本 2.0。Sophos 防病毒是一种云端防病毒解决方案。Sophos(Sophos 可扩展列表)服务器维护的外部服务器上的病毒码和恶意软件数据库可隔离并保护您的设备。从 Junos OS 23.1R1 版开始,内容安全性支持 Sophos 防病毒实时保护版本 2.0。新的防病毒版本使用 HTTPS 协议在 SRX 系列防火墙和 Sophos 服务器之间进行通信。
可读性分数 |
|
阅读时间 |
不到15分钟。 |
配置时间 |
不到一个小时。 |
先决条件示例
硬件要求 | SRX 系列防火墙和 vSRX 虚拟防火墙 |
软件要求 | Junos OS 23.1R1 或更高版本 |
许可要求 | Sophos 防病毒实时保护版本 2.0 许可证 使用命令确保您的 |
开始之前
好处 |
Sophos(Sophos 可扩展列表)服务器维护的外部服务器上的病毒码和恶意软件数据库可隔离并保护您的设备。 在 SRX 系列防火墙和 Sophos 服务器之间提供基于 HTTPS 的安全连接。 |
有用的资源: |
|
了解更多 |
|
实践经验 |
|
了解更多信息 |
功能概述
表 2 提供了此示例中部署的配置组件的快速摘要。
配置 文件 |
|
启动配置文件 | SRX 系列防火墙上的 Sophos 服务器配置包括 SSL 初始化配置文件 ( 启动配置文件是必需的,以使 SRX 系列防火墙能够启动与 Sophos 服务器的 HTTPS 会话以检查数据包。SSL 初始化配置文件还对进出 Sophos 服务器的数据包进行加密和解密。 |
代理配置文件 | SSL 代理配置文件 |
功能简介 |
功能配置文件 应用于 对于不同的内容安全策略,可以有多个功能配置文件。 |
政策 |
|
内容安全策略 |
内容安全策略 定义 content_security_p1防病毒协议(HTTP、FTP、SMTP、POPP3 和 IMAP),并将此策略附加到安全功能配置文件 |
安全策略 |
两个安全策略( 我们将内容安全策略和 |
安全区域 |
|
|
主机(客户端)区域中的网段。 |
|
目标服务器(Web 服务)区域中的网段。 |
|
SRX 系列防火墙与 Sophos 服务器交互的网段。 |
协议 |
|
HTTPS |
在客户端和 Web 服务器以及 SRX 系列防火墙和 Sophos 服务器之间建立 HTTPS 会话。 |
主要验证任务 |
|
拓扑概述
在此示例中,客户端通过 SRX 系列防火墙发起对 Web 服务的请求。当 SRX 系列防火墙收到请求时,它会联系 Sophos 服务器以检查 Web 服务的真实性。Sophos 防病毒版本 2.0 使用 HTTPS 连接进行 SRX 系列防火墙与 Sophos 服务器之间的通信。根据从 Sophos 服务器收到的响应,SRX 系列防火墙允许或阻止内容安全策略中定义的流量。
拓扑组件角色 | 功能 | |
---|---|---|
客户 | 请求 Web 服务 | 通过 SRX 系列防火墙启动与 Web 服务器的 HTTPS 会话。 |
SRX 系列防火墙 | 瞻博网络防火墙 | 启动与 Sophos 防病毒服务器的 HTTPS 会话。它还为客户端加密和解密数据包。 |
Sophos 服务器 | 防病毒服务器 | 验证从 SRX 系列防火墙接收的内容。 |
网页服务器 | Web 服务提供商 | 响应客户端的请求。 |
拓扑图示

被测设备 (DUT) 上的分步配置
-
配置设备接口。
[edit interfaces] user@host# set ge-0/0/0 unit 0 family inet address 192.0.2.254/24 user@host# set ge-0/0/1 unit 0 family inet address 203.0.113.254/24
-
在设备上启用 Sophos 防病毒软件。配置 Sophos 防病毒软件应检查的转发模式和流量类型。
[edit security] user@host# set utm default-configuration anti-virus type sophos-engine user@host# set utm default-configuration anti-virus forwarding-mode inline-tap user@host# set utm default-configuration anti-virus scan-options no-uri-check
-
定义 SSL 初始化配置文件,以添加到 SRX 系列防火墙上的 Sophos 服务器配置中。
[edit services] user@host# set ssl initiation profile ssl_init_prof client-certificate content_security_cert user@host# set ssl initiation profile ssl_init_prof actions ignore-server-auth-failure
-
将 SSL 初始化配置文件包含在 Sophos 服务器配置中。此配置是必需的,以使 SRX 系列防火墙能够启动与 Sophos 服务器的 HTTPS 会话以检查数据包。初始配置文件还会对进出 Sophos 服务器的数据包进行加密和解密。
[edit security] user@host# set utm default-configuration anti-virus sophos-engine server ssl-profile ssl_init_prof
-
定义用于安全策略的 SSL 代理配置文件。SLL 代理配置文件使 SRX 系列防火墙能够解密数据包以进行进一步的应用程序处理。
[edit services] user@host# set ssl proxy profile ssl_pr1 root-ca content_security_cert user@host# set ssl proxy profile ssl_pr1 actions ignore-server-auth-failure
-
定义功能配置文件,以指示 Sophos 防病毒软件应通过将配置文件附加到内容安全策略来检查的流量类型。您可以为不同的内容安全策略定义多个功能配置文件。
[edit security] user@host# set utm feature-profile anti-virus profile content_security_sav_fp
-
定义安全区域。
[edit security zones] user@host# set security-zone untrust description untrust user@host# set security-zone untrust host-inbound-traffic system-services all user@host# set security-zone untrust host-inbound-traffic protocols all user@host# set security-zone untrust interfaces ge-0/0/1.0 user@host# set security-zone trust description trust user@host# set security-zone trust host-inbound-traffic system-services all user@host# set security-zone trust host-inbound-traffic protocols all user@host# set security-zone trust interfaces ge-0/0/0.0 user@host# set security-zone internet description internet
-
定义内容安全策略并为其附加功能配置文件,以指示 Sophos 服务器应检查的流量类型。
[edit security utm] user@host# set utm-policy content_security_p1 anti-virus http-profile content_security_sav_fp user@host# set utm-policy content_security_p1 anti-virus ftp upload-profile content_security_sav_fp user@host# set utm-policy content_security_p1 anti-virus ftp download-profile content_security_sav_fp user@host# set utm-policy content_security_p1 anti-virus smtp-profile content_security_sav_fp user@host# set utm-policy content_security_p1 anti-virus pop3-profile content_security_sav_fp user@host# set utm-policy content_security_p1 anti-virus imap-profile content_security_sav_fp
-
定义安全策略并配置匹配标准以应用于不同安全区域之间的流量。
[edit security policies] user@host# set from-zone trust to-zone untrust policy p1 match source-address any user@host# set from-zone trust to-zone trust policy p1 match destination-address any user@host# set from-zone trust to-zone trust policy p1 match application any user@host# set from-zone trust to-zone trust policy p1 then permit application-services ssl-proxy profile-name ssl_pr1 user@host# set from-zone trust to-zone trust policy p1 then permit application-services utm-policy content_security_p1 user@host# set from-zone trust to-zone trust policy trust_to_internet match source-address any user@host# set from-zone trust to-zone trust policy trust_to_internet match destination-address any user@host# set from-zone trust to-zone trust policy trust_to_internet match application any user@host# set from-zone trust to-zone trust policy trust_to_internet then permit user@host# set default-policy permit-all
验证
提供用于验证此示例中功能的 show 命令列表。
命令 | 验证任务 |
---|---|
显示安全 UTM 防病毒状态 | 显示设备上安装的防病毒软件的类型和状态。 |
显示安全 UTM 防病毒统计信息 | 显示设备上防病毒软件的性能统计信息。 |
防病毒扫描引擎类型验证
目的
验证设备上安装的防病毒扫描引擎类型。
行动
在操作模式下,输入 show security utm anti-virus status 以查看已安装防病毒软件的状态。
user@host> show security utm anti-virus status UTM anti-virus status: Anti-virus key expire date: 2024-02-23 16:00:00 Forwarding-mode: continuous delivery Scan engine type: sophos-engine Scan engine information: running
意义
示例输出确认您的设备上有 Sophos 防病毒软件。
防病毒扫描引擎性能验证
目的
验证设备上的防病毒扫描引擎性能。
行动
在操作模式下,输入以查看 show security utm anti-virus statistics 设备上防病毒软件的性能统计信息。
user@host> show security utm anti-virus statistics UTM Anti Virus statistics: Intelligent-prescreening passed: 0 MIME-whitelist passed: 0 URL-whitelist passed: 0 Session abort: 0 Scan Request: Total Clean Threat-found Fallback 2 1 1 0 Fallback: Log-and-Permit Block Permit Engine not ready: 0 0 0 Out of resources: 0 0 0 Timeout: 0 0 0 Maximum content size: 0 0 0 Too many requests: 0 0 0 Decompress error: 0 0 0 Others: 0 0 0
意义
示例输出 Threat-found
值显示防病毒检测到 1 个威胁。其他统计信息值是安全的。
附录 1:在所有设备上设置命令
在所有设备上设置命令输出。
set security utm default-configuration anti-virus type sophos-engine set security utm default-configuration anti-virus forwarding-mode inline-tap set security utm default-configuration anti-virus scan-options no-uri-check set security utm default-configuration anti-virus sophos-engine server ssl-profile ssl_init_prof set security utm feature-profile anti-virus profile content_security_sav_fp set security utm utm-policy content_security_p1 anti-virus http-profile content_security_sav_fp set security utm utm-policy content_security_p1 anti-virus ftp upload-profile content_security_sav_fp set security utm utm-policy content_security_p1 anti-virus ftp download-profile content_security_sav_fp set security utm utm-policy content_security_p1 anti-virus smtp-profile content_security_sav_fp set security utm utm-policy content_security_p1 anti-virus pop3-profile content_security_sav_fp set security utm utm-policy content_security_p1 anti-virus imap-profile content_security_sav_fp set security zones security-zone untrust description untrust set security zones security-zone untrust host-inbound-traffic system-services all set security zones security-zone untrust host-inbound-traffic protocols all set security zones security-zone untrust interfaces ge-0/0/1.0 set security zones security-zone trust description trust set security zones security-zone trust host-inbound-traffic system-services all set security zones security-zone trust host-inbound-traffic protocols all set security zones security-zone trust interfaces ge-0/0/0.0 set security zones security-zone internet description internet set security policies from-zone trust to-zone untrust policy p1 match source-address any set security policies from-zone trust to-zone untrust policy p1 match destination-address any set security policies from-zone trust to-zone untrust policy p1 match application any set security policies from-zone trust to-zone untrust policy p1 then permit application-services ssl-proxy profile-name ssl_pr1 set security policies from-zone trust to-zone untrust policy p1 then permit application-services utm-policy content_security_p1 set security policies from-zone trust to-zone internet policy trust_to_internet match source-address any set security policies from-zone trust to-zone internet policy trust_to_internet match destination-address any set security policies from-zone trust to-zone internet policy trust_to_internet match application any set security policies from-zone trust to-zone internet policy trust_to_internet then permit set security policies default-policy permit-all set services ssl initiation profile ssl_init_prof client-certificate content_security-cert set services ssl initiation profile ssl_init_prof actions ignore-server-auth-failure set services ssl proxy profile ssl_pr1 root-ca content_security-cert set services ssl proxy profile ssl_pr1 actions ignore-server-auth-failure
附录 2:显示 DUT 上的配置输出
在 DUT 上显示命令输出。
在配置模式下,输入 show security utm
、 show interfaces
、 show security policies
show security zones
和show services ssl
命令来确认您的配置。如果输出未显示预期的配置,请重复此示例中的配置说明以进行更正。
user@host# show security utm default-configuration { anti-virus { type sophos-engine; forwarding-mode { inline-tap; } scan-options { no-uri-check; } sophos-engine { server { ssl-profile ssl_init_prof; } } } } utm-policy P1 { anti-virus { http-profile junos-sophos-av-defaults; } } utm-policy content_security_p1 { anti-virus { http-profile content_security_sav_fp; ftp { upload-profile content_security_sav_fp; download-profile content_security_sav_fp; } smtp-profile content_security_sav_fp; pop3-profile content_security_sav_fp; imap-profile content_security_sav_fp; } }
user@host# show show interfaces ge-0/0/0 { unit 0 { family inet { address 192.0.2.254/24; } } } ge-0/0/1 { unit 0 { family inet { address 203.0.113.254/24; } } }
user@host# show security zones security-zone untrust { description untrust; host-inbound-traffic { system-services { all; } protocols { all; } } interfaces { ge-0/0/1.0; } } security-zone trust { description trust; host-inbound-traffic { system-services { all; } protocols { all; } } interfaces { ge-0/0/0.0; } } security-zone internet { description internet; }
user@host# show security policies from-zone trust to-zone untrust { policy p1 { match { source-address any; destination-address any; application any; } then { permit { application-services { ssl-proxy { profile-name ssl_pr1; } utm-policy content_security_p1; } } } } } from-zone trust to-zone internet { policy trust_to_internet { match { source-address any; destination-address any; application any; } then { permit; } } } default-policy { permit-all; }
user@host# show services ssl initiation { profile ssl_init_prof { client-certificate content_security-cert; actions { ignore-server-auth-failure; } } } proxy { profile ssl_pr1 { root-ca content_security-cert; actions { ignore-server-auth-failure; } } }
管理 Sophos 防病毒数据文件
准备工作:
安装 Sophos 防病毒许可证。请参阅。Installation and Upgrade Guide
将 Sophos 配置为设备的防病毒功能。请参阅 示例:配置 Sophos 防病毒功能配置文件。要设置防病毒引擎类型,请运行
set security utm feature-profile anti-virus type sophos-engine
该语句。
在此示例中,您将安全设备配置为每 4320 分钟(每 3 天)自动更新一次数据文件。默认数据文件更新间隔为 1440 分钟(每 24 小时)。
要自动更新 Sophos 数据文件:
[edit security utm feature-profile anti-virus] user@host# set sophos-engine pattern-update interval 4320
以下命令在 CLI 操作模式下执行。
要手动更新数据文件:
user@host> request security utm anti-virus sophos-engine pattern-update
要手动重新加载数据文件:
user@host> request security utm anti-virus sophos-engine pattern-reload
要手动删除数据文件:
user@host> request security utm anti-virus sophos-engine pattern-delete
要检查防病毒状态,其中还显示数据文件版本:
user@host> show security utm anti-virus status
要检查代理服务器的状态:
user@host> show security utm anti-virus status
更改历史记录表
功能支持由您使用的平台和版本决定。使用 功能资源管理器 确定您的平台是否支持某个功能。