Last updated
Last updated
Note: For this demo, infrastructure is pretty small and simple, there is absolutely no security or reliability functionnalities configured. Don't use those configurations in production.
Demo has been tested on the latest CentOS 8 version (currently 8.0-1905).
Download and install Elastic public signing key :
Create a new yum repo file and add the following lines :
Modify/add the following lines in Elasticsearch configuration file :
Configure system and Elasticsearch for JVM memory usage :
Then start and enable Elasticsearch :
Then start and enable Logstash :
Modify/add the following lines in Kibana configuration file :
Then start and enable Kibana :
Create and add the following lines to Zookeeper configuration file :
Create and add the following lines to Zookeeper systemd script :
Then start and enable Zookeeper :
Modify/add the following lines in Kafka configuration file :
Then start and enable Kafka :
The following prerequisites apply to clients. It can be configuration or software to collect logs, configuration to make logs more verbose or configuration to make host vulnerable to specifics CVE for the needs of a POC.
System Monitor (Sysmon) is a Windows system service and device driver that, once installed on a system, remains resident across system reboots to monitor and log system activity to the Windows event log. It provides detailed information about process creations, network connections, and changes to file creation time.
Extract "Sysmon.zip" folder where you want and copy "sysmonconfig-export.xml" in the folder that has been created. (In my case directly in C:\).
Open a CMD as Administrator and launch the following commands to install Sysmon and apply the configuration :
Winlogbeat is a lightweight events shipper provided by Elastic and which can be used to send events to Logstash or/and Elasticsearch for example.
Extract "Sysmon.zip" folder where you want. (In my case directly in C:\)
Open a Powershell as Administrator and launch the following commands to install Winlog beat :
Then go to "Services" and try to start Winlogbeat to validate installation.
To configure Winlogbeat, modify the "winlogbeat.yml" file following your need. It's possible to send logs directly to Logstash and/or Elasticsearch, to add Event logs modules/sources, add processors and so on...
winlogbeat.yml configuration example :
With this configuration, Winlogbeat will send logs to Logstash only, include Application, System, Security, Sysmon and TerminalServices-RemoteConnectionManager logs. The processors "add_locale" will also include Timezone in logs.
Metasploit can be easily installed with the following command :
Then to launch the Metasploit console, use :
Logstash output configuration for Kafka can be downloaded here :
Logstash input configurations for BOTES JSON files can be downloaded on Logstash Configuration section here: .
Download Sysmon on Microsoft website :
For my tests I use the Sysmon configuration from ion-storm GitHub (Forked from SwiftOnSecurity). Sysmon configuration can be downloaded here :
Download Winlogbeat on Elastic website :
This page describe which packages are needed for the CEP POCs, how install and configure them.