Git Product home page Git Product logo

kube-tarian / tarian Goto Github PK

View Code? Open in Web Editor NEW
54.0 5.0 14.0 12.32 MB

Protect your Cloud Native Applications running on Kubernetes from malicious attacks with pre-registered source code, pre-registered runtime processes monitoring, automated actions based on configure-actions, analytics, alerting and also sharing detections with community. Maybe save from Ransomware. Shift-Left your threat detection. Shift Right threat elimination.

License: Apache License 2.0

Makefile 2.05% Go 96.58% Shell 0.96% Dockerfile 0.42%
devsecops microservices containers security security-tools security-hardening tarian cloudnative antivirus runtime-security

tarian's Introduction

Tarian

Protect your applications running on Kubernetes from malicious attacks by pre-registering your trusted processes and trusted file signatures. Tarian will detect unknown processes and changes to the registered files, then it will send alerts and take an automated action. Save your K8s environment from Ransomware!

We want to maintain this as an open-source project to fight against the attacks on our favorite Kubernetes ecosystem. By continuous contribution, we can fight threats together as a community.

Build status Go Report Card codecov


How does Tarian work?

Tarian Cluster Agent runs in Kubernetes cluster detecting unknown processes and unknown changes to files, report them to Tarian Server, and optionally take action: delete the violated pod. It uses eBPF to detect new processes. For file change detection, Tarian Cluster Agent injects a sidecar container in your main application's pod which will check file checksums in the configured path and compare them with the registered checksums in Tarian Server. Tarian will be a part of your Application's pod from dev to prod environment, hence you can register to your Tarian DB what is supposed to be happening & running in your container + file signatures to be watched + what can be notified + action to take (self destroy the pod) based on changes detected. Shift-left your detection mechanism!

What if an unknown change happens inside the container which is not in Tarian's registration DB, how does Tarian react to it?

If an unknown change happens, Tarian can simply notify observed analytics to your Security Team. Then your Security Engineers can register that change in Tarian DB whether it's considered a threat or not. Also, based on their analysis they can configure what action to take when that change happens again.

How does the contribution of community helps to fight against the threats via Tarian?

Any new detection analyzed & marked as a threat by your Security Experts, if they choose, can be shared to the open-source Tarian community DB with all the logs, strings to look for, observation, transparency, actions to configure, ... Basically anything the Experts want to warn about & share with the community. You can use that information as a Tarian user and configure actions in the Tarian app which is used in your environment. This is basically a mechanism to share info about threats & what to do with them. This helps everyone using Tarian to take actions together in their respective K8s environments by sharing their knowledge & experience.

What kind of action(s) would Tarian take based on known threat(s)?

Tarian would simply self destroy the pod it's running on. If the malware/virus spreads to the rest of the environment, well you know what happens. So, Tarian is basically designed to help reduce the risk as much as possible by destroying pods. Provisioning a new pod will be taken care of by K8s deployment. Tarian will only do destruction of the pods only if you tell Tarian to do so. If you don't want any actions to happen, you don't have to configure or trigger any; you can simply tell Tarian to just notify you. Tarian basically does what you want to be done to reduce the risk.

Why another new security tool when there are many tools available already, like Falco, Kube-Hunter, Kube-Bench, Calico Enterprise Security, and many more security tools (open-source & commercial) that can detect & prevent threats at network, infra & application level? Why Tarian?

The main reason Tarian was born is to fight against threats in Kubernetes together as a community. Another reason was, what if there is still some sophisticated attack which is capable of penetrating every layer of your security, able to reach your runtime app (Remote Code Execution) and your storage volumes, and capable of spreading to damage or lock your infra & data?! What do you want to do about such attacks, especially which turns into ransomware. Tarian is designed to reduce such risks, by taking action(s). We know that Tarian is not the ultimate solution, but we are confident that it can help reduce risks especially when knowledge is shared continuously by the community. From a technical perspective, Tarian can help reduce the risk by destroying the infected resources.

Architecture diagram

Arch. Diagram

Requirements

  • Supported Kubernetes version (currently 1.22+)
  • Kernel version >= 5.8
  • Kernel with BTF information to support eBPF CO-RE. Some major Linux distributions come with kernel BTF already built in. If your kernel doesn't come with BTF built-in, you'll need to build custom kernel. See BPF CO-RE.

Tested on popular Kubernetes Environments/Services:

Environment Working Notes
Kind v0.14.0 ✔️
Minikube v1.26.0 ✔️
Linode Kubernetes Engine (LKE) 1.22 ✔️
Digital Ocean Kubernetes Engine (DOKS) 1.22 ✔️
Google Kubernetes Engine (GKE) 1.22 ✔️
Amazon Elastic Kubernetes Engine (EKS) kernel < 5.8
Azure Kubernetes Service (AKS) kernel < 5.8

Prepare Namespaces

kubectl create namespace tarian-system

Setup Dgraph Database

You can use any Dgraph installation option as long as it can be accessed from the tarian server.

Install tarian

  1. Install tarian using Helm
helm repo add tarian https://kube-tarian.github.io/helm-charts
helm repo update

helm upgrade -i tarian-server tarian/tarian-server --devel -n tarian-system --set server.dgraph.address=DGRAPH_ADDRESS:PORT
helm upgrade -i tarian-cluster-agent tarian/tarian-cluster-agent --devel -n tarian-system
  1. Wait for all the pods to be ready
kubectl wait --for=condition=ready pod --all -n tarian-system
  1. Apply Dgraph schema
kubectl exec -ti deploy/tarian-server -n tarian-system -- ./tarian-server dgraph apply-schema

Install tarian using tarianctl cli

Download tarianctl bin from github release page.

Run:

tarianctl install

You can use following flags to customize your installation.

Install Tarian on Kubernetes.

Usage:
  tarianctl install [flags]

Flags:
      --agents-values strings   Path to the helm values file for Tarian Cluster Agent and Node agent .
      --charts string           Path to the tarian helm charts directory.
      --dgraph-values strings   Path to the helm values file for DGraph.
  -h, --help                    help for install
  -n, --namespace string        Namespace to install Tarian. (default "tarian-system")
      --nats-values strings     Path to the helm values file for Nats.
      --server-values strings   Path to the helm values file for Tarian Server.

Global Flags:
  -k, --kubeconfig string                 path to the kubeconfig file to use
  -e, --log-formatter string              valid log formatters: json, text(default) (default "text")
  -l, --log-level string                  valid log levels: debug, info(default), warn/warning, error, fatal (default "info")
  -s, --server-address string             tarian server address to communicate with (default "localhost:50051")
  -c, --server-tls-ca-file string         ca file that server uses for TLS connection
  -t, --server-tls-enabled                if enabled, it will communicate with the server using TLS
  -i, --server-tls-insecure-skip-verify   if set to true, it will skip server's certificate chain and hostname verification (default true)

Configuration

See helm chart values for

Cloud / Vendor specific configuration

Private GKE cluster

Private GKE cluster by default creates firewall rules to restrict master to nodes communication only on ports 443 and 10250. To inject tarian-pod-agent container, tarian uses a mutating admission webhook. The webhook server runs on port 9443. So, we need to create a new firewall rule to allow ingress from master IP address range to nodes on tcp port 9443.

For more details, see GKE docs on this topic: https://cloud.google.com/kubernetes-engine/docs/how-to/private-clusters#add_firewall_rules.

Usage

Use tarianctl to control tarian-server

  1. Download from Github release page
  2. Extract the file and copy tarianctl to your PATH directory
  3. Expose tarian-server to your machine, through Ingress or port-forward. For this example, we'll use port-forward:
kubectl port-forward svc/tarian-server -n tarian-system 41051:80
  1. Configure server address with env var
export TARIAN_SERVER_ADDRESS=localhost:41051

To see violation events

tarianctl get events

Add a process constraint

tarianctl add constraint --name nginx --namespace default \
  --match-labels run=nginx \
  --allowed-processes=pause,tarian-pod-agent,nginx 
tarianctl get constraints

Add a file constraint

tarianctl add constraint --name nginx-files --namespace default \
  --match-labels run=nginx \
  --allowed-file-sha256sums=/usr/share/nginx/html/index.html=38ffd4972ae513a0c79a8be4573403edcd709f0f572105362b08ff50cf6de521
tarianctl get constraints

Run tarian agent in a pod

Then after the constraints are created, we inject tarian-pod-agent to the pod by adding an annotation:

metadata:
  annotations:
    pod-agent.k8s.tarian.dev/threat-scan: "true"

Pod with this annotation will have an additional container injected (tarian-pod-agent). The tarian-pod-agent container will continuously verify the runtime environment based on the registered constraints. Any violation would be reported, which would be accessible with tarianctl get events.

Demo: Try a pod that violates the constraints

kubectl apply -f https://raw.githubusercontent.com/kube-tarian/tarian/main/dev/config/monitored-pod/configmap.yaml
kubectl apply -f https://raw.githubusercontent.com/kube-tarian/tarian/main/dev/config/monitored-pod/pod.yaml

# wait for it to become ready
kubectl wait --for=condition=ready pod nginx

# simulate unknown process runs
kubectl exec -ti nginx -c nginx -- sleep 15

# you should see it reported in tarian
tarianctl get events

Alert Manager Integration

Tarian comes with Prometheus Alert Manager by default. If you want to use another alert manager instance:

helm install tarian-server tarian/tarian-server --devel \
  --set server.alert.alertManagerAddress=http://alertmanager.monitoring.svc:9093 \
  --set alertManager.install=false \
  -n tarian-system

To disable it, you can set the alertManagerAddress value to empty.

Troubleshooting

See docs/troubleshooting.md

Automatic Constraint Registration

When tarian-pod-agent runs in registration mode, instead of reporting unknown processes and files as violations, it automatically registers them as a new constraint. This is convenient to save time from registering manually.

To enable constraint registration, the cluster-agent needs to be configured.

helm install tarian-cluster-agent tarian/tarian-cluster-agent --devel -n tarian-system \
  --set clusterAgent.enableAddConstraint=true
metadata:
  annotations:
    # register both processes and file checksums
    pod-agent.k8s.tarian.dev/register: "processes,files"
    # ignore specific paths from automatic registration
    pod-agent.k8s.tarian.dev/register-file-ignore-paths: "/usr/share/nginx/**/*.txt"

Automatic constraint registration can also be done in a dev/staging cluster, so that there would be less changes in production.

Other supported annotations

metadata:
  annotations:
    # specify how often tarian-pod-agent should verify file checksum
    pod-agent.k8s.tarian.dev/file-validation-interval: "1m"

Securing tarian-server with TLS

To secure tarian-server with TLS, create a secret containing the TLS certificate. You can create the secret manually, or using Cert Manager. Once you have the secret, you can pass the name to the helm chart value:

helm upgrade -i tarian-server tarian/tarian-server --devel -n tarian-system \
  --set server.tlsSecretName=tarian-server-tls

Contributing

See docs/contributing.md

Code of Conduct

See CODE_OF_CONDUCT.md

CodeOwners & Maintainers list

See MAINTAINERS.md

Join our Slack channel " tarian "

Kube-Tarian-Slack

tarian's People

Contributors

andylibrian avatar deepsource-io[bot] avatar deepsourcebot avatar devopstoday11 avatar juricav avatar kumari-anupam avatar mend-bolt-for-github[bot] avatar pratikjagrut 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

tarian's Issues

CVE-2021-38561 (High) detected in github.com/driftprogramming/pgxpoolmock-v1.1.0

CVE-2021-38561 - High Severity Vulnerability

Vulnerable Library - github.com/driftprogramming/pgxpoolmock-v1.1.0

pgx postgresql pool

Dependency Hierarchy:

  • github.com/driftprogramming/pgxpoolmock-v1.1.0 (Vulnerable Library)

Found in HEAD commit: 7c7cbc463791d4bd71514bd1e2ff1330e59fb423

Found in base branch: main

Vulnerability Details

Due to improper index calculation, an incorrectly formatted language tag can cause Parse
to panic, due to an out of bounds read. If Parse is used to process untrusted user inputs,
this may be used as a vector for a denial of service attack.

Publish Date: 2021-08-12

URL: CVE-2021-38561

CVSS 3 Score Details (7.5)

Base Score Metrics:

  • Exploitability Metrics:
    • Attack Vector: Network
    • Attack Complexity: Low
    • Privileges Required: None
    • User Interaction: None
    • Scope: Unchanged
  • Impact Metrics:
    • Confidentiality Impact: None
    • Integrity Impact: None
    • Availability Impact: High

For more information on CVSS3 Scores, click here.

Suggested Fix

Type: Upgrade version

Origin: https://osv.dev/vulnerability/GO-2021-0113

Release Date: 2021-08-12

Fix Resolution: v0.3.7


Step up your Open Source Security Game with Mend here

CVE-2022-41723 (High) detected in golang.org/x/net-v0.4.0

CVE-2022-41723 - High Severity Vulnerability

Vulnerable Library - golang.org/x/net-v0.4.0

[mirror] Go supplementary network libraries

Library home page: https://proxy.golang.org/golang.org/x/net/@v/v0.4.0.zip

Dependency Hierarchy:

  • golang.org/x/net-v0.4.0 (Vulnerable Library)

Found in HEAD commit: b0be065f9e28779265ec18f0ebb8e9580aca195c

Found in base branch: main

Vulnerability Details

A maliciously crafted HTTP/2 stream could cause excessive CPU consumption in the HPACK decoder, sufficient to cause a denial of service from a small number of small requests.

Publish Date: 2023-02-28

URL: CVE-2022-41723

CVSS 3 Score Details (7.5)

Base Score Metrics:

  • Exploitability Metrics:
    • Attack Vector: Network
    • Attack Complexity: Low
    • Privileges Required: None
    • User Interaction: None
    • Scope: Unchanged
  • Impact Metrics:
    • Confidentiality Impact: None
    • Integrity Impact: None
    • Availability Impact: High

For more information on CVSS3 Scores, click here.

Suggested Fix

Type: Upgrade version

Origin: https://osv.dev/vulnerability/GO-2023-1568

Release Date: 2022-09-29

Fix Resolution: v0.7.0


Step up your Open Source Security Game with Mend here

WS-2021-0200 (High) detected in github.com/driftprogramming/pgxpoolmock-v1.1.0

WS-2021-0200 - High Severity Vulnerability

Vulnerable Library - github.com/driftprogramming/pgxpoolmock-v1.1.0

pgx postgresql pool

Dependency Hierarchy:

  • github.com/driftprogramming/pgxpoolmock-v1.1.0 (Vulnerable Library)

Found in HEAD commit: 7c7cbc463791d4bd71514bd1e2ff1330e59fb423

Found in base branch: main

Vulnerability Details

Yaml in versions v2.2.0 to v2.2.2 is vulnerable to denial of service vector.
Related to decode.go

Publish Date: 2021-04-14

URL: WS-2021-0200

CVSS 3 Score Details (7.5)

Base Score Metrics:

  • Exploitability Metrics:
    • Attack Vector: Network
    • Attack Complexity: Low
    • Privileges Required: None
    • User Interaction: None
    • Scope: Unchanged
  • Impact Metrics:
    • Confidentiality Impact: None
    • Integrity Impact: None
    • Availability Impact: High

For more information on CVSS3 Scores, click here.

Suggested Fix

Type: Upgrade version

Origin: https://osv.dev/vulnerability/GO-2021-0061

Release Date: 2021-04-14

Fix Resolution: v2.2.3


Step up your Open Source Security Game with Mend here

Dgraph query to avoid empty rows

After integration tarian with tarian-detector, tarian-detector was adding lots of empty events to dgraph store. As part of this task, updated the dgraph query to avoid lot of empty rows.

Current working directory

Extract the information of current working directory for providing more context for the captured data.

Enhance Code Security with Pre-Commit Hooks

We are taking proactive steps to embed security into our coding practices, improve adherence to language-specific best practices, strengthen and secure our Software Configuration Management (SCM) workflow, and fortify our release process.

As part of this effort, we have prepared a process to include pre-commit hooks in our development workflow. These hooks serve as a crucial line of defense, helping us catch potential issues before they become problems.

Action required

To make it easy for all members of our development team to integrate these hooks, we have compiled templates for various languages and technologies. You can find these templates in our dedicated repository in Tarian's case, we can use pre-commit hooks for Golang:

Your cooperation in implementing these hooks is greatly appreciated. If you encounter any issues during the installation or have any recommendations or questions, please feel free to reach out to me.

Let's work together to make our development process more secure and efficient.

CVE-2020-28851 (High) detected in github.com/driftprogramming/pgxpoolmock-v1.1.0

CVE-2020-28851 - High Severity Vulnerability

Vulnerable Library - github.com/driftprogramming/pgxpoolmock-v1.1.0

pgx postgresql pool

Dependency Hierarchy:

  • github.com/driftprogramming/pgxpoolmock-v1.1.0 (Vulnerable Library)

Found in HEAD commit: cc6c9f9cacce9cb0687bb10f9bae4c0752e98873

Found in base branch: main

Vulnerability Details

In x/text in Go 1.15.4, an "index out of range" panic occurs in language.ParseAcceptLanguage while parsing the -u- extension. (x/text/language is supposed to be able to parse an HTTP Accept-Language header.)

Publish Date: 2021-01-02

URL: CVE-2020-28851

CVSS 3 Score Details (7.5)

Base Score Metrics:

  • Exploitability Metrics:
    • Attack Vector: Network
    • Attack Complexity: Low
    • Privileges Required: None
    • User Interaction: None
    • Scope: Unchanged
  • Impact Metrics:
    • Confidentiality Impact: None
    • Integrity Impact: None
    • Availability Impact: High

For more information on CVSS3 Scores, click here.

Suggested Fix

Type: Upgrade version

Origin: https://nvd.nist.gov/vuln/detail/CVE-2020-28851

Release Date: 2021-01-02

Fix Resolution: golang-golang-x-text-dev - 0.3.6-1,0.3.6-1


Step up your Open Source Security Game with Mend here

CVE-2022-21698 (High) detected in github.com/prometheus/client_golang-v1.11.0 - autoclosed

CVE-2022-21698 - High Severity Vulnerability

Vulnerable Library - github.com/prometheus/client_golang-v1.11.0

Prometheus instrumentation library for Go applications

Dependency Hierarchy:

  • github.com/falcosecurity/falcosidekick-2.25.0 (Root Library)
    • github.com/prometheus/client_golang-v1.11.0 (Vulnerable Library)

Found in HEAD commit: 7c7cbc463791d4bd71514bd1e2ff1330e59fb423

Found in base branch: main

Vulnerability Details

client_golang is the instrumentation library for Go applications in Prometheus, and the promhttp package in client_golang provides tooling around HTTP servers and clients. In client_golang prior to version 1.11.1, HTTP server is susceptible to a Denial of Service through unbounded cardinality, and potential memory exhaustion, when handling requests with non-standard HTTP methods. In order to be affected, an instrumented software must use any of promhttp.InstrumentHandler* middleware except RequestsInFlight; not filter any specific methods (e.g GET) before middleware; pass metric with method label name to our middleware; and not have any firewall/LB/proxy that filters away requests with unknown method. client_golang version 1.11.1 contains a patch for this issue. Several workarounds are available, including removing the method label name from counter/gauge used in the InstrumentHandler; turning off affected promhttp handlers; adding custom middleware before promhttp handler that will sanitize the request method given by Go http.Request; and using a reverse proxy or web application firewall, configured to only allow a limited set of methods.

Publish Date: 2022-02-15

URL: CVE-2022-21698

CVSS 3 Score Details (7.5)

Base Score Metrics:

  • Exploitability Metrics:
    • Attack Vector: Network
    • Attack Complexity: Low
    • Privileges Required: None
    • User Interaction: None
    • Scope: Unchanged
  • Impact Metrics:
    • Confidentiality Impact: None
    • Integrity Impact: None
    • Availability Impact: High

For more information on CVSS3 Scores, click here.

Suggested Fix

Type: Upgrade version

Origin: GHSA-cg3q-j54f-5p7p

Release Date: 2022-02-15

Fix Resolution: v1.11.1


Step up your Open Source Security Game with Mend here

CVE-2022-30633 (High) detected in golang.org/x/net-v0.0.0-20220225172249-27dd8689420f - autoclosed

CVE-2022-30633 - High Severity Vulnerability

Vulnerable Library - golang.org/x/net-v0.0.0-20220225172249-27dd8689420f

[mirror] Go supplementary network libraries

Library home page: https://proxy.golang.org/golang.org/x/net/@v/v0.0.0-20220225172249-27dd8689420f.zip

Dependency Hierarchy:

  • golang.org/x/net-v0.0.0-20220225172249-27dd8689420f (Vulnerable Library)

Found in HEAD commit: 09aefa75b70358aa642a8cd6fdad4a71c77d1f68

Found in base branch: main

Vulnerability Details

Uncontrolled recursion in Unmarshal in encoding/xml before Go 1.17.12 and Go 1.18.4 allows an attacker to cause a panic due to stack exhaustion via unmarshalling an XML document into a Go struct which has a nested field that uses the 'any' field tag.

Publish Date: 2022-08-10

URL: CVE-2022-30633

CVSS 3 Score Details (7.5)

Base Score Metrics:

  • Exploitability Metrics:
    • Attack Vector: Network
    • Attack Complexity: Low
    • Privileges Required: None
    • User Interaction: None
    • Scope: Unchanged
  • Impact Metrics:
    • Confidentiality Impact: None
    • Integrity Impact: None
    • Availability Impact: High

For more information on CVSS3 Scores, click here.

Suggested Fix

Type: Upgrade version

Origin: https://security-tracker.debian.org/tracker/CVE-2022-30633

Release Date: 2022-05-13

Fix Resolution: go1.17.12,go1.18.4


Step up your Open Source Security Game with Mend here

Improve test suite

This issue is a placeholder for someone who wants to contribute to improve the test suite:

  • unit tests
  • end-to-end tests (with and without k8s)

See also contributing.md

CVE-2020-28852 (High) detected in github.com/driftprogramming/pgxpoolmock-v1.1.0

CVE-2020-28852 - High Severity Vulnerability

Vulnerable Library - github.com/driftprogramming/pgxpoolmock-v1.1.0

pgx postgresql pool

Dependency Hierarchy:

  • github.com/driftprogramming/pgxpoolmock-v1.1.0 (Vulnerable Library)

Found in HEAD commit: cc6c9f9cacce9cb0687bb10f9bae4c0752e98873

Found in base branch: main

Vulnerability Details

In x/text in Go before v0.3.5, a "slice bounds out of range" panic occurs in language.ParseAcceptLanguage while processing a BCP 47 tag. (x/text/language is supposed to be able to parse an HTTP Accept-Language header.)

Publish Date: 2021-01-02

URL: CVE-2020-28852

CVSS 3 Score Details (7.5)

Base Score Metrics:

  • Exploitability Metrics:
    • Attack Vector: Network
    • Attack Complexity: Low
    • Privileges Required: None
    • User Interaction: None
    • Scope: Unchanged
  • Impact Metrics:
    • Confidentiality Impact: None
    • Integrity Impact: None
    • Availability Impact: High

For more information on CVSS3 Scores, click here.

Suggested Fix

Type: Upgrade version

Origin: https://nvd.nist.gov/vuln/detail/CVE-2020-28852

Release Date: 2021-01-02

Fix Resolution: golang-golang-x-text-dev - 0.3.5-1,0.3.5-1


Step up your Open Source Security Game with Mend here

Improve documentation

This issue is a placeholder for someone who wants to contribute to improve the documentation:

  • readme.md
  • docs/*.md

Anything valuable would be accepted. It can be fixing example, fixing grammar, improving clarity, covering more cases, etc.

CVE-2022-27191 (High) detected in github.com/golang/crypto-5ff15b29337e062d850872081bcd9f4d784f4c25 - autoclosed

CVE-2022-27191 - High Severity Vulnerability

Vulnerable Library - github.com/golang/crypto-5ff15b29337e062d850872081bcd9f4d784f4c25

[mirror] Go supplementary cryptography libraries

Dependency Hierarchy:

  • github.com/kubernetes/client-go-v0.21.3 (Root Library)
    • github.com/azure/go-autorest/autorest/adal-autorest/azure/auth/v0.5.6
      • github.com/golang/crypto-5ff15b29337e062d850872081bcd9f4d784f4c25 (Vulnerable Library)

Found in HEAD commit: 7c7cbc463791d4bd71514bd1e2ff1330e59fb423

Found in base branch: main

Vulnerability Details

The golang.org/x/crypto/ssh package before 0.0.0-20220314234659-1baeb1ce4c0b for Go allows an attacker to crash a server in certain circumstances involving AddHostKey.

Publish Date: 2022-03-18

URL: CVE-2022-27191

CVSS 3 Score Details (7.5)

Base Score Metrics:

  • Exploitability Metrics:
    • Attack Vector: Network
    • Attack Complexity: Low
    • Privileges Required: None
    • User Interaction: None
    • Scope: Unchanged
  • Impact Metrics:
    • Confidentiality Impact: None
    • Integrity Impact: None
    • Availability Impact: High

For more information on CVSS3 Scores, click here.

Suggested Fix

Type: Upgrade version

Origin: https://nvd.nist.gov/vuln/detail/CVE-2022-27191

Release Date: 2022-03-18

Fix Resolution: golang-golang-x-crypto-dev - 1:0.0~git20220315.3147a52-1;golang-go.crypto-dev - 1:0.0~git20220315.3147a52-1


Step up your Open Source Security Game with Mend here

CVE-2021-43565 (High) detected in github.com/golang/crypto-5ff15b29337e062d850872081bcd9f4d784f4c25 - autoclosed

CVE-2021-43565 - High Severity Vulnerability

Vulnerable Library - github.com/golang/crypto-5ff15b29337e062d850872081bcd9f4d784f4c25

[mirror] Go supplementary cryptography libraries

Dependency Hierarchy:

  • github.com/kubernetes/client-go-v0.21.3 (Root Library)
    • github.com/azure/go-autorest/autorest/adal-autorest/azure/auth/v0.5.6
      • github.com/golang/crypto-5ff15b29337e062d850872081bcd9f4d784f4c25 (Vulnerable Library)

Found in HEAD commit: 7c7cbc463791d4bd71514bd1e2ff1330e59fb423

Found in base branch: main

Vulnerability Details

There's an input validation flaw in golang.org/x/crypto's readCipherPacket() function. An unauthenticated attacker who sends an empty plaintext packet to a program linked with golang.org/x/crypto/ssh could cause a panic, potentially leading to denial of service.

Publish Date: 2021-11-10

URL: CVE-2021-43565

CVSS 3 Score Details (7.5)

Base Score Metrics:

  • Exploitability Metrics:
    • Attack Vector: Network
    • Attack Complexity: Low
    • Privileges Required: None
    • User Interaction: None
    • Scope: Unchanged
  • Impact Metrics:
    • Confidentiality Impact: None
    • Integrity Impact: None
    • Availability Impact: High

For more information on CVSS3 Scores, click here.

Suggested Fix

Type: Upgrade version

Origin: https://nvd.nist.gov/vuln/detail/CVE-2021-43565

Release Date: 2021-11-10

Fix Resolution: golang-golang-x-crypto-dev - 1:0.0~git20211202.5770296-1;golang-go.crypto-dev - 1:0.0~git20211202.5770296-1


Step up your Open Source Security Game with Mend here

Falco Integration

Integrate with Falco using grpc. Pull the alerts and save to tarian events.

migrate tarian DB from postgresql to DGraph

The reason for DB migration is, that we did some assessments on which DB would be more reliable from ML analytics perspective. looks like graph DB is more efficient to be able to map relationships in 360 degrees and query bulk of data at once using GraphQL. Also, ML model will sit on every cluster as another daemonset and do the analysis of data immediately (even before storing data into a DB) as soon as Tarian daemonset fetches the data.
and a graph DB will help with further observability & querying in an efficient way.

Update Dockerfiles in the project

The Tarian project currently uses a variety of Dockerfiles. While these Dockerfiles are based on Chainguard's static images, we've pinned all base images to specific digests. However, Chainguard frequently updates their images, often daily, to address any discovered vulnerabilities. This practice of pinning to a digest means we miss out on automatically receiving these updated, more secure images.

My suggestion is to update the Dockerfiles' base images to use the latest tag from Chainguard's static image repository. Although generally, using the latest tag is not recommended, in the case of Chainguard images, it offers the significant benefit of ensuring our base images are always the most secure and vulnerability-free

@pratikjagrut @MrAzharuddin

Kubernetes aware eBPF program

Capture eBPF pod related data fields as mentioned below

  • namespace
  • name
  • container ID
  • container name
  • image ID
  • image name
  • start_time
  • pid
  • docker id
  • parent_exec_id
  • refcnt
  • node_name
  • time

CVE-2023-39325 (High) detected in golang.org/x/net-v0.4.0 - autoclosed

CVE-2023-39325 - High Severity Vulnerability

Vulnerable Library - golang.org/x/net-v0.4.0

[mirror] Go supplementary network libraries

Library home page: https://proxy.golang.org/golang.org/x/net/@v/v0.4.0.zip

Path to dependency file: /go.mod

Path to vulnerable library: /go.mod

Dependency Hierarchy:

  • golang.org/x/net-v0.4.0 (Vulnerable Library)

Found in HEAD commit: 163225d6c0e779d3d7694a62f24afc5538039735

Found in base branch: main

Vulnerability Details

A malicious HTTP/2 client which rapidly creates requests and immediately resets them can cause excessive server resource consumption. While the total number of requests is bounded by the http2.Server.MaxConcurrentStreams setting, resetting an in-progress request allows the attacker to create a new request while the existing one is still executing. With the fix applied, HTTP/2 servers now bound the number of simultaneously executing handler goroutines to the stream concurrency limit (MaxConcurrentStreams). New requests arriving when at the limit (which can only happen after the client has reset an existing, in-flight request) will be queued until a handler exits. If the request queue grows too large, the server will terminate the connection. This issue is also fixed in golang.org/x/net/http2 for users manually configuring HTTP/2. The default stream concurrency limit is 250 streams (requests) per HTTP/2 connection. This value may be adjusted using the golang.org/x/net/http2 package; see the Server.MaxConcurrentStreams setting and the ConfigureServer function.

Publish Date: 2023-10-11

URL: CVE-2023-39325

CVSS 3 Score Details (7.5)

Base Score Metrics:

  • Exploitability Metrics:
    • Attack Vector: Network
    • Attack Complexity: Low
    • Privileges Required: None
    • User Interaction: None
    • Scope: Unchanged
  • Impact Metrics:
    • Confidentiality Impact: None
    • Integrity Impact: None
    • Availability Impact: High

For more information on CVSS3 Scores, click here.

Suggested Fix

Type: Upgrade version

Origin: https://pkg.go.dev/vuln/GO-2023-2102

Release Date: 2023-10-11

Fix Resolution: go1.20.10, go1.21.3, golang.org/x/net - v0.17.0


Step up your Open Source Security Game with Mend here

Improve the output of tarianctl get events

The output of tarianctl get events was changed to support falco integration. File and process violations were displayed on separate field. Now that those are merged, the information needs to be improved.

implement similar method as package-hunter within Tarian

https://about.gitlab.com/blog/2021/07/23/announcing-package-hunter/

This can be done later.

To implement this method, doesn't require any special code development in Tarian. Tarian already works similar to package-hunter but Tarian is more advanced. We just have to provide a documented steps on how to setup Tarian in a separate sandbox environment & hunt for malicious activities continuously in that sandbox & report the detected malicious activities for further examination.

CVE-2019-11254 (Medium) detected in github.com/driftprogramming/pgxpoolmock-v1.1.0

CVE-2019-11254 - Medium Severity Vulnerability

Vulnerable Library - github.com/driftprogramming/pgxpoolmock-v1.1.0

pgx postgresql pool

Dependency Hierarchy:

  • github.com/driftprogramming/pgxpoolmock-v1.1.0 (Vulnerable Library)

Found in HEAD commit: 7c7cbc463791d4bd71514bd1e2ff1330e59fb423

Found in base branch: main

Vulnerability Details

The Kubernetes API Server component in versions 1.1-1.14, and versions prior to 1.15.10, 1.16.7 and 1.17.3 allows an authorized user who sends malicious YAML payloads to cause the kube-apiserver to consume excessive CPU cycles while parsing YAML.

Publish Date: 2020-04-01

URL: CVE-2019-11254

CVSS 3 Score Details (6.5)

Base Score Metrics:

  • Exploitability Metrics:
    • Attack Vector: Network
    • Attack Complexity: Low
    • Privileges Required: Low
    • User Interaction: None
    • Scope: Unchanged
  • Impact Metrics:
    • Confidentiality Impact: None
    • Integrity Impact: None
    • Availability Impact: High

For more information on CVSS3 Scores, click here.

Suggested Fix

Type: Upgrade version

Release Date: 2020-10-02

Fix Resolution: v2.2.8


Step up your Open Source Security Game with Mend here

give the feasibility to have constraints added as simple plug-in configurations and share among the community

The processes/files which needs to be marked as threats and take action against them, you already developed constraints. Give the flexibility to add constraints as add-ons (plug-ins) using a yaml file or json (preferably yaml). This will help to manage constraints easily. When using UI, these constraints should be built as yaml files in the background and saved as constraints configurations.
I am telling as yaml or json, you can come up with whichever easy process idea you get.
Basically, we want to make it easy to add/export/delete those constraints as a independent items. It will also help to easily share in the open-source community. For example, if a security expert figures out some process & it's files & it's logs are definitely a threat item(s), they can mark those are threats & add actions. The data related to that threat, what action to take, metadata & log data of that threat should be save as a configuration like a separate thing and can share that file (or few files) to opensource community of Tarian so that other Tarian Users can simply import that constraint configuration and add that threat related constraint config into their environment & be benefited from it without having to figure out same kind of threat again themselves.

Please let me know if it makes sense or want to discuss.

CVE-2022-29526 (Medium) detected in github.com/golang/sys-3681064d51587c1db0324b3d5c23c2ddbcff6e8f

CVE-2022-29526 - Medium Severity Vulnerability

Vulnerable Library - github.com/golang/sys-3681064d51587c1db0324b3d5c23c2ddbcff6e8f

[mirror] Go packages for low-level interaction with the operating system

Dependency Hierarchy:

  • github.com/golang/sys-3681064d51587c1db0324b3d5c23c2ddbcff6e8f (Vulnerable Library)

Found in HEAD commit: 7c7cbc463791d4bd71514bd1e2ff1330e59fb423

Found in base branch: main

Vulnerability Details

Go before 1.17.10 and 1.18.x before 1.18.2 has Incorrect Privilege Assignment. When called with a non-zero flags parameter, the Faccessat function could incorrectly report that a file is accessible.

Publish Date: 2022-06-23

URL: CVE-2022-29526

CVSS 3 Score Details (5.3)

Base Score Metrics:

  • Exploitability Metrics:
    • Attack Vector: Network
    • Attack Complexity: Low
    • Privileges Required: None
    • User Interaction: None
    • Scope: Unchanged
  • Impact Metrics:
    • Confidentiality Impact: Low
    • Integrity Impact: None
    • Availability Impact: None

For more information on CVSS3 Scores, click here.


Step up your Open Source Security Game with Mend here

Roadmap

https://github.com/kube-tarian/tarian/projects/1#card-75459234

Phase1:
Integration with Falco & Alertmanager
Register processes
Detect unknown processes
Configure automate actions
Perform automated actions
Export & Import threat details to share with community
Create & configure policies
Automate all the above with simple yaml declarations to make it developer friendly

Phase2:
Integration with eBPF (For enhancement), Quirefence and ThreatMapper.

Phase3:
Develop full UI with IODC

All phases:
Continuously improve APIs with openAPI standards.
Add integrations with new security tools.

Add seccomp automation in Tarian as enhancement later

CVE-2022-27664 (High) detected in golang.org/x/net-v0.0.0-20220225172249-27dd8689420f - autoclosed

CVE-2022-27664 - High Severity Vulnerability

Vulnerable Library - golang.org/x/net-v0.0.0-20220225172249-27dd8689420f

[mirror] Go supplementary network libraries

Library home page: https://proxy.golang.org/golang.org/x/net/@v/v0.0.0-20220225172249-27dd8689420f.zip

Dependency Hierarchy:

  • golang.org/x/net-v0.0.0-20220225172249-27dd8689420f (Vulnerable Library)

Found in HEAD commit: 09aefa75b70358aa642a8cd6fdad4a71c77d1f68

Found in base branch: main

Vulnerability Details

In net/http in Go before 1.18.6 and 1.19.x before 1.19.1, attackers can cause a denial of service because an HTTP/2 connection can hang during closing if shutdown were preempted by a fatal error.

Publish Date: 2022-09-06

URL: CVE-2022-27664

CVSS 3 Score Details (7.5)

Base Score Metrics:

  • Exploitability Metrics:
    • Attack Vector: Network
    • Attack Complexity: Low
    • Privileges Required: None
    • User Interaction: None
    • Scope: Unchanged
  • Impact Metrics:
    • Confidentiality Impact: None
    • Integrity Impact: None
    • Availability Impact: High

For more information on CVSS3 Scores, click here.


Step up your Open Source Security Game with Mend here

CVE-2022-28131 (High) detected in golang.org/x/net-v0.0.0-20220225172249-27dd8689420f - autoclosed

CVE-2022-28131 - High Severity Vulnerability

Vulnerable Library - golang.org/x/net-v0.0.0-20220225172249-27dd8689420f

[mirror] Go supplementary network libraries

Library home page: https://proxy.golang.org/golang.org/x/net/@v/v0.0.0-20220225172249-27dd8689420f.zip

Dependency Hierarchy:

  • golang.org/x/net-v0.0.0-20220225172249-27dd8689420f (Vulnerable Library)

Found in HEAD commit: 09aefa75b70358aa642a8cd6fdad4a71c77d1f68

Found in base branch: main

Vulnerability Details

In Decoder.Skip in encoding/xml in Go before 1.17.12 and 1.18.x before 1.18.4, stack exhaustion and a panic can occur via a deeply nested XML document.

Publish Date: 2022-08-10

URL: CVE-2022-28131

CVSS 3 Score Details (7.5)

Base Score Metrics:

  • Exploitability Metrics:
    • Attack Vector: Network
    • Attack Complexity: Low
    • Privileges Required: None
    • User Interaction: None
    • Scope: Unchanged
  • Impact Metrics:
    • Confidentiality Impact: None
    • Integrity Impact: None
    • Availability Impact: High

For more information on CVSS3 Scores, click here.

Suggested Fix

Type: Upgrade version

Origin: https://security-tracker.debian.org/tracker/CVE-2022-28131

Release Date: 2022-03-29

Fix Resolution: go1.17.12,go1.18.4


Step up your Open Source Security Game with Mend here

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.