建议使用Chrome浏览器访问!
技术支持
互动社区
学习培训
深信服官网
合作伙伴

安全态势感知管理平台SIP/探针STA

关注
深信服安全感知平台(简称SIP)是一款面向全行业的大数据安全分析平台,旨在为用户构建一套集检测、可视、响应于一体的本地安全大脑,让安全可感知、易运营,更有价值。

内网DNS服务器场景
  • 阅读权限:游客
  • 下载
  • 分享
  • 收藏

更新时间:2023-05-25

  说明:

当探针收到镜像数据是内网DNS代理后的数据时,会将DNS服务器判断为风险主机或业务,无法定位到真实的问题业务。

思路:镜像内网DNS代理之前的数据,及PC或业务到内网DNS这段的数据。抓内网DNS服务器地址和53端口的数据包。

  1. 若内网DNS服务器IP即为源,又为目的,说明DNS服务器前后的流量都镜像到了,需要将DNS服务器地址作为源地址加入安全白名单。
  2. 若内网DNS服务器IP只为目的,说明镜像的流量都是DNS服务器之前的流量,则表明镜像正确。
  3. 若内网DNS服务器IP只为源,则表明镜像的数据只有代理后的,需要重新镜像,如果由于实际网络环境等其他客观原因无法调整镜像位置的,需要按照通过其他手段将DNS服务器的日志发送给SIP(SIEM模块),同时将DNS服务器作为源地址加入到白名单,下面按照这种思路展开说明。
    1. Windows DNS服务器

预置条件说明

SIP3.0.53及以上版本并支持siem接入;

Siem有接入授权;

仅支持windows server2008windows server 2012DNS服务器

客户同意服务器可安装nxlog

步骤1.配置DNS服务器资产

登录SIP,在[资产感知/资产管理/主机资产]页面,确保DNS主机的类型配置正确,如下图所示。

步骤2.SIEM分析系统新增采集器

SIP[SIEM分析系统/采集器管理页面],点击<新增>,如下图所示,配置好DNS服务器的IP地址,类型选择“DNS Log

步骤3.配置DNS服务器生成DNS日志(DNS服务器上操作)

1. 如果DNS服务器上没有“服务器管理器”,在控制面板\程序\打开或关闭Windows功能,将服务器管理器勾选上。

2.打开服务器管理器,点击服务器管理器-角色-dns服务器-服务器名称,右键进入属性编辑框,点击“属性”

3. 配置“调试日志”,勾选以下几项:

注:1.需要勾选图上勾了的几项。2.需要指定日志文件路径和名称

步骤4.安装nxlog工具(DNS服务器上操作)

DNS服务器上安装我们提供的nxlog安装包,默认会安装在C:\Program Files (x86)\nxlog\,然后修改其配置文件C:\Program Files (x86)\nxlog\conf\nxlog.conf,在该文件的最下方,新增以下内容:

<Input in>

Module      im_file

File        'C:\Program Files (x86)\dns.log'(注意这个地方就是上文配的日志路径)

</Input>

<Output out>

Module      om_udp

Host        10.10.10.10(注意这个地方要改成客户的SIPip地址)

Port        514

</Output>

<Route route>

Path      in => out

</Route>

最终效果如下图所示(若编辑不成功,可能需要用管理员权限的记事本打开才能编辑)

步骤5.启动nxlog插件

用管理员权限打开cmd,运行sc start nxlog,即可启动nxlog

步骤6.DNS服务器作为源地址添加到安全白名单,避免通过STA等其他设备发送过来的日志导致DNS服务器报失陷。

后续可以观察SIP的第三方日志以及安全事件,只要客户把内网主机都在资产感知模块配置正确,DNS代理误判的问题即可解决。

插件影响说明

Nxlog是一个独立运行的开源组件,不影响其他系统功能,对系统资源的占用很少

回退操作

Nxlog是一个独立运行的开源组件,直接卸载nxlog即可

16.3.1.2.Linux DNS服务器

步骤1.资产感知需要配置DNS服务器

登录SIP,在[资产感知/资产管理/主机资产]页面,确保DNS主机的类型配置正确,如下图所示。

步骤2.SIEM分析系统里新增采集器

SIPSIEM分析系统->日志源对接页面,点击新增,如下图所示,配置好DNS服务器的IP地址,类型选择“DNS Linux”,最后点击“确定”

步骤3.修改DNS服务器的配置文件(在DNS服务器上操作)

1、使用xshell或其它工具进入dns服务器的后台;

2、先对/etc/named.conf文件做备份,执行命令vi /etc/named.conf编辑文件内容,在文件里新增一段配置,用于将dns请求日志记录并转发给syslog,文件内容如下所示,红色字体高亮显示的部分就是我们编辑时需要新加的部分。

//

// named.conf

//

// Provided by Red Hat bind package to configure the ISC BIND named(8) DNS

// server as a caching only nameserver (as a localhost DNS resolver only).

//

// See /usr/share/doc/bind*/sample/ for example named configuration files.

//

// See the BIND Administrator's Reference Manual (ARM) for details about the

// configuration located in /usr/share/doc/bind-{version}/Bv9ARM.html

options {

              listen-on port 53 { any; };

              listen-on-v6 port 53 { ::1; };

              directory               "/var/named";

              dump-file               "/var/named/data/cache_dump.db";

              statistics-file "/var/named/data/named_stats.txt";

              memstatistics-file "/var/named/data/named_mem_stats.txt";

              recursing-file  "/var/named/data/named.recursing";

              secroots-file   "/var/named/data/named.secroots";

              allow-query     { any; };

              /*

               - If you are building an AUTHORITATIVE DNS server, do NOT enable recursion.

               - If you are building a RECURSIVE (caching) DNS server, you need to enable

                 recursion.

               - If your recursive DNS server has a public IP address, you MUST enable access

                 control to limit queries to your legitimate users. Failing to do so will

                 cause your server to become part of large scale DNS amplification

                 attacks. Implementing BCP38 within your network would greatly

                 reduce such attack surface

              */

              recursion yes;

              dnssec-enable yes;

              dnssec-validation yes;

              /* Path to ISC DLV key */

              bindkeys-file "/etc/named.root.key";

              managed-keys-directory "/var/named/dynamic";

              pid-file "/run/named/named.pid";

              session-keyfile "/run/named/session.key";

};

logging {

        channel default_debug {

                file "data/named.run";

                severity dynamic;

        };

        channel query_log {

                      syslog local3;

                      severity   info;

                      print-time   yes;

                      print-category  yes;

        };

        category    queries  {  query_log;  };

};

zone "." IN {

              type hint;

              file "named.ca";

};

include "/etc/named.rfc1912.zones";

include "/etc/named.root.key";

3、执行命令systemctl restart named,用于重启dns服务;

4、执行命令vi /etc/rsyslog.conf编辑文件内容,用于将dns的日志转发给SIP,文件内容如下所示,红色字体高亮显示的部分就是我们编辑时需要新加的部分。

# rsyslog configuration file

# For more information see /usr/share/doc/rsyslog-*/rsyslog_conf.html

# If you experience problems, see http://www.rsyslog.com/doc/troubleshoot.html

#### MODULES ####

# The imjournal module bellow is now used as a message source instead of imuxsock.

$ModLoad imuxsock # provides support for local system logging (e.g. via logger command)

$ModLoad imjournal # provides access to the systemd journal

#$ModLoad imklog # reads kernel messages (the same are read from journald)

#$ModLoad immark  # provides --MARK-- message capability

# Provides UDP syslog reception

#$ModLoad imudp

#$UDPServerRun 514

# Provides TCP syslog reception

#$ModLoad imtcp

#$InputTCPServerRun 514

#### GLOBAL DIRECTIVES ####

# Where to place auxiliary files

$WorkDirectory /var/lib/rsyslog

# Use default timestamp format

$ActionFileDefaultTemplate RSYSLOG_TraditionalFileFormat

# File syncing capability is disabled by default. This feature is usually not required,

# not useful and an extreme performance hit

#$ActionFileEnableSync on

# Include all config files in /etc/rsyslog.d/

$IncludeConfig /etc/rsyslog.d/*.conf

# Turn off message reception via local log socket;

# local messages are retrieved through imjournal now.

$OmitLocalLogging on

# File to store the position in the journal

$IMJournalStateFile imjournal.state

#### RULES ####

# Log all kernel messages to the console.

# Logging much else clutters up the screen.

#kern.*                                                 /dev/console

# Log anything (except mail) of level info or higher.

# Don't log private authentication messages!

*.info;mail.none;authpriv.none;cron.none                /var/log/messages

# The authpriv file has restricted access.

authpriv.*                                              /var/log/secure

# Log all the mail messages in one place.

mail.*                                                  -/var/log/maillog

# Log cron stuff

cron.*                                                  /var/log/cron

# Everybody gets emergency messages

*.emerg                                                 :omusrmsg:*

# Save news errors of level crit and higher in a special file.

uucp,news.crit                                          /var/log/spooler

# Save boot messages also to boot.log

local7.*                                                /var/log/boot.log

# ### begin forwarding rule ###

# The statement between the begin ... end define a SINGLE forwarding

# rule. They belong together, do NOT split them. If you create multiple

# forwarding rules, duplicate the whole block!

# Remote Logging (we use TCP for reliable delivery)

#

# An on-disk queue is created for this action. If the remote host is

# down, messages are spooled to disk and sent when it is up again.

#$ActionQueueFileName fwdRule1 # unique name prefix for spool files

#$ActionQueueMaxDiskSpace 1g   # 1gb space limit (use as much as possible)

#$ActionQueueSaveOnShutdown on # save messages to disk on shutdown

#$ActionQueueType LinkedList   # run asynchronously

#$ActionResumeRetryCount -1    # infinite retries if host is down

# remote host is: name/ip:port, e.g. 192.168.0.1:514, port optional

#*.* @@remote-host:514

local3.* @10.222.3.146:514

# ### end of the forwarding rule ###

注意:这一行的意思是“发送给SIPip地址的514端口”,这里的ip地址一定要改成客户的SIPip地址。

5、执行命令systemctl restart rsyslog,用于重启rsyslog服务,之后SIP就能收到dns日志了。

步骤4.DNS服务器作为源地址添加到安全白名单,避免通过STA等其他设备发送过来的日志导致DNS服务器报失陷。

步骤5.后续可以观察SIP的第三方日志以及安全事件,只要客户把内网主机都在资产感知模块配置正确,DNS代理误判的问题即可解决。

文档让我的问题处理变得简单了
选择标签:
更多意见:
手机号码:
如果未能解决您的问题,您可以使用 在线客服 寻求帮助
在线客服
您当前处于未登录状态,资料搜索或查找可能会不全面,请登录后以查找更全面的内容注册登录