Code Monkey home page Code Monkey logo

threat-hunting-with-elastic-stack's Introduction

Threat Hunting with Elastic Stack

Threat Hunting with Elastic Stack

This is the code repository for Threat Hunting with Elastic Stack, published by Packt.

Solve complex security challenges with integrated prevention, detection, and response

What is this book about?

Elastic Security is an open solution that equips professionals with the tools to prevent, detect, and respond to threats. Threat Hunting with Elastic Stack will show you how to make the best use of Elastic Security to provide optimal protection against cyber threats. With this book, security practitioners working with Kibana will be able to put their knowledge to work and detect malicious adversary activity within their contested network.

This book covers the following exciting features: Explore cyber threat intelligence analytical models and hunting methodologies Build and configure Elastic Stack for cyber threat hunting Leverage the Elastic endpoint and Beats for data collection Perform security data analysis using the Kibana Discover, Visualize, and Dashboard apps Execute hunting and response operations using the Kibana Security app Use Elastic Common Schema to ensure data uniformity across organizations

If you feel this book is for you, get your copy today!

https://www.packtpub.com/

Instructions and Navigations

All of the code is organized into folders. For example, Chapter02.

The code will look like the following:

{  "acknowledged" : true,  "shards_acknowledged" : true,  "index" : "my-first-index"}

Following is what you need for this book: Security analysts, cybersecurity enthusiasts, information systems security staff, or anyone who works with the Elastic Stack for security monitoring, incident response, intelligence analysis, or threat hunting will find this book useful. Basic working knowledge of IT security operations and network and endpoint systems is necessary to get started.

With the following software and hardware list you can run all code files present in the book (Chapter 1-12).

Software and Hardware List

Chapter Software required OS required
1-12 Oracle VirtualBox Windows, Mac OS X, and Linux (Any)
1-12 The Elastic Stack (Elasticsearch, Kibana, Beats, and the Elastic Agent) Windows, Mac OS X, and Linux (Any)

We also provide a PDF file that has color images of the screenshots/diagrams used in this book. Click here to download it.

Code in Action

Click on following link to see the Code in Action:

Youtube link

Related products

Get to Know the Author

Andrew Pease began his journey into information security in 2002. He has performed security monitoring, incident response, threat hunting, and intelligence analysis for various organizations from the United States Department of Defense, a biotechnology company, and co-founded a security services company called Perched, which was acquired by Elastic in 2019. Andrew is currently employed with Elastic as a Principal Security Research Engineer where he performs intelligence and analytics research to identify adversary activity on contested networks. He has been using Elastic for network and endpoint-based threat hunting since 2013, He has developed training on security workloads using the Elastic Stack since 2017, and currently works with a team of brilliant engineers that develop detection logic for the Elastic Security App.

Download a free PDF

If you have already purchased a print or Kindle version of this book, you can get a DRM-free PDF version at no cost.
Simply click on the link to claim your free PDF.

https://packt.link/free-ebook/9781801073783

threat-hunting-with-elastic-stack's People

Contributors

packt-itservice avatar packtutkarshr avatar peasead avatar sapuni avatar shruthis-shetty avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

threat-hunting-with-elastic-stack's Issues

After adding the system module to filebeat, it's necessary to enable the config reload on Elastic 8.3

Hello!

After adding the system module to filebeat, I had the following error:
Exiting: Failed to start crawler: creating module reloader failed: could not create module registry for filesets: module system is configured but has no enabled filesets

After checking the filebeats.yml, I saw that there was an option to reload the configs.

# ============================== Filebeat modules ==============================

filebeat.config.modules:
  # Glob pattern for configuration loading
  path: ${path.config}/modules.d/*.yml

  # Set to true to enable config reloading
  reload.enabled: false

Changing reload.enabled from false to true solved the problem.
reload.enabled: true

To make curl requests to Elastic 8.3 it's necessary to turn off xpack.security

Hello guys once again!

While trying to make curl requests to the initial Elasticsearch instance, I was getting the following error: curl: (52) Empty reply from server.

Elasticsearch was running as normal from systemctl status however the reply was empty.

Checking on stackoverflow, I saw the following post:
https://stackoverflow.com/questions/35921195/curl-52-empty-reply-from-server-timeout-when-querying-elastiscsearch

Which stated that we need to change xpack.security.enabled to false as it seems from Elastic 8.1, it's been a default setting.

#----------------------- BEGIN SECURITY AUTO CONFIGURATION -----------------------
#
# The following settings, TLS certificates, and keys have been automatically      
# generated to configure Elasticsearch security features on 13-08-2022 12:01:10
#
# --------------------------------------------------------------------------------

# Enable security features
xpack.security.enabled: true

So if we change xpack from true to false, we are now able to make curl requests without SSL.

xpack.security.enabled: false

However, in the post it states that xpack needs to be true when Kibana is used!

Thanks once again!

Cluster initial master node must be commented on Elastic 8.3

Hello there!

While having resolved the previous issue, I still had problems starting the elastic instance.

When I checked the logs, I noticed that there was an automatic cluster starting.
Perhaps as a new default configuration, the initial cluster isn't commented by default.

When I commented, "cluster.initial_master_nodes", I was able to finally start my instance without an issue.

Since in the lab and book, we are creating a single node, it was causing conflicts with the option turned on.

# --------------------------------------------------------------------------------

# Enable security features
xpack.security.enabled: true

xpack.security.enrollment.enabled: true

# Enable encryption for HTTP API client connections, such as Kibana, Logstash, and Agents
xpack.security.http.ssl:
  enabled: true
  keystore.path: certs/http.p12

# Enable encryption and mutual authentication between cluster nodes
xpack.security.transport.ssl:
  enabled: true
  verification_mode: certificate
  keystore.path: certs/transport.p12
  truststore.path: certs/transport.p12
# Create a new cluster with the current node only
# Additional nodes can still join the cluster later
 cluster.initial_master_nodes: ["STATIC HOST NAME HERE IN THIS FIELD"]

# Allow HTTP API connections from anywhere
# Connections are encrypted and require user authentication
http.host: 0.0.0.0

# Allow other nodes to join the cluster from anywhere
# Connections are encrypted and mutually authenticated
#transport.host: 0.0.0.0

Doing the following, resolved the issue:
# cluster.initial_master_nodes: ["STATIC HOST NAME HERE IN THIS FIELD"]

Thanks once again!

Incorrect discovery parameter on the chapter 3 yml file

Hey there!

While I was checking the github file on the yml file, I followed the format as follows:

# --------------------------------- Discovery ----------------------------------
#
# Pass an initial list of hosts to perform discovery when this node is started:
# The default list of hosts is ["127.0.0.1", "[::1]"]
#
discovery.node: single-node
discovery.seed_hosts: ["0.0.0.0"]
#

However, initially I was getting errors and didn't understand why.

When I checked the PDF/book version the single-node parameter is incorrect in the github file.

The correct is discovery.type and note discovery.node..
discovery.type: single-node

Thanks for the amazing book so far!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.