<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>Process lifecycle on Tetragon - eBPF-based Security Observability and Runtime Enforcement</title>
		<link>/docs/use-cases/process-lifecycle/</link>
		<description>Recent content in Process lifecycle on Tetragon - eBPF-based Security Observability and Runtime Enforcement</description>
		<generator>Hugo</generator>
		<language>en</language>
		
		
		
		
			<atom:link href="/docs/use-cases/process-lifecycle/index.xml" rel="self" type="application/rss+xml" />
			<item>
				<title>Process execution</title>
				<link>/docs/use-cases/process-lifecycle/process-execution/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
				<guid>/docs/use-cases/process-lifecycle/process-execution/</guid>
				<description>&lt;p&gt;This first use case is monitoring process execution, which can be observed with&#xA;the Tetragon &lt;code&gt;process_exec&lt;/code&gt; and &lt;code&gt;process_exit&lt;/code&gt; JSON events.&#xA;These events contain the full lifecycle of processes, from fork/exec to&#xA;exit, including metadata such as:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Binary name: Defines the name of an executable file&lt;/li&gt;&#xA;&lt;li&gt;Parent process: Helps to identify process execution anomalies (e.g., if a nodejs app forks a shell, this is suspicious)&lt;/li&gt;&#xA;&lt;li&gt;Command-line argument: Defines the program runtime behavior&lt;/li&gt;&#xA;&lt;li&gt;Current working directory: Helps to identify hidden malware execution from a temporary folder, which is a common pattern used in malwares&lt;/li&gt;&#xA;&lt;li&gt;Kubernetes metadata: Contains pods, labels, and Kubernetes namespaces, which are critical to identify service owners, particularly in a multitenant environments&lt;/li&gt;&#xA;&lt;li&gt;exec_id: A unique process identifier that correlates all recorded activity of a process&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;As a first step, let&amp;rsquo;s start monitoring the events from the &lt;code&gt;xwing&lt;/code&gt; pod:&lt;/p&gt;</description>
			</item>
			<item>
				<title>Advanced Process execution</title>
				<link>/docs/use-cases/process-lifecycle/advanced-process-execution/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
				<guid>/docs/use-cases/process-lifecycle/advanced-process-execution/</guid>
				<description>&lt;h2 id=&#34;monitor-elf-or-flat-binaries-execution&#34;&gt;Monitor ELF or Flat binaries execution&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#monitor-elf-or-flat-binaries-execution&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;p&gt;Advanced process execution can be performed by using &lt;a href=&#34;/docs/concepts/tracing-policy/&#34;&gt;Tracing Policies&lt;/a&gt; to monitor&#xA;the &lt;a href=&#34;https://man7.org/linux/man-pages/man2/execve.2.html&#34;&gt;execve system call&lt;/a&gt; path.&lt;/p&gt;&#xA;&lt;p&gt;If we want to monitor execution of Executable and Linkable Format (ELF) or flat binaries&#xA;before they are actually executed. Then the &lt;a href=&#34;https://github.com/cilium/tetragon/blob/main/examples/tracingpolicy/process-exec/process-exec-elf-begin.yaml&#34;&gt;process-exec-elf-begin&lt;/a&gt; tracing policy is a good first choice.&lt;/p&gt;&#xA;&lt;div class=&#34;alert alert-info note callout&#34; role=&#34;alert&#34;&gt;&#xA;  &lt;strong&gt;Note&lt;/strong&gt; &lt;p&gt;The &lt;a href=&#34;https://raw.githubusercontent.com/cilium/tetragon/main/examples/tracingpolicy/process-exec/process-exec-elf-begin.yaml&#34;&gt;process-exec-elf-begin&lt;/a&gt; tracing policy, will not report the&#xA;different binary format handlers or scripts being executed, but will report&#xA;the final ELF or flat binary, like the shebang handler.&lt;/p&gt;&#xA;&lt;p&gt;To report those another tracing policy can be used.&lt;/p&gt;&#xA;&#xA;&lt;/div&gt;</description>
			</item>
			<item>
				<title>Privileged execution</title>
				<link>/docs/use-cases/process-lifecycle/privileged-execution/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
				<guid>/docs/use-cases/process-lifecycle/privileged-execution/</guid>
				<description>&lt;p&gt;Tetragon also provides the ability to check process capabilities and kernel&#xA;namespaces access.&lt;/p&gt;&#xA;&lt;p&gt;This information would help us determine which process or Kubernetes pod has&#xA;started or gained access to privileges or host namespaces that it should not&#xA;have. This would help us answer questions like:&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;Which Kubernetes pods are running with &lt;code&gt;CAP_SYS_ADMIN&lt;/code&gt; in my cluster?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;Which Kubernetes pods have host network or pid namespace access in my&#xA;cluster?&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;h2 id=&#34;step-1-enabling-process-credential-and-namespace-monitoring&#34;&gt;Step 1: Enabling Process Credential and Namespace Monitoring&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#step-1-enabling-process-credential-and-namespace-monitoring&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;Edit the Tetragon configmap:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#272822;background-color:#fafafa;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;kubectl edit cm -n kube-system tetragon-config&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;Set the following flags from &amp;ldquo;false&amp;rdquo; to &amp;ldquo;true&amp;rdquo;:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#272822;background-color:#fafafa;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;# enable-process-cred: true&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;# enable-process-ns: true&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;Save your changes and exit.&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;Restart the Tetragon daemonset:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#272822;background-color:#fafafa;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;kubectl rollout restart -n kube-system ds/tetragon&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;</description>
			</item>
			<item>
				<title>Namespace access monitoring</title>
				<link>/docs/use-cases/process-lifecycle/namespace-access/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
				<guid>/docs/use-cases/process-lifecycle/namespace-access/</guid>
				<description>&lt;p&gt;Tetragon can monitor Linux namespace operations to detect when processes change&#xA;their namespaces. This is particularly useful for detecting container escapes&#xA;where a process attempts to access host namespaces using tools like &lt;code&gt;nsenter&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;h2 id=&#34;use-case-detecting-container-escapes-via-namespace-changes&#34;&gt;Use Case: Detecting Container Escapes via Namespace Changes&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#use-case-detecting-container-escapes-via-namespace-changes&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&#xA;&lt;p&gt;A common container escape technique involves using &lt;code&gt;nsenter&lt;/code&gt; to switch into the&#xA;host&amp;rsquo;s namespaces. Even if a container is running with restricted privileges,&#xA;monitoring &lt;code&gt;setns&lt;/code&gt; syscalls helps detect attempts to break out of the container&amp;rsquo;s&#xA;isolation.&lt;/p&gt;</description>
			</item>
	</channel>
</rss>
