मुख्य सामग्री पर जाएँ
Skillpedia
सिक्योरिटी35k · #8033

implementing-ebpf-security-monitoring

यह क्या करती है

यह टूल आपको किसी कंप्यूटर या सर्वर पर रियल-टाइम में चल रही गतिविधियों पर नज़र रखने देता है, जैसे कौन-से प्रोग्राम चल रहे हैं, कौन-सी फ़ाइलें एक्सेस हो रही हैं और कौन-से नेटवर्क कनेक्शन बन रहे हैं। यह काम बहुत तेज़ी से होता है, क्योंकि यह सीधे ऑपरेटिंग सिस्टम के 'core' (kernel) के अंदर से चलता है।

कब इस्तेमाल करें

  • ✓जब आपको Linux सर्वर या Kubernetes cluster पर ठीक-ठीक पता करना हो कि क्या हो रहा है।
  • ✓जब सामान्य मॉनिटरिंग टूल सिस्टम को धीमा कर देते हैं।
  • ✓जब आप खतरनाक प्रोग्राम को चलने से या ज़रूरी फ़ाइलों तक पहुँचने से रोकना चाहते हों।

Skill का लिंक

https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/implementing-ebpf-security-monitoring/SKILL.md

इसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।

कैसे इस्तेमाल करें

सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।

पेस्ट करने के लिए तैयार मैसेज

इस skill से मेरी मदद करो: https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/implementing-ebpf-security-monitoring/SKILL.md इस लिंक की SKILL.md फ़ाइल पढ़ो और मेरे काम में उसके निर्देशों का पालन करो।
क्या आप चाहते हैं कि आपका AI ऐसी skills खुद ढूँढे?मुफ़्त Skillpedia MCP इंस्टॉल करें: बस एक लाइन, और हर काम से पहले यह 15,000+ skills में खोजता है।1 मिनट में इंस्टॉल करें →

AI से क्या माँगें: उदाहरण

“मेरे सर्वर पर /etc/passwd फ़ाइल जितनी बार पढ़ी जाए, वह हर बार मॉनिटर करो।”

हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।

यह कैसे काम करती है

यह eBPF नाम की तकनीक का उपयोग करता है, जो बिना किसी अतिरिक्त भारी प्रोग्राम चलाए, सीधे kernel के अंदर सिस्टम इवेंट्स देखती है। आप नियम बनाकर इन इवेंट्स को फ़िल्टर कर सकते हैं और उन पर प्रतिक्रिया दे सकते हैं।

तकनीकी सामग्री (मूल SKILL.md)

लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।

Implementing eBPF Security Monitoring

When to Use

  • When deploying kernel-level runtime security monitoring on Linux hosts or Kubernetes clusters
  • When you need sub-millisecond visibility into process execution, network connections, and file access
  • When traditional userspace monitoring tools introduce unacceptable performance overhead
  • When building detection pipelines that require in-kernel filtering before events reach userspace
  • When enforcing runtime security policies (kill process, send signal) at the kernel level

Prerequisites

  • Linux kernel 5.3+ with BTF (BPF Type Format) support enabled
  • Kubernetes 1.24+ cluster (for Kubernetes deployment) or standalone Linux host
  • Helm 3.x installed (for Kubernetes deployment)
  • kubectl configured with cluster access
  • tetra CLI installed for local event streaming
  • Python 3.8+ with requests, kubernetes, pyyaml dependencies
  • Root or CAP_BPF/CAP_SYS_ADMIN capabilities for eBPF program loading

Instructions

1. Install Tetragon on Kubernetes

Deploy Tetragon via Helm to get default process lifecycle observability:

helm repo add cilium https://helm.cilium.io
helm repo update
helm install tetragon cilium/tetragon -n kube-system \
  --set tetragon.enableProcessCred=true \
  --set tetragon.enableProcessNs=true

Verify the installation:

kubectl get pods -n kube-system -l app.kubernetes.io/name=tetragon
kubectl logs -n kube-system -l app.kubernetes.io/name=tetragon -c export-stdout -f | head -20

2. Install Tetragon on Standalone Linux

For non-Kubernetes Linux hosts, install from the tarball release:

curl -LO https://github.com/cilium/tetragon/releases/latest/download/tetragon-linux-amd64.tar.gz
tar xzf tetragon-linux-amd64.tar.gz
sudo cp tetragon /usr/local/bin/
sudo cp tetra /usr/local/bin/

# Start tetragon daemon
sudo tetragon --btf /sys/kernel/btf/vmlinux &

# Stream events
tetra getevents -o compact

3. Monitor Process Execution (Default)

Tetragon generates process_exec and process_exit events by default without any TracingPolicy:

# Stream process events in compact format
tetra getevents -o compact

# Stream in JSON for SIEM ingestion
tetra getevents -o json | jq '.process_exec // .process_exit'

Example process_exec JSON event:

{
  "process_exec": {
    "process": {
      "binary": "/usr/bin/curl",
      "arguments": "https://malicious.example.com/payload",
      "cwd": "/tmp",
      "uid": 1000,
      "pod": {
        "namespace": "default",
        "name": "webapp-7b4d9f8c6-x2k9p"
      },
      "parent": {
        "binary": "/bin/bash",
        "pid": 1234
      }
    }
  }
}

4. Author TracingPolicy for File Access Monitoring

Create a TracingPolicy CRD to monitor access to sensitive files via the sys_openat kprobe:

# file-access-monitor.yaml
apiVersion: cilium.io/v1alpha1
kind: TracingPolicy
metadata:
  name: monitor-sensitive-file-access
spec:
  kprobes:
    - call: "fd_install"
      syscall: false
      args:
        - index: 0
          type: "int"
        - index: 1
          type: "file"
      selectors:
        - matchArgs:
            - index: 1
              operator: "Prefix"
              values:
                - "/etc/shadow"
                - "/etc/passwd"
                - "/etc/sudoers"
                - "/root/.ssh/"
                - "/etc/kubernetes/pki/"
          matchActions:
            - action: Post

Apply and observe:

kubectl apply -f file-access-monitor.yaml
tetra getevents -o compact --process-filter "event_set:PROCESS_KPROBE"

5. Author TracingPolicy for Network Connection Monitoring

Monitor outbound TCP connections using the tcp_connect kprobe:

# network-monitor.yaml
apiVersion: cilium.io/v1alpha1
kind: TracingPolicy
metadata:
  name: monitor-tcp-connections
spec:
  kprobes:
    - call: "tcp_connect"
      syscall: false
      args:
        - index: 0
          type: "sock"
      selectors:
        - matchActions:
            - action: Post

6. Author TracingPolicy for Privilege Escalation Detection

Detect setuid/setgid calls that may indicate privilege escalation:

# privilege-escalation-detect.yaml
apiVersion: cilium.io/v1alpha1
kind: TracingPolicy
metadata:
  name: detect-privilege-escalation
spec:
  kprobes:
    - call: "__sys_setuid"
      syscall: false
      args:
        - index: 0
          type: "int"
      selectors:
        - matchArgs:

…
अक्सर पूछे जाने वाले सवाल

eBPF क्या है?

eBPF एक ऐसी तकनीक है जिससे छोटे प्रोग्राम सुरक्षित तरीके से Linux kernel के अंदर चलाए जा सकते हैं। इससे kernel का कोड बदले बिना सिस्टम को मॉनिटर किया जा सकता है।

Cilium Tetragon क्या है?

यह एक टूल है जो eBPF का उपयोग करके रियल-टाइम सुरक्षा मॉनिटरिंग देता है और kernel स्तर पर सुरक्षा नीतियाँ लागू करता है।

'kernel' क्या होता है?

kernel ऑपरेटिंग सिस्टम का मुख्य हिस्सा है, जो हार्डवेयर संसाधनों को मैनेज करता है और प्रोग्राम्स को काम करने देता है।

जानकारी

लेखक का मूल विवरण

Implements eBPF-based security monitoring using Cilium Tetragon for real-time process execution tracking, network connection observability, file access auditing, and runtime enforcement. Covers TracingPolicy CRD authoring with kprobe/tracepoint hooks, in-kernel filtering via matchArgs/matchBinaries selectors, JSON event export, and integration with SIEM pipelines. Use when building kernel-level ru

repo: mukul975/Anthropic-Cybersecurity-Skills

लोकप्रियता

GitHub स्टार
35k
रैंकिंग में स्थान
#8033
लाइसेंस
Apache-2.0
अपडेट की गई
31/8/2026

क्या यह skill काम की है?

0

लॉग इन करें वोट करने के लिए।

कमेंट

  • …

इस repository की और skills

मिलती-जुलती skills