POCs Prerequisites

This page describe which packages are needed for the CEP POCs, how install and configure them.

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).

Server-side prerequisites

System

yum -y install epel-release
yum update
yum upgrade

vi nano /etc/selinux/config
#Change SELINUX value to
SELINUX=disabled

systemctl stop firewalld
systemctl disable firewalld

reboot

Elastic repo

Download and install Elastic public signing key :

Create a new yum repo file and add the following lines :

Java

Installation

Elasticsearch

Installation

Configuration

Modify/add the following lines in Elasticsearch configuration file :

Configure system and Elasticsearch for JVM memory usage :

Then start and enable Elasticsearch :

Logstash

Installation

Configuration

Logstash output configuration for Kafka can be downloaded here : https://botes.s3-us-west-1.amazonaws.com/botes-logstash-configuration/full-config/output-kafka/output-kafka.conf

Logstash input configurations for BOTES JSON files can be downloaded on Logstash Configuration section here: BOTES Prerequisites.

Then start and enable Logstash :

Kibana

Installation

Configuration

Modify/add the following lines in Kibana configuration file :

Then start and enable Kibana :

Zookeeper

Installation

Configuration

Create and add the following lines to Zookeeper configuration file :

Systemd script

Create and add the following lines to Zookeeper systemd script :

Then start and enable Zookeeper :

Kafka

Installation

Configuration

Modify/add the following lines in Kafka configuration file :

Systemd script

Then start and enable Kafka :

Maven

Installation

Installation

Client-side prerequisites

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.

Windows

Sysmon

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.

Download Sysmon on Microsoft website : https://docs.microsoft.com/en-us/sysinternals/downloads/sysmon

For my tests I use the Sysmon configuration from ion-storm GitHub (Forked from SwiftOnSecurity). Sysmon configuration can be downloaded here : https://github.com/ion-storm/sysmon-config/blob/master/sysmonconfig-export.xml

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

Installation

Winlogbeat is a lightweight events shipper provided by Elastic and which can be used to send events to Logstash or/and Elasticsearch for example.

Download Winlogbeat on Elastic website : https://www.elastic.co/fr/downloads/beats/winlogbeat

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.

Configuration

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.

Linux

Metasploit

Metasploit can be easily installed with the following command :

Then to launch the Metasploit console, use :

Last updated

Was this helpful?