多应用+插件架构,代码干净,二开方便,首家独创一键云编译技术,文档视频完善,免费商用码云13.8K 广告
[TOC] # Logstash ArcSight模块 > <font color=#DC143C size=4>NOTE</font>:Logstash ArcSight模块是基础授权下的一个[X-Pack](https://www.elastic.co/products/x-pack)特性因此可以免费使用。联系arcsight@elastic.io获取更多信息。 Logstash的ArcSight模块让你能够轻松的将ArcSight的数据和Elastic Stack进行结合。通过一条命令,直接连接到ArcSight智能连接器或者事件代理,解析并存储安全事件到Elasticsearch中,并且安装了一套Kibana 仪表盘,让你可以立即浏览数据。 ## Prerequisite(前提) 这里假定你已经安装了Logstash,Elasticsearch和Kibana。这些产品都是可以下载的而且很容易安装。这个模块需要Elastic Stack5.6或者之后的版本以及X-Pack。如果你使用Elastic Stack6.2或更早的版本,请查看对应版本的[介绍](https://www.elastic.co/guide/en/logstash/6.2/arcsight-module.html)。(是不是有点懵逼,我也是,不过原文就是这样的。可能是写错了吧。The Elastic Stack 5.6 (or later) and X-Pack are required for this module. If you are using the Elastic Stack 6.2 and earlier, please see the [instructions](https://www.elastic.co/guide/en/logstash/6.2/arcsight-module.html) for those versions.) ## Deployment Architecture(架构部署?) Logstash的ArcSight模块理解CEF(Common Event Format),可以接收,丰富,索引这些事件以便Elastic Stack进行分析。ADP包含两个数据流的核心数据收集组件: + 智能连接器 *Smart Connectors*(SC)是边缘日志收集器,在将数据送到Logstash接收器之前解析并将数据规范化到CEF + 事件代理是传入数据的中心枢纽,基于开源的Apache Kafka。Logstash ArcSight模块可以直接使用事件代理Topic。The Logstash ArcSight module can consume directly from Event Broker topics. ## 智能连接器入门 首先,您可以使用基本的Elastic Stack设置,直接从智能连接器读取事件。 ![ArcSight Smart Connector architecture](https://www.elastic.co/guide/en/logstash/6.5/static/images/arcsight-diagram-smart-connectors.svg)Smart Connector has been configured to publish ArcSight data (to TCP port `5000`) using the CEF syslog destination. > <font color=#DC143C size=4>NOTE</font>:Logstash,Elasticsearch,和Kibana必须本地运行。注意你也可以将Logstash,Kibana和Elasticsearch运行在独立的主机上来从ArcSight获取数据。 ### 智能连接器用法说明 1. 在Logstash安装目录使用下面的命令启动Logstash ArcSight模块,注意使用自己的连接器主机和端口: ```bash bin/logstash --modules arcsight --setup \ -M "arcsight.var.input.smartconnector.port=smart_connect_port" \ -M "arcsight.var.elasticsearch.hosts=localhost:9200" \ -M "arcsight.var.kibana.host=localhost:5601" ``` The `--modules arcsight` option spins up an ArcSight CEF-aware Logstash pipeline for ingestion。`--setup`选项在Elasticsearch中创建了一个`arcsight-*`的索引并将其导入到Kibana仪表盘并可视化。接下来的模块运行或者需要水平扩展Logstash的时候,`--setup`选项无需再次指定以避免覆盖已经存在的Kibana仪表盘。 更多信息查看[Logstash ArcSight Module Configuration Options](https://www.elastic.co/guide/en/logstash/6.5/arcsight-module.html#arcsight-module-config)。 2. 用Kibana探索你的数据: a. 在浏览器中打开http://localhost:5601(用户名:“elastic”;密码:“YOUR_PASSWORD”) b. 打开**[ArcSight]**概览仪表盘 c. 有关数据探测的更多详细信息,请参见 [Exploring Your Security Data](https://www.elastic.co/guide/en/logstash/6.5/arcsight-module.html#exploring-data-arcsight)。 如果要指定控制ArcSight模块行为的其他选项,请参见 [Configuring the Module](https://www.elastic.co/guide/en/logstash/6.5/arcsight-module.html#configuring-arcsight) 。 ## 事件代理入门 首先,您可以使用基本的Elastic Stack设置,直接从智能连接器读取事件。 ![ArcSight Event Broker architecture](https://www.elastic.co/guide/en/logstash/6.5/static/images/arcsight-diagram-adp.svg) By default, the Logstash ArcSight module consumes from the Event Broker "eb-cef" topic. For additional settings, see [Logstash ArcSight Module Configuration Options](https://www.elastic.co/guide/en/logstash/6.5/arcsight-module.html#arcsight-module-config). Consuming from a secured Event Broker port is possible, see [Logstash ArcSight Module Configuration Options](https://www.elastic.co/guide/en/logstash/6.5/arcsight-module.html#arcsight-module-config). > <font color=#DC143C size=4>NOTE</font>:Logstash,Elasticsearch,和Kibana必须本地运行。注意你也可以将Logstash,Kibana和Elasticsearch运行在独立的主机上来从ArcSight获取数据。 ### 事件代理使用说明 1. 在Logstash安装目录使用下面的命令启动Logstash ArcSight模块,注意使用自己的事件代理主机和端口: ```bash bin/logstash --modules arcsight --setup \ -M "arcsight.var.input.eventbroker.bootstrap_servers=event_broker_host:event_broker_port" \ -M "arcsight.var.elasticsearch.hosts=localhost:9200" \ -M "arcsight.var.kibana.host=localhost:5601" ``` The `--modules arcsight` option spins up an ArcSight CEF-aware Logstash pipeline for ingestion。`--setup`选项在Elasticsearch中创建了一个`arcsight-*`的索引并将其导入到Kibana仪表盘并可视化。接下来的模块运行或者需要水平扩展Logstash的时候,`--setup`选项无需再次指定以避免覆盖已经存在的Kibana仪表盘。 查看[Logstash ArcSight Module Configuration Options](https://www.elastic.co/guide/en/logstash/6.5/arcsight-module.html#arcsight-module-config) 获取更多信息。 2. 用Kibana探索你的数据: a. 在浏览器中打开http://localhost:5601(用户名:“elastic”;密码:“YOUR_PASSWORD”) b. 打开**[ArcSight]**概览仪表盘 c. 有关数据探测的更多详细信息,请参见 [Exploring Your Security Data](https://www.elastic.co/guide/en/logstash/6.5/arcsight-module.html#exploring-data-arcsight)。 如果要指定控制ArcSight模块行为的其他选项,请参见 [Configuring the Module](https://www.elastic.co/guide/en/logstash/6.5/arcsight-module.html#configuring-arcsight) 。 ## 探索你的安全数据 一旦Logstash ArcSight模块开始接收事件,你就可以立即开始使用Kibana仪表盘来浏览和可视化您的安全数据。仪表盘极大减少了安全分析师和operators了解情况需要的时间。网络活动,endpoint,和DNS事件。你可以保持仪表盘的状态或者根据自己的用例以及需求进行定制。原文:The dashboards rapidly accelerate the time and effort required for security analysts and operators to gain situational and behavioral insights on network, endpoint, and DNS events flowing through the environment. You can use the dashboards as-is, or tailor them to work better with existing use cases and business requirements. 仪表盘有一个导航面板,可用于在三个核心使用情形中进行切换和深入查看: + **Network Data** + 面板:网络概览,可疑网络活动 + 数据类型:网络防火墙,intrusion systems(入侵系统),VPN设备 + **Endpoint Data** + 面板:Endpoint概览,Endpoint OS Activity + 数据类型:操作系统,应用程序,host intrusion systems + **DNS Data** + 面板:Microsoft DNS Overview + 数据类型: Microsoft DNS devices ### Network仪表盘示例 ![Network overview dashboard](<https://www.elastic.co/guide/en/logstash/6.5/static/images/arcsight-network-overview.png>) ![Network suspicious activity dashboard](https://www.elastic.co/guide/en/logstash/6.5/static/images/arcsight-network-suspicious.png) 这些Kibana可视化能够使你快速了解顶级设备、端点、攻击者和目标。这种洞察力以及即时深入挖掘特定主机,端口,设备或时间范围的能力,提供了整个环境的整体视图,以识别可能需要立即关注或操作的特定数据段。您可以轻松找到以下问题的答案: + 谁是攻击者,他们的目标是什么? + 我的哪些设备及endpoints负载最高以及它们提供的什么服务。 + 在指定的时间点触发了多少特定的攻击者、技术、签名或目标? + 导致故障次数增加的主要来源、目标、协议和行为是什么? ## 配置模块 你可以在`logstash.yml`文件中为Logstash ArcSight模块指定额外的选项或者通过命令行进行覆盖。更多关于配置模块的信息,参考[*使用Logstash模块。*](https://www.elastic.co/guide/en/logstash/6.5/logstash-modules.html). 作为示例,下面的设置可以附加到`logstash.yml`来配置你的模块: ```yaml modules: - name: arcsight var.input.eventbroker.bootstrap_servers: "eb_host:39092" var.input.eventbroker.topics: "eb_topic" var.elasticsearch.host: "localhost:9200" var.elasticsearch.password: "YOUR_PASSWORD" var.kibana.host: "locarlhost:5601" var.kibana.username: "elastic" var.kibana.password: "YOUR_PASSWORD" ``` ### Logstash ArcSight模块配置选项 ArcSight模块提供了下面的设置来配置模块的行为。 这些设置包括特定于ArcSight的选项以及所有Logstash模块支持的通用选项。 当你在命令行覆盖设定的时候,记得在设置前面加上模块名,比如,使用`arcsight.var.inputs`而不是`var.inputs`。 如果不指定配置设置,Logstash将使用默认值。 #### ArcSight模块选项 `var.inputs` + 值的类型是[string](https://www.elastic.co/guide/en/logstash/6.5/configuration-file-structure.html#string) + 默认值是“eventbroker” 为LogstashArcSight模块设置要暴露的input(s)。可用的设置为包括"eventbroker","smartconnector",或者"eventbroker,smartconnector"(同事暴露它们)。 Set the input(s) to expose for the Logstash ArcSight module. Valid settings are "eventbroker", "smartconnector", or "eventbroker,smartconnector" (exposes both inputs concurrently). #### ArcSight模块事件代理特定选项 `var.input.eventbroker.bootstrap_servers` + 值的类型是 [string](https://www.elastic.co/guide/en/logstash/6.5/configuration-file-structure.html#string) + 默认值是“localhost:39092” 用于建立与群集的初始连接的Event Broker URL列表。 此列表应采用`host1:port1`,`host2:port2`的形式。 这些URL仅用于初始连接以发现完整的集群成员(可能会动态更改)。 此列表不需要包含完整的服务器集。 (如果服务器关闭,您可能需要多个。) A list of Event Broker URLs to use for establishing the initial connection to the cluster. This list should be in the form of `host1:port1,host2:port2`. These URLs are just used for the initial connection to discover the full cluster membership (which may change dynamically). This list need not contain the full set of servers. (You may want more than one in case a server is down.) `var.input.eventbroker.topics` + 值的类型是[array](https://www.elastic.co/guide/en/logstash/6.5/configuration-file-structure.html#array) + 默认值是["eb-cef"] A list of Event Broker topics to subscribe to. `var.input.eventbroker.security_protocol` + 可用的值:`PLAINTEXT`,`SSL`,`SASL_PLAINTEXT`,`SASL_SSL` + 默认值是:`PLAINTEXT` 使用的安全协议,可以是 PLAINTEXT, SSL, SASL_PLAINTEXT, SASL_SSL中的任何一个。如果指定除PLAINTEXT以外的任何内容,则还需要指定下面列出的一些选项。当指定`SSL`或`SASL_SSL`,你需要给以`ssl_`开头的选项指定值,当指定`SASL_PLAINTEXT`或`SASL_SSL`,你需要给`jaas_path`, `kerberos_config`, `sasl_mechanism` 和`sasl_kerberos_service_name`指定值。 `var.input.eventbroker.ssl_key_password` + 值的类型为[password](https://www.elastic.co/guide/en/logstash/6.5/configuration-file-structure.html#password) + 此选项没有默认值 Key store文件中私钥的密码 `var.input.eventbroker.ssl_keystore_location` + 值的类型是[path](https://www.elastic.co/guide/en/logstash/6.5/configuration-file-structure.html#path) + 此选项没有默认值 如果需要客户端身份验证,则此设置存储keystore路径。 `var.input.eventbroker.ssl_keystore_password` + 值类型是[password](https://www.elastic.co/guide/en/logstash/6.5/configuration-file-structure.html#password) + 此选项没有默认值 如果需要客户端身份验证,则此设置存储keystore密码。 `var.input.eventbroker.ssl_keystore_type` + 值类型是[string](https://www.elastic.co/guide/en/logstash/6.5/configuration-file-structure.html#string) + 此选项没有默认值 Keystore的类型 `var.input.eventbroker.ssl_truststore_location` + 值类型是[path](https://www.elastic.co/guide/en/logstash/6.5/configuration-file-structure.html#path) + 此选项没有默认值 用于验证Kafka代理证书的JKS信任库路径。 `var.input.eventbroker.ssl_truststore_password` + 值类型是[password](https://www.elastic.co/guide/en/logstash/6.5/configuration-file-structure.html#password) + 此选项没有默认值 Truststore密码 `var.input.eventbroker.ssl_truststore_type` + 值类型是[string](https://www.elastic.co/guide/en/logstash/6.5/configuration-file-structure.html#string) + 此选项没有默认值 Truststore 类型 `var.input.eventbroker.sasl_keyberos_service_name` + 值类型是[string](https://www.elastic.co/guide/en/logstash/6.5/configuration-file-structure.html#string) + 此选项没有默认值 The Kerberos principal name that Kafka broker runs as。可以在Kafka的JAAS配置或Kafka配置中定义。 `var.input.eventbroker.sasl_mechanism` + 值类型是[string](https://www.elastic.co/guide/en/logstash/6.5/configuration-file-structure.html#string) + 默认值是`"GSSAPI"` 用于客户端连接的[SASL机制](http://kafka.apache.org/documentation.html#security_sasl)。这可以是安全提供者可用的任何机制。 GSSAPI是默认机制。 `var.input.eventbroker.jaas_path` + 值类型是[path](https://www.elastic.co/guide/en/logstash/6.5/configuration-file-structure.html#path) + 此选项没有默认值 Java身份验证和授权服务(JAAS)API,给Kafka提供用户身份验证和授权服务。这个设定提供JAAS文件的路径。Kafka客户端JAAS文件示例: ```java KafkaClient { com.sun.security.auth.module.Krb5LoginModule required useTicketCache=true renewTicket=true serviceName="kafka"; }; ``` 请注意,这里指定的`jaas_path`和`kerberos_config`将被添加到JVM全局设定。 这意味着如果你又多个Kafka inputs,他们将会共享同样的`jaas_path`和`kerberos_config`。如果这不符合预期,你需要在不同的JVM实例运行不同的Logstash实例。 `var.input.eventbroker.kerberos_config` + 值类型是[path](https://www.elastic.co/guide/en/logstash/6.5/configuration-file-structure.html#path) + 此选项没有默认值 Optional path to kerberos config file. This is krb5.conf style as detailed in <https://web.mit.edu/kerberos/krb5-1.12/doc/admin/conf_files/krb5_conf.html> #### ArcSight Module Smart Connector specific Options `var.input.smartconnector.port` + 值类型是[number](https://www.elastic.co/guide/en/logstash/6.5/configuration-file-structure.html#number) + 默认值是5000 从SCs接收数据监听的TCP端口 `var.input.smartconnector.ssl_enable` + 值类型是[boolean](https://www.elastic.co/guide/en/logstash/6.5/configuration-file-structure.html#boolean) + 默认值是`false` 开启SSL(必须设置其他`ssl_`选项才能生效) `var.input.smartconnector.ssl_cert` + 值类型是[path](https://www.elastic.co/guide/en/logstash/6.5/configuration-file-structure.html#path) + 此选项没有默认值 SSL证书路径 `var.input.smartconnector.ssl_extra_chain_certs` + 值类型是[array](https://www.elastic.co/guide/en/logstash/6.5/configuration-file-structure.html#array) + 默认值是`[]` 要添加到证书链的额外X509证书的路径数组。 在系统存储中不需要CA链时很有用。 An Array of paths to extra X509 certificates to be added to the certificate chain. Useful when the CA chain is not necessary in the system store. `var.input.smartconnector.ssl_key` + 值类型是[path](https://www.elastic.co/guide/en/logstash/6.5/configuration-file-structure.html#path) + 从选项没有默认值 SSL key 路径 `var.input.smartconnector.ssl_key_passphrase` + 值类型是[password](https://www.elastic.co/guide/en/logstash/6.5/configuration-file-structure.html#password) + 默认值是`nil` SSL key passphrase(密码) `var.input.smartconnector.ssl_verify` + 值类型是[boolean](https://www.elastic.co/guide/en/logstash/6.5/configuration-file-structure.html#boolean) + 默认值是`true` 根据CA验证SSL连接的另一端的身份。对于input,将字段sslSubject设置为客户端证书的字段。 #### Common options(公共选项) 下面这些配置选项支持所有的模块: `var.elasticsearch.hosts` + 值类型是[uri](https://www.elastic.co/guide/en/logstash/6.5/configuration-file-structure.html#uri) + 默认值是"localhost:9200" 设置Elasticsearch集群的host(s)。每个host都需要指定hostname和port。例如,"myhost:9200"。如果给定一个 [array](https://www.elastic.co/guide/en/logstash/6.5/configuration-file-structure.html#array),Logstash会在指定的hosts参数中进行均衡访问。从主机列表中排除[专用主节点](https://www.elastic.co/guide/en/elasticsearch/reference/6.5/modules-node.html)非常重要,以防止Logstash向主节点发送批量请求。因此,此参数应仅引用Elasticsearch中的数据或客户端节点。 URLs出现的特殊字符必须进行转义!这意味着 # 应该以 %23 的形式输入。 `var.elasticsearch.username` + 值类型是[string](https://www.elastic.co/guide/en/logstash/6.5/configuration-file-structure.html#string) + 默认值是"elastic" 一个安全Elasticsearch集群的用户名 `var.elasticsearch.password` + 值类型是[string](https://www.elastic.co/guide/en/logstash/6.5/configuration-file-structure.html#string) + 默认值是"changeme"(更改我) 一个安全Elasticsearch集群的密码 `var.elasticsearch.ssl.enabled` + 值类型是[boolean](https://www.elastic.co/guide/en/logstash/6.5/configuration-file-structure.html#boolean) + 此选项没有默认值 给Elasticsearch集群开启SSL/TLS安全通信。此处不指定则使用在`hosts`中指定的方案。如果`hosts`中不指定,则使用HTTP。如果此处禁用SSL,同时在`hosts`中提供HTTPS URL,则插件将拒绝启动。 `var.elasticsearch.ssl.verification_mode` + 值类型是[string](https://www.elastic.co/guide/en/logstash/6.5/configuration-file-structure.html#string) + 默认值是"strict" 与Elasticsearch通信时的主机名验证设置。设置为`disable`来关闭主机名验证。关闭此选项将带来极大的安全风险。 `var.elasticsearch.ssl.certificate_authority` + 值类型是 [string](https://www.elastic.co/guide/en/logstash/6.5/configuration-file-structure.html#string) + 此选项没有默认值 与Elasticsearch通信时用于验证SSL证书的X.509证书的路径。 `var.elasticsearch.ssl.certificate` + 值类型是[string](https://www.elastic.co/guide/en/logstash/6.5/configuration-file-structure.html#string) + 此选项没有默认值 与Elasticsearch通信时用于客户端验证的X.509证书的路径。 `var.elasticsearch.ssl.key` + 值类型是[string](https://www.elastic.co/guide/en/logstash/6.5/configuration-file-structure.html#string) + 此选项没有默认值 与Elasticsearch通信时用于客户端验证的证书key的路径。 `var.kibana.host` + 值类型是[string](https://www.elastic.co/guide/en/logstash/6.5/configuration-file-structure.html#string) + 默认值是"localhost:5601" 设置用来导出dashboards和visualizations的Kibana所在实例的主机名和端口。比如:"myhost:5601"。 `var.kibana.scheme` - 值类型是[string](https://www.elastic.co/guide/en/logstash/6.5/configuration-file-structure.html#string) - 默认值是"http" 设置访问Kibana实例的协议。可选项包括:"http"和"https"。默认是"http"。 `var.kibana.username` - 值类型是[string](https://www.elastic.co/guide/en/logstash/6.5/configuration-file-structure.html#string) - 默认值是"elastic" 安全Kibana实例认证所需用户名 `var.kibana.password` - 值类型是[string](https://www.elastic.co/guide/en/logstash/6.5/configuration-file-structure.html#string) - 默认值是"changeme" 安全Kibana实例认证所需密码 `var.kibana.ssl.enabled` - 值类型是[boolean](https://www.elastic.co/guide/en/logstash/6.5/configuration-file-structure.html#boolean) - 默认值是`false` 开启Kibana的SSL/TLS访问。 `var.kibana.ssl.verification_mode` - 值类型是[string](https://www.elastic.co/guide/en/logstash/6.5/configuration-file-structure.html#string) - 默认值是"strict" 与kibana通信时的主机名验证设置。设置为`disable`来关闭主机名验证。关闭此选项将带来极大的安全风险。 `var.kibana.ssl.certificate_authority` - 值类型是[string](https://www.elastic.co/guide/en/logstash/6.5/configuration-file-structure.html#string) - 此选项没有默认值 与Kibana通信时用于验证SSL证书的X.509证书的路径。 `var.kibana.ssl.vertificate` - 值类型是[string](https://www.elastic.co/guide/en/logstash/6.5/configuration-file-structure.html#string) - 此选项没有默认值 与kibana通信时用于客户端验证的X.509证书的路径。 `var.kibana.ssl.key` - 值类型是[string](https://www.elastic.co/guide/en/logstash/6.5/configuration-file-structure.html#string) - 此选项没有默认值 与Kibana通信时用于客户端验证的证书key的路径。