Ninja Level Infrastructure Monitoring. Defensive Approach to Security Monitoring and Automation

Similar documents
Ingest. David Pilato, Developer Evangelist Paris, 31 Janvier 2017

The webinar will start soon... Elasticsearch Performance Optimisation

Ingest. Aaron Mildenstein, Consulting Architect Tokyo Dec 14, 2017

Unifying logs and metrics data with Elastic Beats. Monica Sarbu Team lead, Elastic Beats

Infrastructure at your Service. Elking your PostgreSQL Database Infrastructure

Monitor your containers with the Elastic Stack. Monica Sarbu

Goal of this document: A simple yet effective

Monitor your infrastructure with the Elastic Beats. Monica Sarbu

DEVOPS COURSE CONTENT

Table 1 The Elastic Stack use cases Use case Industry or vertical market Operational log analytics: Gain real-time operational insight, reduce Mean Ti

BUILDING HA ELK STACK FOR DRUPAL

Are you visualizing your logfiles? Bastian Widmer

Search Engines and Time Series Databases

FUJITSU Software ServerView Cloud Monitoring Manager V1.1. Release Notes

Amazon Search Services. Christoph Schmitter

Elasticsearch: Past, Present, & Future. Adrien Grand Software Engineer - Elasticsearch

Search and Time Series Databases

FUJITSU Software ServerView Cloud Monitoring Manager V1.0. Overview

AALOK INSTITUTE. DevOps Training

Microservices log gathering, processing and storing

ElasticSearch in Production

Important DevOps Technologies (3+2+3days) for Deployment

WHITE PAPER. RedHat OpenShift Container Platform. Benefits: Abstract. 1.1 Introduction

ADVANCED DATABASES CIS 6930 Dr. Markus Schneider. Group 5 Ajantha Ramineni, Sahil Tiwari, Rishabh Jain, Shivang Gupta

Harvesting Logs and Events Using MetaCentrum Virtualization Services. Radoslav Bodó, Daniel Kouřil CESNET

Analyze Bug Statistics using Kibana Dashboard and Get Voice Alerts

Securing the Elastic Stack

Application monitoring with BELK. Nishant Sahay, Sr. Architect Bhavani Ananth, Architect

Post-Exploitation Hunting with ATT&CK & Elastic

Overview. SUSE OpenStack Cloud Monitoring

Amazon Elasticsearch Service

Ingesting Logs with style. What has been cooking lately in Logstash world.

How we built a highly scalable Machine Learning platform using Apache Mesos

NetFlow Optimizer. Overview. Version (Build ) May 2017

About the Tutorial. Audience. Prerequisites. Copyright and Disclaimer. Logstash

Effecient monitoring with Open source tools. Osman Ungur, github.com/o

JetBrains TeamCity Comparison

FLORIDA DEPARTMENT OF TRANSPORTATION PRODUCTION BIG DATA PLATFORM

Java Architectures A New Hope. Eberhard Wolff

Open Source Search. Andreas Pesenhofer. max.recall information systems GmbH Künstlergasse 11/1 A-1150 Wien Austria

Hierarchy of knowledge BIG DATA 9/7/2017. Architecture

EVERYTHING AS CODE A Journey into IT Automation and Standardization. Raphaël Pinson

RACKSPACE PRIVATE CLOUD DESIGNED TO SUPPORT YOUR ENTERPRISE PRODUCTION WORKLOADS

The Art of Container Monitoring. Derek Chen

Elasticsearch. Presented by: Steve Mayzak, Director of Systems Engineering Vince Marino, Account Exec

Kafka Connect the Dots

by Cisco Intercloud Fabric and the Cisco

MQ Monitoring on Cloud

Building and Running a Solr-as-a-Service SHAI ERERA IBM

Datasheet FUJITSU Software Cloud Monitoring Manager V2.0

Empfehlungen vom BigData Admin

Developing and Testing Java Microservices on Docker. Todd Fasullo Dir. Engineering

CONTRACTOR IS ACTING UNDER A FRAMEWORK CONTRACT CONCLUDED WITH THE COMMISSION

Home of Redis. Redis for Fast Data Ingest

Network Automation using modern tech. Egor Krivosheev 2degrees

Log Analysis When CLI get's complex. ITNOG3 Octavio Melendres Network admin - Fastnet Spa

HOW TO STAND OUT IN DEVOPS

CONTINUOUS MONITORING OF PERFORMANCE BENCHMARKS IN KERNEL FILE SYSTEMS DRIVER DEVELOPMENT

Log Analytics with Amazon Elasticsearch Service. Christoph Schmitter

Turbocharge your MySQL analytics with ElasticSearch. Guillaume Lefranc Data & Infrastructure Architect, Productsup GmbH Percona Live Europe 2017

MongoDB Introduction and Red Hat Integration Points. Chad Tindel Solution Architect

Elasticsearch & ATLAS Data Management. European Organization for Nuclear Research (CERN)

How to re-invent your IT Architecture. André Christ, Co-CEO LeanIX

Advanced ecommerce Monitoring one tool does it all

E l a s t i c s e a r c h F e a t u r e s. Contents

Run your own Open source. (MMS) to avoid vendor lock-in. David Murphy MongoDB Practice Manager, Percona

Continuous delivery of Java applications. Marek Kratky Principal Sales Consultant Oracle Cloud Platform. May, 2016

Lambda Architecture for Batch and Real- Time Processing on AWS with Spark Streaming and Spark SQL. May 2015

Containers Infrastructure for Advanced Management. Federico Simoncelli Associate Manager, Red Hat October 2016

Command Center Guide. November 2018

Wrangling Logs with Logstash and ElasticSearch

Home of Redis. April 24, 2017

JAVASCRIPT CHARTING. Scaling for the Enterprise with Metric Insights Copyright Metric insights, Inc.

Voldemort. Smruti R. Sarangi. Department of Computer Science Indian Institute of Technology New Delhi, India. Overview Design Evaluation

Monitoring Azure Azure Monitor How, What, Why?

Verteego VDS Documentation

Site Speed: To Measure Is To Know. Sava Sertov QA Technical Lead ecommera

Improving Drupal search experience with Apache Solr and Elasticsearch

Accelerate at DevOps Speed With Openshift v3. Alessandro Vozza & Samuel Terburg Red Hat

CLOUD WORKLOAD SECURITY

Deep dive into analytics using Aggregation. Boaz

McAfee Network Security Platform 8.3

LGTM Enterprise System Requirements. Release , August 2018

elasticsearch The Road to a Distributed, (Near) Real Time, Search Engine Shay Banon

MarkLogic 8 Overview of Key Features COPYRIGHT 2014 MARKLOGIC CORPORATION. ALL RIGHTS RESERVED.

Scalable Web Programming. CS193S - Jan Jannink - 2/25/10

4 Effective Tools for Docker Monitoring. By Ranvijay Jamwal

Continuous Delivery for Cloud Native Applications

The Elasticsearch-Kibana plugin for Fuel Documentation

We are ready to serve Latest Testing Trends, Are you ready to learn?? New Batches Info

StreamSets Control Hub Installation Guide

Streamline AWS Security Incidents

Monitoring and Troubleshooting Smaller Office Networks with Savvius Insight

Making Sense of your Data BUILDING A CUSTOM MONGODB DATASOURCE FOR GRAFANA WITH VERTX

ClickHouse Deep Dive. Aleksei Milovidov

Jenkins: A complete solution. From Continuous Integration to Continuous Delivery For HSBC

Pagely.com implements log analytics with AWS Glue and Amazon Athena using Beyondsoft s ConvergDB

Introduction to ELK stack

Using the vrealize Orchestrator Operations Client. vrealize Orchestrator 7.5

I'm Charlie Hull, co-founder and Managing Director of Flax. We've been building open source search applications since 2001

Transcription:

Ninja Level Infrastructure Monitoring Defensive Approach to Security Monitoring and Automation 1

DEFCON 24 06 th August 2016, Saturday 10:00-14:00 Madhu Akula & Riyaz Walikar Appsecco.com 2

About Automation Security Ninja @Appsecco Security & DevOps lover Trainer & Speaker Acknowledged by more than 200 giant companies like Google, Microsoft, Yahoo, Adobe, etc. Open source contributor Never ending learner! @madhuakula Madhu Akula Chief Offensive Security Officer @Appsecco Over 9 years of industry experience in breaking infrastructure security and web applications Security evangelist, leader for null Bangalore and OWASP chapters Trainer/Speaker : BlackHat Asia, BlackHat USA, nullcon Goa, nullcon Delhi, c0c0n, OWASP AppSec USA @riyazwalikar @wincmdfu Riyaz Walikar 3

Ninja Level Infrastructure Monitoring Explain the Basics 1. Basics of logs and centralized monitoring 2. Introduction to ELK stack Setup 1. Log collections 2. ELK Stack 3. Monitoring Attack Patterns 4. Alerts and Notifications Automating the entire setup Ansible Playbook Docker Container What will you learn today? 4

Ninja Level Infrastructure Monitoring Production best practices Planning and Provisioning Storing and Aggregations Deployment and Post Deployment Alternative software options Next Steps Feedback and Q&A What will you learn today? 5

Prerequisites As this workshop is intended for beginner to mid level, we are expecting that participants are comfortable with basic Linux commands Laptop with administrative privileges 20GB of free space in your hard disk for virtual machines Minimum 4GB RAM Enthusiasm to learn cool stuff 6

Basics of logs and centralized logging What are logs? Log is a collection of records or events. Logs used to be an (often indecipherable) line of text intended for offline human analysis of what went wrong. Logs are a critical part of any system, they give you insight into what a system is doing as well what happened. 7

Basics of logs and centralized logging What is centralized logging? Virtually every process running on a system generates logs in some form or another. When your system grows to multiple hosts, managing the logs and accessing them can get complicated. Searching for a particular error across hundreds of log files on hundreds of servers is difficult without good tools. A common approach to this problem is to setup a centralized logging solution so that multiple logs can be aggregated in a central location. 8

Entering in to the ELK Stack What is ELK? ELK is a collection of different open source modules like Elasticsearch, Logstash, Kibana. This helps to any user to collect, analyze and visualize data in real-time. Each modules fits based on your use case and environment. Elasticsearch is a NoSQL database that is based on the Lucene search engine. Logstash is a log pipeline tool that accepts inputs from various sources, executes different transformations, and exports the data to various targets. Kibana is a visualization layer that works on top of Elasticsearch. 9

Explaining the ELK stack Elasticsearch Written in Java and uses Groovy Distributed and Highly available search engine Multi Tenant with Multi types Various set of APIs Document Oriented Built on top of Lucene (near) Real time search 10

Explaining the ELK stack Written in Ruby and uses JRuby Tool for managing events and logs Logstash Centralized data processing of all types of logs Normalize varying schema and formats Quickly extend to custom log formats Consists of 3 main components Input : Passing logs to process them into machine understandable format Filter : Set of conditionals to perform specific action on a event Output : Decision maker for processed events/logs 11

Explaining the ELK stack Kibana Powerful front-end dashboard written in JavaScript Browser based analytics and search dashboard for elasticsearch Flexible analytics & visualization platform Instant sharing and embedding of dashboards Provides data in the form of charts, graphs, counts, maps, etc. in real-time 12

Explaining the ELK stack Written in Go Lightweight shippers for Elasticsearch & Logstash Capture all sorts of operational data like logs, operating system metrics or network packet data It can send logs to either elasticsearch, logstash Different kind of beats Libbeat : The Go framework for creating new Beats Packetbeat : Tap into your wire data Filebeat : Lightweight log forwarder to Logstash & Elasticsearch Winlogbeat : Sends windows event logs Beats 13

Explaining the ELK stack Filebeat Lightweight Shipper for Log Data Filebeat is an opensource file harvester Used to fetch logs files and feed them into logstash It s replacement for logstash-forwarder Resolve problems with real-time kibana dashboards 14

Explaining the ELK stack Overview Architecture 15

Why should we use ELK for Infrastructure Monitoring? Challenges with traditional monitoring No consistency No centralization Accessibility of log data 16

Why should we use ELK for Infrastructure Monitoring? No Consistency (it s difficult to be jack-of-all trades) Difficulty in logging for each application, system, device Interpreting the various types logs Variation in format makes it challenging to search Many types of time formats 17

Why should we use ELK for Infrastructure Monitoring? No Centralization (simply put, log data is everywhere) Logs in many locations on various servers SSH + GREP doesn t scale 18

Solution The ELK Stack is popular because it fulfills a need in the log analytics space. Splunk s enterprise software has long been the market leader, but its numerous functionalities are increasingly not worth the expensive price especially for smaller companies such as products and tech startups. ELK stack can help you manage each of these challenges, and more. ELK is best for timeseries data-anything with a time stamp-such as you'll find in most web server logs, transaction logs, and stock data listings. To be intelligible, these logs usually need substantial clean-up. 19

Why should we use ELK for Infrastructure Monitoring? Accessibility of Log Data (Much of the data is difficult to locate and manage) Access is often difficult High expertise to mine data Logs can be difficult to find Immense size of Log Data 20

History of ELK & Elastic, the company behind ELK Shay Banon created compass in 2004, third version of compass is the first version of elasticsearch. Which is released in Feb 2010 Jordan Sissel creator of logstash. Rashid Khan creator of kibana. Elasticsearch merged the both logstash and kibana into the elasticsearch organization. Which is elastic.co After they included Beats which is formerly called as packetbeats Now they combined the stack and releasing as Elastic Stack and X-Pack by including commercial plugins and offerings 21

Let s get started with setup

Terminology before diving into the stack Near Real-time (NRT) Elasticsearch is a near real time search platform. What this means is there is a slight latency (normally one second) from the time you index a document until the time it becomes searchable. Node A node is a running instance of elasticsearch which belongs to a cluster. Cluster Cluster is a collection of one or more nodes that together holds your entire data and provides indexing and search capabilities across all nodes. It shares the same cluster name across nodes. Default name is 23

Terminology before diving into the stack Document A document is a basic unit of information that can be indexed. It is a JSON document which is stored in elasticsearch. It is like a row in a table in a relational database. Index An index is a collection of documents that have somewhat similar characteristics. An index is like a database in a relational database. It has a mapping which defines multiple types. Type Within an index, you can define one or more types. A type is a logical category/partition of your index whose semantics is completely up to you. In general, a type is defined for documents that have a set of common fields. 24

Terminology before diving into the stack Shard & Replica Every index can be split into multiple shards to be able to distribute data. The shard is the atomic part of an index, which can be distributed over the cluster if you add more nodes. It allows you to horizontally split/scale your content volume By default 5 primary shards and 1 replica shards are created while starting elasticsearch Elasticsearch allows you to make one or more copies of your index s shards into what are called replica shards, or replicas for short. Atleast 2 Nodes are required for replicas to be created. It provides high availability in case a shard/node fails. 25

Setting up Elasticsearch, Logstash, Kibana Hands On 26

Installing Plugins for Elasticsearch, Logstash, Kibana Hands On 27

Tweaking configurations Hands On 28

Log collections Hands On 29

Beats setup for logs forwarding Hands On 30

Setting up Alerting & Notifications Hands On 31

Creating Dashboards & Alerts Hands On 32

Monitoring Attack Patterns with Dashboards & notifications

Attack Patterns Creation & Dashboards Hands On 34

Automating the entire setup with Ansible & Docker for Production Ready

Ansible Playbook Hands On 36

Dockerfile Hands On 37

Production best practices for ELK

Production Checklist Reference Docs 39

Alternative software options for ELK

ELK Alternatives Reference Docs 41

Next Steps and Road Map

Next steps for your road Reference Docs 43

References https://elastic.co http://logz.io https://github.com/clay584 http://www.slideshare.net/prajalkulkarni/attack-monitoring-using-elasticsearch-logstashand-kibana https://en.wikipedia.org http://jasonwilder.com/blog/2012/01/03/centralized-logging/ https://qbox.io/blog/welcome-to-the-elk-stack-elasticsearch-logstash-kibana Etc. 44

THANK YOU @madhuakula @riyazwalikar @appseccouk www.appsecco.com