Udemy
Turn what you know into an opportunity and reach millions around the world.
Learn More
Your cart is empty.
Keep shopping
Advanced GenAI & LLM Security: Guardrails + eBPF Defense
New
2 students

Advanced GenAI & LLM Security: Guardrails + eBPF Defense

Defend LLM apps in two planes: input/output guardrails, RAG security, eBPF kernel monitoring, LSM blocking & anomaly ML
Created byAnil Kumar
Last updated 11/2026
English

What you'll learn

  • Map AI attack surfaces with the OWASP Top 10 for LLMs and MITRE ATLAS
  • Block direct, indirect and encoded prompt-injection attacks with input sanitizers
  • Redact secrets and personal data from model output with LLM-as-a-judge checks and DLP
  • Apply Llama Guard and NeMo-style guardrails as a policy layer around LLM apps
  • Secure RAG pipelines against poisoned documents with tenant isolation and provenance checks
  • Write eBPF probes in C to monitor AI containers inside the Linux kernel
  • Block file writes and outbound connections in the kernel with LSM BPF and XDP
  • Detect zero-day anomalies by training an Isolation Forest on syscall behaviour

Course content

13 sections • 31 lectures • 4h 48m total length
  • The Modern AI Security Problem10:09
  • The Attacks That Matter: OWASP Top 10 for LLMs and MITRE ATLAS7:46
  • The BPFense Blueprint: Two Planes of AI Defense8:14

Requirements

  • Comfortable reading and writing Python (functions, classes, running scripts)
  • Basic Linux terminal use: moving between folders, running commands, installing packages
  • A computer running Linux, or Windows 10/11 with WSL2 (setup is covered step by step in Section 2)
  • At least 8 GB of RAM and about 5 GB of free disk space for the two local models (no GPU needed)

Description

This course contains the use of artificial intelligence

AI applications fail in two places at once: in the words, and in the machine.

A single prompt can talk a model into leaking data or calling a tool it shouldn't. And once a model server is compromised, no prompt filter can see what happens next inside the container: a shell spawning, model weights being copied, a connection opening to an attacker's server. Most AI security courses cover only one of these. This course teaches both, and how to join them.


You will build a complete two-plane defense system, step by step, in Python and eBPF.


Plane 1 — Application guardrails

  • Map your AI attack surface with the OWASP Top 10 for LLM Applications and MITRE ATLAS.

  • Build input sanitizers for direct, indirect and encoded prompt-injection attacks.

  • Add an LLM-as-a-judge intent check and output data-loss prevention that redacts secrets and personal data.

  • Apply Llama Guard safety categories and NeMo-style conversational rails.

  • Secure RAG pipelines against poisoned documents with tenant isolation, provenance checks and similarity anomaly guards.

  • Catch system-prompt leakage in streamed output with canary tokens.

  • Gate AI agent tool calls and MCP servers with a five-stage tool gate and human approval for risky actions.


Plane 2 — Linux kernel runtime defense


  • Learn eBPF from first principles, write probes in C, and stream kernel events through ring buffers.

  • Watch AI containers at runtime: model-weight loading, GPU driver calls, process trees and network traffic.

  • Use LSM BPF hooks and XDP to block dangerous file writes and outbound connections inside the kernel.

  • Train an Isolation Forest on syscall behaviour to catch zero-day anomalies without labelled data.

  • Map kernel events to Kubernetes pods and verify model weights with cryptographic signatures.


Then you join the two planes. A unified decision engine fuses application and kernel signals, contains attacks automatically, and emits one structured incident alert. In the final capstone, a four-stage day-zero attack — poisoned document, agent tool hijack, container shell, weight theft — is stopped one layer at a time.


By the end, you will understand how modern AI systems are attacked, and you will have built and tested a defense that works across both planes.

Who this course is for:

  • Software and platform engineers who ship LLM features and need to secure them
  • Security engineers and SOC analysts moving into AI and LLM security
  • DevSecOps and cloud-native engineers running AI workloads on Linux and Kubernetes
  • ML and MLOps engineers who want to protect model servers, model weights and RAG pipelines
  • Developers who want a portfolio project combining AI guardrails with kernel-level runtime defense
  • Security researchers who want a free, local lab for testing LLM attacks and defenses