Über uns
Sovereign kubernetes security operations center. Real-time false positives tuning
Systeme und InfrastrukturGemessener Sternzuwachs
- in 24h
- 0
- in 7 days
- 0
- in 15 days
- 0
- in 1 month
- Verlauf wird gesammelt
Nettoänderungen in überlappenden Zeiträumen, keine Tagessummen. Fehlende Messwerte bleiben leer. Sterne zeigen Interesse, nicht Qualität.
README.md
OriginalKubernetes StormCenter: Find runtime threats -- store only the evidence
Documentation: https://k8sstormcenter.github.io/soc/
This deploys an the sensors that would be consumed into a SOC for k8s, so that you can visualize ongoing attacks, post-exploitation, save the evidence to a clickhouse database.
It employs adaptive exporting and real-time statistical correlation that remains on the node. This means:
- your data never has to leave your datacenter
- you can tune how much evidence you want to save
- what you consider evidence
We expressely thank the upstream maintainers of our main components: KubeScape and Pixie and Ran
Why its cool, cause it has adaptive features that allow filtering out the noise:
Components:
pixie (main + out-of-tree): for the 24 hr history of all interesting protocols
This allows the reconstruction of the attack paths and the construction of evidence that either corroborates that an attack occured or tells you where an attack failed (e.g the initial breach and pivot might have happened but they failed at the exfiltration)pixie cloud: for visualizing the data across all live clusters as well as the forensic database
kubescape (fork): for a coarse filtering at any given point in time
This allows anchoring known malicious signals to kick off the investigation -> you must use a high-contrast bill of behavior (sbob) to ensure your false negatives are low and you know your blindspots. You can use bobctl to achieve this.clickhouse: for saving the data out of band from your cluster Sharded by node
Backlog
These charts and kustomize artefacts contain alpha-builds. Do NOT use in production at this point in time.
Install
This stack needs a lot (meaning A LOT) of space, it is not performance or memory optimized at this point in time. If you have too many events, it may OOM. The ktls probes, that intercept the k8s-api traffic especially should be turned off unless an external storage-sink is configured (it gets large)
TL;DR
Needs kubectl, helm, skaffold v2, openssl, git and the kernel-headers for
the running kernel (pixie) and nodes with at least
7 GiB memory: Pixie reserves 2 GiB on every node and ClickHouse 2 GiB on one. Make sure that you have enough disk space on
the machines (~60GB in a small setup, or change the sizes in the values)
ARM64 nodes are not supported at the moment (the dx image is built for amd64 only)
- Pixie, with your own account (sign up in the browser on first login):
For kernels < 6.10
bash -c "$(curl -fsSL https://withpixie.ai/install.sh)"
export PX_CLOUD_ADDR=soc.k8sstormcenter.com
px auth login --manual
px deploy --vizier_version 0.14.19-pemdq1 --pem_memory_request 2Gi --pem_memory_limit 4Gi
export PIXIE_API_KEY=$(px api-key create -s -d soc)
For newer kernels
bash -c "$(curl -fsSL https://withpixie.ai/install.sh)"
export PX_CLOUD_ADDR=soc.k8sstormcenter.com
px auth login --manual
px deploy --vizier_version 0.14.19-pemdq1 --pem_memory_request 2Gi --pem_memory_limit 4Gi \
--patches 'vizier-pem:{"spec":{"template":{"spec":{"containers":[{"name":"pem","args":["--stirling_bpf_loop_limit=41"]}]}}}}'
export PIXIE_API_KEY=$(px api-key create -s -d soc)
- Everything else (ClickHouse, Kubescape, adaptive-export, dx):
git clone https://github.com/k8sstormcenter/soc && cd soc
skaffold deploy -m soc-alpha
- Check:
kubectl get pods -n pl; kubectl get pods -n honey; kubectl get pods -n clickhouse
kubectl -n honey logs ds/dx-daemon --tail=20
CH=$(kubectl -n clickhouse get pod -l clickhouse.altinity.com/chi=forensic-soc-db -o name | head -1)
kubectl -n clickhouse exec "$CH" -- clickhouse-client -q "SELECT count() FROM forensic_db.kubescape_logs"
Running skaffold deploy -m soc-alpha again changes nothing. Kubescape alone,
without ClickHouse and Pixie: skaffold deploy -m soc-kubescape -p standalone.
Evidence in ClickHouse
Kubescape fires the alert; the Adaptive Export writes the correlated Pixie
evidence to forensic_db.
dc_snoop redis-server redis R proc/self/stat + sh bash getent whoami cat (attack exec)
dns_events {"queries":[{"name":"xmr.pool.minergate.com","type":"A"}]} (also evil.attacker.example.com)
conn_stats redis 127.0.0.1 proto:7 sent:19628 recv:39256
redis_events redis EVAL io.popen("getent hosts xmr.pool.minergate.com") (CVE-2022-0543 Lua sandbox escape -> OS cmd)
stack_trace redis __open;[k] entry_SYSCALL_64_after_hwframe count:1
adaptive_attribution redis/sh R0002 n_anomalies:1846
... and many more (some unstable and subject to DDL changes)
Ähnliche Projekte entdecken
Wird geladen…