Skip to content

Instantly share code, notes, and snippets.

View andrewkroh's full-sized avatar

Andrew Kroh andrewkroh

View GitHub Profile
@andrewkroh
andrewkroh / geoip-asn-pipeline.json
Created February 21, 2019 20:05
Ingest Node GeoIP and ASN
{
"description": "Add Geo and ASN to event",
"processors": [
{
"geoip": {
"if": "ctx.source?.geo == null",
"field": "source.ip",
"target_field": "source.geo",
"ignore_missing": true
}
@andrewkroh
andrewkroh / event1.json
Last active August 2, 2022 15:22
Winlogbeat - Sysmon Processing for ECS (Elastic Common Schema)
{
"@timestamp": "2019-01-29T19:10:47.538Z",
"beat": {
"hostname": "DESKTOP",
"name": "DESKTOP",
"version": "6.3.2"
},
"event": {
"kind": "event"
},
@andrewkroh
andrewkroh / winlogbeat_testing.md
Last active January 25, 2019 15:54
Winlogbeat Development

Winlogbeat Development

Start a Windows VM

vagrant up win2012

Login Options

You can connect to the VM in multiple ways.

@andrewkroh
andrewkroh / elastic-beat-development-101.md
Last active March 17, 2022 02:43
Elastic Beat Development 101

Elastic Beats Development 101

This is a short guide to get up and building Elastic Beats on a new Linux host.

Start a VM

This uses Google Compute Engine (GCE) to start an Ubuntu 20.04 virtual machine. You can use other versions of Linux or different virtualization platforms (or no virtualization), but those are not guaranteed to work with the commands here.

 gcloud auth login
@andrewkroh
andrewkroh / packetbeat-tls-event.json
Created August 1, 2018 18:15
Packetbeat TLS Event Example
{
"@metadata": {
"beat": "packetbeat",
"type": "doc",
"version": "7.0.0-alpha1"
},
"@timestamp": "2018-08-01T18:10:48.311Z",
"beat": {
"hostname": "macbook",
"name": "macbook",
@andrewkroh
andrewkroh / packetbeat-dhcpv4-nak-decline.json
Last active July 26, 2018 20:44
New DHCP Client Detected on Network - Elasticsearch Alerting Watch
POST _xpack/watcher/watch/packetbeat-dhcpv4-nak-decline
{
"metadata": {
"window_period": "1m",
"index_pattern": "packetbeat-*"
},
"trigger": {
"schedule": {
"interval": "1m"
}
@andrewkroh
andrewkroh / Slack Notification
Last active July 8, 2018 12:54
Heartbeat ICMP Alerting with Elastic X-Pack Watcher
https://twitter.com/Krohbird/status/849749788920877056
@andrewkroh
andrewkroh / auditbeat-seccom-x86_64.yml
Last active April 23, 2018 12:55
Elastic Beat Seccomp Profiles
seccomp:
default_action: errno
syscalls:
- names:
- accept
- accept4
- arch_prctl
- bind
- brk
- clone
@andrewkroh
andrewkroh / analyzing-bpf.md
Created April 9, 2018 16:29
Seccomp BPF Filter Analysis in Go

Generating Seccomp BPF Filters with libbseccomp in Go

// +build linux

package main

import (
	"log"
	"os"
@andrewkroh
andrewkroh / seccomp-violation.json
Created April 8, 2018 19:34
Auditbeat Event for a Seccomp Violation
{
"@timestamp": "2018-04-08T19:29:14.461Z",
"@metadata": {
"beat": "auditbeat",
"type": "doc",
"version": "6.2.2"
},
"event": {
"action": "violated-seccomp-policy",
"module": "auditd",