implementing-runtime-security-with-tetragon
यह क्या करती है
Tetragon एक ऐसा टूल है जो Kubernetes में चल रहे आपके ऐप्स पर नज़र रखता है और उनकी सुरक्षा करता है। यह देखता है कि प्रोग्राम क्या कर रहे हैं (जैसे फ़ाइल खोलना या नेटवर्क से कनेक्ट होना) और सीधे ऑपरेटिंग सिस्टम के स्तर पर खतरनाक काम को रोक भी सकता है।
कब इस्तेमाल करें
- ✓Kubernetes में runtime security इंस्टॉल या कॉन्फ़िगर करते समय।
- ✓यह सुनिश्चित करने के लिए कि आपके ऐप्स कुछ खास सुरक्षा नियमों का पालन करें।
- ✓अपने containers के अंदर होने वाली संदिग्ध गतिविधियों का पता लगाने और उन्हें ब्लॉक करने के लिए।
Skill का लिंक
https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/implementing-runtime-security-with-tetragon/SKILL.mdइसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।
कैसे इस्तेमाल करें
सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
AI से क्या माँगें: उदाहरण
“मैं चाहता हूँ कि अगर कोई प्रोग्राम /etc/shadow फ़ाइल को एक्सेस करने की कोशिश करे, तो Tetragon मुझे अलर्ट करे।”
हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।
यह कैसे काम करती है
Tetragon eBPF नाम की तकनीक इस्तेमाल करता है, जिससे वह Linux kernel के अंदर होने वाली गतिविधियों को देख और नियंत्रित कर सकता है। यह घटनाओं पर नज़र रखने के लिए नियम तय करता है और किसी प्रोग्राम को बंद करने या किसी काम को ब्लॉक करने जैसी कार्रवाई भी कर सकता है।
तकनीकी सामग्री (मूल SKILL.md)
लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।
Implementing Runtime Security with Tetragon
Overview
Tetragon is a CNCF project under Cilium that provides flexible Kubernetes-aware security observability and runtime enforcement using eBPF. By operating at the Linux kernel level, Tetragon can monitor and enforce policies on process execution, file access, network connections, and system calls with less than 1% performance overhead -- far more efficient than traditional user-space security agents.
When to Use
- When deploying or configuring implementing runtime security with tetragon capabilities in your environment
- When establishing security controls aligned to compliance requirements
- When building or improving security architecture for this domain
- When conducting security assessments that require this implementation
Prerequisites
- Kubernetes cluster v1.24+ with Helm 3.x installed
- Linux kernel 5.4+ (5.10+ recommended for full eBPF feature support)
- kubectl access with cluster-admin privileges
- Familiarity with eBPF concepts and Kubernetes security primitives
Core Concepts
eBPF-Based Security
Tetragon attaches eBPF programs directly to kernel functions, enabling:
- Process lifecycle tracking: Monitor every process creation, execution, and termination across all pods
- File integrity monitoring: Detect unauthorized reads/writes to sensitive files
- Network observability: Track all TCP/UDP connections with full pod context
- System call filtering: Enforce policies on dangerous syscalls like ptrace, mount, or unshare
TracingPolicy Custom Resources
Tetragon uses TracingPolicy CRDs to define what kernel events to observe and what actions to take:
apiVersion: cilium.io/v1alpha1
kind: TracingPolicy
metadata:
name: detect-privilege-escalation
spec:
kprobes:
- call: "security_bprm_check"
syscall: false
args:
- index: 0
type: "linux_binprm"
selectors:
- matchBinaries:
- operator: "In"
values:
- "/bin/su"
- "/usr/bin/sudo"
- "/usr/bin/passwd"
matchNamespaces:
- namespace: Pid
operator: NotIn
values:
- "host_ns"
matchActions:
- action: Post
Enforcement Actions
Tetragon can take three types of actions directly in the kernel:
- Sigkill: Immediately terminate the offending process
- Signal: Send a configurable signal to the process
- Override: Override the return value of a kernel function to deny an operation
Installation and Configuration
Step 1: Install Tetragon with Helm
helm repo add cilium https://helm.cilium.io
helm repo update
helm install tetragon cilium/tetragon \
--namespace kube-system \
--set tetragon.enableProcessCred=true \
--set tetragon.enableProcessNs=true \
--set tetragon.grpc.address="localhost:54321"
Step 2: Install the Tetragon CLI
GOOS=$(go env GOOS)
GOARCH=$(go env GOARCH)
curl -L --remote-name-all \
https://github.com/cilium/tetragon/releases/latest/download/tetra-${GOOS}-${GOARCH}.tar.gz
tar -xzvf tetra-${GOOS}-${GOARCH}.tar.gz
sudo install tetra /usr/local/bin/
Step 3: Verify Installation
kubectl get pods -n kube-system -l app.kubernetes.io/name=tetragon
tetra status
Practical Implementation
Detecting Container Escape Attempts
Create a TracingPolicy to detect processes attempting to escape container namespaces:
apiVersion: cilium.io/v1alpha1
kind: TracingPolicy
metadata:
name: detect-container-escape
spec:
kprobes:
- call: "__x64_sys_setns"
syscall: true
args:
- index: 0
type: "int"
- index: 1
type: "int"
selectors:
- matchNamespaces:
- namespace: Pid
operator: NotIn
values:
- "host_ns"
matchActions:
- action: Sigkill
Monitoring Sensitive File Access
Detect reads of sensitive credentials:
apiVersion: cilium.io/v1alpha1
kind: TracingPolicy
metadata:
name: monitor-sensitive-files
spec:
kprobes:
- call: "security_file_open"
syscall: false
args:
- index: 0
type: "file"
selectors:
- matchArgs:
- index: 0
operator: "Prefix"
values:
- "/etc/shadow"
- "/etc/kubernetes/pki"
…
अक्सर पूछे जाने वाले सवाल
eBPF क्या है?
eBPF एक ऐसी तकनीक है जिसकी मदद से Linux kernel के कोड को बदले बिना उसके अंदर छोटे प्रोग्राम सुरक्षित तरीके से चलाए जा सकते हैं। इससे सिस्टम पर बहुत तेज़ और कुशल तरीके से नज़र रखी और नियंत्रण किया जा सकता है।
'syscalls' क्या होते हैं?
System calls वह तरीका है जिससे प्रोग्राम ऑपरेटिंग सिस्टम से कोई काम करवाने के लिए कहते हैं, जैसे फ़ाइल पढ़ना या नया process बनाना। Tetragon इन calls पर नज़र रख सकता है और इन्हें ब्लॉक भी कर सकता है।
'TracingPolicy' क्या है?
TracingPolicy एक configuration फ़ाइल है जो आप बनाते हैं, ताकि Tetragon को पता चले कि किन घटनाओं पर नज़र रखनी है और उनके होने पर क्या करना है। यह Tetragon को विशेष निर्देश देने जैसा है।
जानकारी
लेखक का मूल विवरण
Implements eBPF-based runtime observability and in-kernel enforcement in Kubernetes with Cilium Tetragon, monitoring process execution, file access, network connections, and syscalls, and blocking dangerous calls at the kernel level. Use when deploying Tetragon to detect or block syscalls such as ptrace, mount, and unshare, enforcing kernel-level policy, or adding low-overhead runtime detection to
लोकप्रियता
- GitHub स्टार
- 35k
- रैंकिंग में स्थान
- #8110
- लाइसेंस
- Apache-2.0
- अपडेट की गई
- 31/8/2026
कमेंट
- …
इस repository की और skills
abusing-dpapi-for-credential-access
35kआपके AI एजेंट को किसी खास काम के लिए तैयार instructions देता है, ताकि वह उसे बेहतर और तेज़ी से कर सके।
abusing-shadow-credentials-for-privesc
35kआपके AI एजेंट को साफ़ और अच्छी तरह से व्यवस्थित लिखना सिखाता है।
achieving-cmmc-level-2-compliance
35kयह आपके एजेंट को CMMC Level 2 compliance के लिए environment तैयार करने में मदद करता है। यह security requirements लागू करता है और ज़रूरी documentation संभालता है।
acquiring-disk-image-with-dd-and-dcfldd
35kआपके एजेंट को hard drives की exact copies बनाने में मदद करता है। जाँच के दौरान किसी भी जानकारी के खोने या बदलने से बचाने के लिए यह उपयोगी है।
मिलती-जुलती skills
openclaw-update
394kयह आपके एजेंट को चल रहे OpenClaw Gateway को अपडेट करने में मदद करती है, इंस्टॉल के तरीके के अनुसार सही विधि चुनकर और सेशन बनाए रखकर।
diagnose-gateway
394kयह आपके एजेंट को सेटिंग्स, चैनल और पोर्ट जांचकर पता लगाने देती है कि OpenClaw Gateway क्यों फ़ेल हो रहा है, बिना कुछ बदले।
crabbox-apps
394kयह आपके एजेंट को किसी अस्थायी क्लाउड मशीन पर ऐप खोलने और चलाने देती है, फिर उसका व्यू आपके चैट के साइड पैनल में दिखाती है।