• Stars
    star
    115
  • Rank 305,916 (Top 7 %)
  • Language
    Go
  • Created almost 3 years ago
  • Updated over 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Security Information and Event Management in Minecraft

SIEMCraft logo

SIEMCraft - Security Information and Event Management in Minecraft

(please do not take this serioussly, for more information read this blog post)

Inspired by Kubecraftadmin, this project allows you to monitor and detect intrusions across your entire Windows domain, while still mining mad diamond.

minecraft player looking at a pig with SIGMA rule information aboe it's head

Also see this demo video of SIEMCRAFT in VR.

How it works

SIEMCRAFT is a project that combines a standalone executable 'controller', with a Minecraft addon, designed to enable a person to manage and respond to security alerts from within Minecraft. The project has a number of elements:

Event Log collecter

Using RawSec's Win32 library, SIEMCraft subscribes to various Windows Event logs, to collect events from

  • Microsoft Sysmon
  • ETW (via Sealighter)
  • Security, System, and Applicaiton Event logs

Using Windows Event Forwarding (WEF), you can have SIEMCRAFT run from the central machine and collect event from an entire Windows Domain

SIGMA Rule detection engine

SIEMCraft will then run events through a user-supplied list of SIGMA detection rules using Bradley Kemp's library, to detect supsicious and malicious activity within the raw events. Using SigmaHQ's ruleset is also supported

Entity generator

If a rule detects suspicious behaviour, it will trigger the creation of new entity within a person's Minecraft server, nearby to the player. This entity will display information about:

  • The name of the rule triggered
  • The Machine name the rule was triggered on
  • The user responsible for the process that triggered the rule
  • The Image, CommandLine, and PID of the Process
  • The Image and PID of the Parent Process
  • Other relevant information

Different types of entities are created depending on the detection severity:

Player action responder

If the entity is killed by a player weilding a Diamond Sword, SIEMCRAFT will then kill either the process or the parent process, so long as the process image is one of

  • cmd.exe
  • pwsh.exe
  • powershell.exe
  • wword.exe

If the entity is killed by any other means the event is silently dismissed.

How it works - diagram

incredibly overcomplicated diagram of the above overview

Building

You can grab pre-built artefacts from the releases page.

Otherwise, there are two parts to build:

Binary Controller

go build -o siemcraft.exe ./src

Minecraft Addons

There are three Minecraft addons, a 'behaviour' pack and an 'entity' pack. Packs are just ZIPs, and can be combined into a single .mcaddon ZIP for extra portability:

# Windows
Compress-Archive -Path "siemcraft_addon_behavior" -DestinationPath "siemcraft_addon_behavior.mcpack" -Force
Compress-Archive -Path "siemcraft_addon_resource" -DestinationPath "siemcraft_addon_resource.mcpack" -Force
Compress-Archive -Path "siemcraft_addon_gametest" -DestinationPath "siemcraft_addon_gametest.mcpack" -Force
Compress-Archive -Path "*.mcpack -DestinationPath" "siemcraft.mcaddon" -Force

# Linux
zip -r siemcraft_addon_behavior.mcpack siemcraft_addon_behavior
zip -r siemcraft_addon_resource.mcpack siemcraft_addon_resource
zip -r siemcraft_addon_gametest.mcpack siemcraft_addon_gametest
zip -r siemcraft_addon_resource.mcaddon *.mcpack

Rules

You will also need some SIGMA rules for SIEMCRAFT to comapre raw events to. Either use the ones in this repository's rules directory, or use SIGMA's community rules. Note not all of these rules work with SIEMCRAFT (see this discussion).

Installing

Controller

Place the siemcraft binary anywhere on the machine where the event logs are being generated (usually the same machine as minecraft).

Addons

To install the Minecraft addon, double-click on the .mcpack from the machine with the Minecraft client. This should install all packs, which you can confirm by clicking Settings in Minecraft: Minecraft settings with Pack installed

Running

Controller

Start the SIEMCRAFT controller binary from an elevated prompt, giving it the path to the folder containing the SIGMA rules:

$> siemcraft.exe --rules .\rules
[r] Parsing SIGMA rules from: .\rules
[r]    Found rule: Security Logon
[r]    Found rule: Where Execution
[r]    Found rule: Whoami Execution
[r] Number of rules found: 3
[e] Starting event subscription
[e] Subscribing to Event Log channels:
[e]   - Microsoft-Windows-Sysmon/Operational
[e]   - Security
[m] starting SIEMCraft, run this command to connect:
    /connect 127.0.0.1:8000/ws

Siemcraft accepts the following commandline options:

  -bind string
        Address to bind websocket to (default "127.0.0.1")
  -channels value
        Comma-seperated list of event logs to subscribe to
        (default ["Microsoft-Windows-Sysmon/Operational", "Security"])
  -fakeEvents
        Don't subscript to event logs, just fake generate them
  -noKill
        Never attempt to kill a process
  -port string
        Port to bind websocket to (default "8000")
  -rules string
        Folder containing SIGMA rules (default ".\\rules")

Addons

First, if running SIEMCRAFT on the same local host as the Minecraft client, you need to allow Minecraft to talk to your local network. Run this in an elevated PowerShell:

# First find the "Package Family Name" of Minecraft, which should look like like 'microsoft.minecraftuwp_RANDOM_STRING'
$family_name=(Get-AppxPackage '*minecraft*').PackageFamilyName

# Enable minecraft to reach loopback network
cmd.exe /C "checknetisolation loopbackexempt -a -n=$family_name"

# Check it worked, you should see minecraft here
checknetisolation loopbackexempt -s

Next, create a new Minecraft world with the following options:

  • All cheats and experiments enabled (including GameTest), and achievements turned off
  • All the SIEMCRAFT 'Resource' and 'Behaviour' packs activated

Siemcraft options, all experiments on Siemcraft addons enbled

Once the Map is created, open up the console and type this command to connect to the SIEMCRAFT controller

/connect <ip_address>:<port>/ws

By default the IP Address and port are:

/connect 127.0.0.1:8000/ws

Entering SIEMCRAFt command

You should see positive output in both the Minecraft UI and in the Controller's output.

Why would you make this?

See the blog post, but tl;dr is because I'm an idiot who was bored. I also presented this "work" at a local security meetup, you can see the slides here (but the blog has more info, and the talk wasn't recorded).

More Repositories

1

bad-bpf

A collection of eBPF programs demonstrating bad behavior, presented at DEF CON 29
C
530
star
2

Sealighter

Sysmon-Like research tool for ETW
C++
328
star
3

SealighterTI

Combining Sealighter with unpatched exploits to run the Threat-Intelligence ETW Provider
C
159
star
4

PPLRunner

Run Processes as PPL with ELAM
C
141
star
5

bpf-hookdetect

Dectect syscall hooking using eBPF
C
139
star
6

commandline_cloaking

A collection of projects demonstrating various commandline cloaking techniques on Linux
Go
53
star
7

bpf-pipesnoop

Example program using eBPF to log data being based in using shell pipes
C
40
star
8

toucli

Use TouchID and the Secure Enclave to encrypt data from the commandline.
Swift
15
star
9

SimpleAmsiProvider

A simple provider to analyse what gets passed into Microsoft's Anti-Malware Scan Interface
C++
13
star
10

tf_wireguard

Simple Terraform Scripts to setup a WireGuard server on various cloud providers.
HCL
11
star
11

https.server

Python SimpleHTTPServer wrapped in TLS
Python
8
star
12

bpf-uprobedbg

C
7
star
13

ctlwatcher

Monitor Certificate Transparency logs for domains matching regexes.
Rust
6
star
14

ld_preload_go

Simple example of creating an `LD_PRELOAD` library in Go that hooks LibC's main function.
Go
5
star
15

ebpf-pinned-fentry

Example how to run eBPF probes without a usermode process using fentry
C
3
star
16

Presentations

A Repo to hold slides from presentations, etc.
3
star
17

cookiecache

Simplify getting and using cookies from the browser to use in Python.
Python
3
star
18

dockenv

Dockenv - Run python in docker the easy way
Python
2
star
19

etwRunner

Basic KrabsETW runner template
C++
2
star
20

terraform-provider-bitlaunch

BitLaunch Terraform Provider
Go
2
star
21

pyauditlogger

Auto-Add Python 3.8 audit hooks to all python scripts
Python
1
star
22

hijack-watcher

Rust version of HijackWatcher
Rust
1
star
23

etw_watcher

Using GitHub Actions to create commit diffs
PowerShell
1
star
24

PowerInject

Inject Interactive PowerShell into an arbitrary process
C
1
star
25

sigstore-watcher

Watches SigStore Code Signing Logs
Rust
1
star
26

sgproxy

Basic HTTP/S proxy. Created to add HTTP Auth to a request from a client that doesn't support supplying auth in URL, for example VScode's Juypyter Notebook Server browser.
Go
1
star
27

Puppeteer-Stealth-Docker

This is a simple example of how do stealthy headless chrome webscraping from a Docker container.
Dockerfile
1
star