搭建过程可以直接看官方文档,我就直接使用官方自带的虚拟机进行测试,虚拟机里面已经集成了多种服务
server端IP:192.168.17.135
我在另外一台的ubuntu的虚拟机安装agent与server端进行连接。
客户端配置服务端的IP和端口,其中端口有两种1514/udp和1515/tcp
客户端就可以连接到服务端




Overview
Security events
安全日志的仪表台


Integrity monitoring
这个是文件完整性监控页面,这是默认的,没有结果
Policy monitoring
这个是监控系统的配置文件是否合乎安全配置基线
System auditing
审计用户行为,监控命令执行情况和对查看机密文件进行报警
Vulnerabilities
发现系统应用已知的漏洞

Management
Ruleset
这些都是rule检测规则

Groups
可以对客户端进行分组


Configuration
这个选项是管理集群的配置,我就不说了,因为我用的是单机
Status
展示集群状态
Logs
各种各样的日志
Cluster
我没有开启集群
Agents
查看主机的存活,服务器的信息
点击ubuntu机器,有着更加细化的日志展示

实战演练
安全日志
使用hydra对agent机器进行ssh爆破,可以看到ossec监控到爆破日志


文件完整性
找到了监控的位置,我们去/bin目录下用vim随便插入一些字符,看看会不会检测到



rootkit监控


当我执行病毒的时候,我发现这个功能没有日志,日志都在完整性监控那里
SCA
SCA检测那里,直接就有了
system aduiting
关于这个功能,我有点迷,我是这样测试的
我创建一个test用户,进去查看passwd,shadow文件,进去root目录,删除root目录
按照说,这个用户在搞事,应该记录他的行为,但是我在这个功能没有看到日志
Vulnerabilities
在配置文件那里启动这个功能,保存之后,重新启动服务
Osquery
server端ossec.conf配置
<wodle name="osquery">
<disabled>no</disabled>
<run_daemon>yes</run_daemon>
<bin_path>/usr/bin</bin_path>
<log_path>/var/log/osquery/osqueryd.results.log</log_path>
<config_path>/etc/osquery/osquery.conf</config_path>
<add_labels>no</add_labels>
<pack name="custom_pack">/path/to/custom_pack.conf</pack>
</wodle>
agent和server安装osquery
安装文档,https://documentation.wazuh.com/3.8/user-manual/capabilities/osquery.html?highlight=osquery
export OSQUERY_KEY=1484120A(c屏蔽)(4屏蔽)E9F8A1A577AEEE97A80C63C9D8B80B
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys $OSQUERY_KEY
add-apt-repository 'deb [arch=amd64] https://pkg.osquery.io/deb deb main'
apt-get update -y
apt-get install -y osquery
curl -L https://pkg.osquery.io/rpm/GPG | tee /etc/pki/rpm-gpg/RPM-GPG-KEY-osquery
yum-config-manager --add-repo https://pkg.osquery.io/rpm/osquery-s3-rpm.repo
yum-config-manager --enable osquery-s3-rpm
yum install osquery
复制osquery配置文件
cp /usr/share/osquery/osquery.example.conf /etc/osquery/osquery.conf
启动osquery


virustotal
首先去官网注册账号,获取到api key

<ossec_config>
<integration>
<name>virustotal</name>
<api_key>API_KEY</api_key> <!-- Replace with your VirusTotal API key -->
<group>syscheck</group>
<alert_format>json</alert_format>
</integration>
</ossec_config>
我将下载挖矿病毒到opt目录下(AGENT)

触发的警报将记录在integration.log文件中,并alerts.log与所有其他警报一起存储在文件中。

来源:freebuf.com 2019-11-30 15:57:50 by: 陌度
Overview
Integrity monitoring
Policy monitoring
System auditing
Vulnerabilities
Groups
Configuration
Logs
Cluster 





文件完整性
rootkit监控

system aduiting







