All Projects → k8scop → K8s Security Dashboard

k8scop / K8s Security Dashboard

Licence: gpl-3.0
A security monitoring solution for Kubernetes

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to K8s Security Dashboard

Checklist Tools Website
🍿 The perfect Checklist Website for meticulous developers.
Stars: ✭ 73 (-24.74%)
Mutual labels:  security-tools
Redcanary Response Utils
Tools to automate and/or expedite response.
Stars: ✭ 82 (-15.46%)
Mutual labels:  security-tools
Password Leak
A library to check for compromised passwords
Stars: ✭ 92 (-5.15%)
Mutual labels:  security-tools
Securityprivacyreferencearchitecture
Open Repository for the Open Security and Privacy Reference Architecture
Stars: ✭ 73 (-24.74%)
Mutual labels:  security-tools
Sysmon Modular
A repository of sysmon configuration modules
Stars: ✭ 1,229 (+1167.01%)
Mutual labels:  security-tools
Envkey App
Secure, human-friendly, cross-platform secrets and config.
Stars: ✭ 83 (-14.43%)
Mutual labels:  security-tools
Notruler
The opposite of Ruler, provides blue teams with the ability to detect Ruler usage against Exchange.
Stars: ✭ 72 (-25.77%)
Mutual labels:  security-tools
Amdh
Android Mobile Device Hardening
Stars: ✭ 95 (-2.06%)
Mutual labels:  security-tools
Pentesting Cookbook
A set of recipes useful in pentesting and red teaming scenarios
Stars: ✭ 82 (-15.46%)
Mutual labels:  security-tools
Pentest Notes
Collection of Pentest Notes and Cheatsheets from a lot of repos (SofianeHamlaoui,dostoevsky,mantvydasb,adon90,BriskSec)
Stars: ✭ 89 (-8.25%)
Mutual labels:  security-tools
Radio Hackbox
PoC tool to demonstrate vulnerabilities in wireless input devices
Stars: ✭ 74 (-23.71%)
Mutual labels:  security-tools
Content
Security automation content in SCAP, OSCAL, Bash, Ansible, and other formats
Stars: ✭ 1,219 (+1156.7%)
Mutual labels:  security-tools
Docker Ssllabs Scan
Qualys sslabs-scan utility in a tiny docker image
Stars: ✭ 85 (-12.37%)
Mutual labels:  security-tools
Nrf24 Playset
Software tools for Nordic Semiconductor nRF24-based devices like wireless keyboards, mice, and presenters
Stars: ✭ 73 (-24.74%)
Mutual labels:  security-tools
Flask Unsign
Command line tool to fetch, decode, brute-force and craft session cookies of a Flask application by guessing secret keys.
Stars: ✭ 90 (-7.22%)
Mutual labels:  security-tools
Ioc Explorer
Explore Indicators of Compromise Automatically
Stars: ✭ 73 (-24.74%)
Mutual labels:  security-tools
Vxscan
python3写的综合扫描工具,主要用来存活验证,敏感文件探测(目录扫描/js泄露接口/html注释泄露),WAF/CDN识别,端口扫描,指纹/服务识别,操作系统识别,POC扫描,SQL注入,绕过CDN,查询旁站等功能,主要用来甲方自测或乙方授权测试,请勿用来搞破坏。
Stars: ✭ 1,244 (+1182.47%)
Mutual labels:  security-tools
Awesome Bugbounty Tools
A curated list of various bug bounty tools
Stars: ✭ 96 (-1.03%)
Mutual labels:  security-tools
Aws Securitygroup Grapher
This ansible role gets information from an AWS VPC and generate a graphical representation of security groups
Stars: ✭ 93 (-4.12%)
Mutual labels:  security-tools
Patton
The clever vulnerability dependency finder
Stars: ✭ 87 (-10.31%)
Mutual labels:  security-tools

Kubernetes Security Dashboard

This guide assists in configuring a logging architecture for Kubernetes, meant to store and parse audit logs. After setting up the logging architecture, run K8sCop for static or streaming analysis, and import the security dashboard in Kibana to obtain full visibility over Kubernetes cluster activity.

TL;DR

  • Make the kube-apiserver store audit logs
  • Set up Elasticsearch and Kibana outside or inside Kubernetes
  • Deploy the Fluent daemon to push logs to Elasticsearch
  • Run K8sCop for static or streaming analysis of logs and labelling of events
  • Import and view the Security Dashboard in Kibana

Big Picture

Installation

kube-apiserver arguments

The kube-apiserver has the possiblity to keep and store audit logs. By adding the following arguments to the /etc/kubernetes/manifests/kube-apiserver.yaml file:

containers:
  - command:
    - kube-apiserver
    [arguments]
    - --audit-policy-file=/etc/kubernetes/policies/adv-audit.yaml
    - --audit-log-path=/var/log/kubernetes/kube-apiserver-audit.log
    - --audit-log-format=json
    [arguments]
  volumeMounts:
   [options]
    - mountPath: /etc/kubernetes/policies
      name: policies
      readOnly: true
    - mountPath: /var/log/kubernetes
[options]
 - hostPath:
   path: /etc/kubernetes/policies
   type: DirectoryOrCreate
  name: policies
- hostPath:
   path: /var/log/kubernetes
   type: DirectoryOrCreate
  name: var-log-kubernetes

An example configuration file can be found here. Create the policies directory in /etc/kubernetes and copy this yaml file to the newly created directory.

Setting up Elasticsearch and Kibana

Follow this very nice and detailed guide on DigitalOcean.

Deploying fluent

Preparation

Create the mount directory for the fluent configuration:

# mkdir -p /var/share/volumes/fluent/etc

Add the files from the configs/fluent folder:

# cp entrypoint.sh Gemfile /var/share/volumes/fluent/.
# cp fluent.conf /var/share/volumes/fluent/etc/.

Change the environment variables to connect to the installed elasticsearch installation:

     - name: fluentd
        image: fluent/fluentd-kubernetes-daemonset:v1.1-debian-elasticsearch
        env:
          - name:  FLUENT_ELASTICSEARCH_HOST
            value: "192.168.178.65"
          - name:  FLUENT_ELASTICSEARCH_PORT
            value: "9200"
          - name: FLUENT_ELASTICSEARCH_SCHEME
            value: "http"
          - name: FLUENT_UID
            value: "0"
          - name: FLUENT_ELASTICSEARCH_USER # even if not used they are necessary
            value: "foo"
          - name: FLUENT_ELASTICSEARCH_PASSWORD # even if not used they are necessary
            value: "bar"
        resources:

Deployment

Apply the yaml configuration file:

$ kubectl apply -f fluentd-setup.yml

There should be a kube-logging namespace, containing a volume (claim), a fluent pod and service account.

Debugging

To check the progress or to debug error messages, run the following command:

$ kubectl --namespace kube-logging logs fluent-[identifier] init-fluentd -f

This will stream the init containers' stdout/stderr while installing the required gems. Omit init-fluentd to stream the logs of the actual container.

K8sCop

K8sCop specifics are described here.

Security Dashboard

Preview

An overview of all requests made inside Kubernetes and a pie chart of user activity, computer by requests per user.

A pie chart of the different types of alerts and an overview of the latest alerts made by K8sCop.

An overview of shell commands executed and kubectl interaction, with a list of attempts at secrets retrieval and requests that have been unauthorised.

An overview of privileged pod spawning.

Importing the Dashboard

  • Navigate to the management interface of Kibana
  • Go into Saved Objects
  • Import the json objects file
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].