…………省略编译输出…………
安装完成将会输出以下:
- 系统类型是 Redhat Linux. - 修改启动脚本使 OSSEC HIDS 在系统启动时自动运行- 已正确完成系统配置. - 要启动 OSSEC HIDS: /var/ossec/bin/ossec-control start - 要停止 OSSEC HIDS: /var/ossec/bin/ossec-control stop - 要查看或修改系统配置,请编辑 /var/ossec/etc/ossec.conf 感谢使用 OSSEC HIDS. 如果您有任何疑问,建议或您找到任何bug, 请通过 contact@ossec.net 或邮件列表 ossec-list@ossec.net 联系我们.( http://www.ossec.net/en/mailing_lists.html ). 您可以在 http://www.ossec.net 获得更多信息 --- 请按 ENTER 结束安装 (下面可能有更多信息). --- - 为使代理能够联接服务器端, 您需要将每个代理添加到服务器. 允许'manage_agents'来添加活删除代理: /var/ossec/bin/manage_agents 详细信息请参考:http://www.ossec.net/en/manual.html#ma2.9、启用数据库支持:
/var/ossec/bin/ossec-control enable database2.9.1、然后导入MySQL表结构到MySQL中
mysql -uossec -p ossec < ./src/os_dbd/mysql.schema2.9.2、修改部分配置文件的权限,否则会启动服务失败:
chmod u+w /var/ossec/etc/ossec.conf2.9.3、然后我们编辑/var/ossec/etc/ossec.conf文件,在ossec_config中添加如下MySQL配置:
<database_output> <hostname>108.61.119.62</hostname> <username>ossec</username> <password>ossec</password> <database>ossec</database> <type>mysql</type> </database_output>2.9.4、OSSEC支持接受远程机器的syslog,所以还需要对ossec.conf文件中的syslog部分进行配置,修改/var/ossec/etc/ossec.conf文件,按照下面的内容进行修改,把我们的客户端(Agent)的网段可以全添加进去:
<remote> <connection>syslog</connection> <allowed-ips>192.168.0.0/16</allowed-ips> </remote>

文章插图
2.9.5、 服务器上添加客户端,创建客户端Key
执行如下命令:
[root@vultr etc]# /var/ossec/bin/manage_agents***************************************** OSSEC HIDS v2.8 Agent manager. ** The following options are available: ***************************************** (A)dd an agent (A). (E)xtract key for an agent (E). (L)ist already added agents (L). (R)emove an agent (R). (Q)uit.Choose your action: A,E,L,R or Q: A- Adding a new agent (use 'q' to return to the main menu). Please provide the following: * A name for the new agent: ossec-agent * The IP Address of the new agent: 192.168.80.32 * An ID for the new agent[001]: 001Agent information: ID:001 Name:ossec-agent IP Address:192.168.80.32Confirm adding it?(y/n): YAgent added.***************************************** OSSEC HIDS v2.8 Agent manager. ** The following options are available: ***************************************** (A)dd an agent (A). (E)xtract key for an agent (E). (L)ist already added agents (L). (R)emove an agent (R). (Q)uit.Choose your action: A,E,L,R or Q: E Available agents:ID: 001, Name: ossec-agent, IP: 192.168.80.32Provide the ID of the agent to extract the key (or 'q' to quit): 001Agent key information for '001' is: MDAxIG9zc2VjLWFnZW50IDE5Mi4xNjguODAuMzIgZTU4ZThhMWU3YTZjYzhhMzVlYmQwNDg1YWQxZjhkMGU2YTIxM2QyZGZjYjE3NTdmZDczMWJhYjEwM2FkZmUyNw==** Press ENTER to return to the main menu.?客户的Key,用于后面的客户端的连接,需要记录保存 。
2.9.6、 启动ossec服务端,到此安装完成
[root@vultr etc]# /var/ossec/bin/ossec-control startStarting OSSEC HIDS v2.8 (by Trend Micro Inc.)...Started ossec-dbd...2019/04/05 19:59:01 ossec-maild: INFO: E-Mail notification disabled. Clean Exit.Started ossec-maild...Started ossec-execd...Started ossec-analysisd...Started ossec-logcollector...Started ossec-remoted...Started ossec-syscheckd...Started ossec-monitord...Completed.
推荐阅读
- Windows环境黑客入侵应急与排查
- 黑客必学知识点---APT攻击详解
- 中国顶级黑客在国际上是什么样的水平?
- “黑客必杀技”Redis未授权访问漏洞的完美复现
- 黑客“御用”扫描神器W3AF
- 光腿神器硬了 奶油巴士光腿神器是牌子吗
- Mac系统小而高效的触摸板增强神器
- HTTP代理神器Fiddler
- 黑客“实战”内容之Redis未授权访问漏洞复现
- 黑客渗透提权过程解析
