Skip to main content

Elasticsearch : Windows Event Logs : Winlogbeat


My first foray into the Security SIEM seems is going to be with the prodigal ELK stack. Keeping the discussion later, w.r.t. the pros, cons and features of ELK, let's dive into our first implementation (integration of Windows Server with ELK)





For testing purpose, I have created a 14 day free trial that ELK offers.





  • Go to https://elastic.co
  • Select Try Free








  • Scroll down to find ElasticSearch and Click Launch on Elastic Cloud.
  • It should ask for email details which needs to be verified.
  • Create a Deployment.
  • My deployment details are as below:




Elasticsearch Deployment




Click on the deployment to check the Cloud ID. Save this somewhere as this will be very crucial to direct traffic from endpoints to this Cloud Tenant





Now, once the Cloud tenant is ready, let us install Winlogbeat on our Windows server to send Windows event logs to Kibana (ELK's GUI)





Winlogbeat installation





  1. Download Winlogbeat from https://www.elastic.co/products/beats/winlogbeat
  2. Extract the contents of the zip file to C:\Program Files and rename this extracted folder as Winlogbeat.
  3. With the account privileges of Administrator, install Winlogbeat as follows:




  • cd "C:\Program Files\Winlogbeat"
  • .\ install-service-winlogbeat.ps1




In case of issues with Powershell rejecting code execution use the following command. The error message, command and successful installation, in my case, is as per the below excerpt.





Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser









Once the installation is successful, modify the C:\Program Files\Winlogbeat\winlogbeat.yml file to establish the connection with Elastic Cloud tenant we created above.





Scroll down and un-comment: "cloud-id" to enter the following:





  • cloud.id: "Deployment:Cloud ID"
  • cloud.auth: "username:<password>"




I have masked the Cloud ID and password details for my deployment (Deployment-1)





Can be found in : C:\Program Files\Winlogbeat




winlogbeat.yml modification




Enter the following commands in Powershell to load Kibana dashboards.









The setup is ready.. Check on Kibana if the Windows Event logs are getting populated in Kibana. The logs can be found by clicking on the compass icon in the left tray of Kibana.





Windows Event logs in Kibana




And voila.. we have integrated Windows server with Elasticsearch..


Comments

Popular posts from this blog

MITRE ATT&CK - Kerberos Vulnerabilities and Security

From the previous post, the summary of Kerberos authentication process is as below: For the initial authentication, the user’s client machine sends a request to the KDC  Authentication Service (AS) . The request includes details like the user’s username, and the date and time. All information except the username is encrypted using the hash of the user’s password. The KDC AS uses the username to look up its copy of the user’s password hash and uses it to decrypt the rest of the request. If the decryption is successful, that means the client used the correct password hash and the user has successfully authenticated. Once the user is authenticated, the KDC AS sends the user’s client a  ticket granting ticket   (TGT) . The TGT includes a unique session key and a timestamp that specifies how long that session is valid (normally 8 or 10 hours). Importantly, before sending the TGT, the KDC encrypts it using the password hash for a special account, the  KRBTGT account. ...

Checkpoint - Exporting Objects in CSV format

Be it a Network Operations Manager, Security Architect or a Security Auditor, the people up the hierarchy always harangue the Security Engineers to compile the list of firewall objects or rules or policies or the traffic statistics and so on.. This can turn out to be quite hectic especially if there are no built in features to systematically provide the output in a "layman-readable" format. Come, Checkpoint's "Object Explorer..."  which not only provides the output in the "layman-readable" format, but also provides in-built filtering mechanisms, thereby ensuring that the Security Engineer doesn't have to rely on Google for building his scarce Microsoft Excel data filtering skills. The following screenshots will show how easy it is, with Checkpoint R80.10 to generate the firewall configuration inventory. On the SmartConsole Unified Portal, navigate to Menu >> Open Object Explorer... Select the Categories you wish to see in your output: Click o...

MITRE ATT&CK - Tools, Attacks and Related - 1

MASSCAN - Mass IP port scanner https://github.com/robertdavidgraham/masscan TeamTNT - Threat group that has primarily targeted cloud and containerized applications. The group has been active since at least Oct 2019 and has mainly focused its efforts on leveraging cloud and container resources to deploy cryptocurrency miners in victim environments. List of Techniques used by TeamTNT can be found here: https://attack.mitre.org/groups/G0139/ Mimikatz - Is a credential dumper capable of obtaining plaintext Windows account logins and passwords, along with many other features that make it useful for testing the security of networks. Golden Ticket Attack - A golden ticket in Active Directory grants the bearer unlimited access. A golden ticket attack abuses the Kerberos protocol, which depends on the use of shared secrets to encrypt and sign messages. One of these secrets is known only to the Key Distribution Center (KDC): the password hash for the KRBTGT user, which is used to issue the Ke...